An Overview of Chip-to-Chip Communications for Motion Control Applications
Integrated circuits (ICs) act like living organisms. They form the basis of all modules and drives, with individual chips playing the roles of atoms and molecules. Chip-to-chip communication is what makes the whole system live and breathe.
Some chips serve a singular purpose, like atoms, while others combine several features in a package, like molecules. To create a working circuit, all these components must be able to communicate effortlessly chip-to-chip. ADI Trinamic™ products are enriched with peripherals and software to support this goal. Here are a few of the key interfaces that enable IC communications.
Serial Peripheral Interface (SPI)
SPI, or serial peripheral interface, is an interface bus for synchronous serial communication. It makes use of a select-line to direct data to the intended peripheral and is a single, bidirectional interface for both motion commands and diagnostics, which minimizes the number of required lead traces. Commonly used for communication over short distances between microcontrollers and small peripherals, SPI is popular with sensors, stepper motors, converters, flash memory, real-time clocks, and other components. The simple on-board interface can reach a bandwidth of up to several 10 Mbps when pushed by CPUs and microcontrollers, allowing control of high bandwidth peripherals.
The data stream structure is not defined by the SPI protocol, leaving the composition of data up to the design engineer. Enabling fast and simple communication with various peripherals, the SPI interface bus is both versatile and straightforward. The ADI Trinamic SPI chipset allows full control over microstepping tables for a seamless change of microstep resolution on-the-fly. As such, the microstepping tables can be adapted in the motion controller for optimized motor requirements.

Universal Asynchronous Receiver-Transmitter (UART)
UART, or universal asynchronous receiver-transmitter, is used for asynchronous serial communication with configurable data format and transmission speeds, often as part of an integrated circuit. The serial communication interface acts as the intermediary between parallel interfaces and serial interfaces.
UART cuts bytes of data into individual bits and transmits these in a sequence. The receiver then takes these bits and compiles them into complete bytes using a shift register. By using this method, the interface only needs a single serial wire for bidirectional communication, making it a cost-effective interface between devices.

To ensure data is processed correctly, most UART structures contain input and output shift registers to cut data into smaller pieces and assemble it back together, transmit and receive control, control logic for read and write, and a clock generator that usually allows sampling in the middle of a bit period.
Inter-Integrated Circuit (I²C)
I2C, or inter-integrated circuit, is a synchronous serial bus using 8-bit communication and only two IOs. The packet-switched and single-ended bus only needs two wires for communication. This can be split up into two further wires using a multiplexer depending on the system’s requirements.
This bus structure allows for multiple controller nodes and multiple subnodes. Thus, I²C combines the advantages of SPI’s multiple subnodes with the advantages of UART’s bidirectional wiring to transfer serial data and serial clock signals over short distances within a single device. Having an open drain with an input buffer allows bidirectional communication via the single data wire, sending data frames addressed to specific subnodes.

I2C is widely used in embedded systems. Often, the MCU will function as the main node, with EEPROM, sensors, and other peripherals as subnodes using just two pins for intra-board communication over short distances. The main node controls the clock signal used for synchronizing the sampling of bits and the system uses specific ACK or NACK bits to confirm that each frame is successfully transferred.
Pulse-Width Modulation (PWM)
Pulse-width modulation, or PWM, is a logic-level interface translating digital input signals into variable analog signals. This happens by chopping each signal up into discrete parts, thereby reducing the average power of each signal. The longer a signal is high compared to low, the higher the output analog signal voltage will be, and vice versa. PWM is one of the primary methods used for driving motors, since motors can easily withstand the negative effects of discrete switching due to their inertia. However, fast PWM switching is still preferred when controlling a motor so it has a minimum impact on the load, meaning a smooth waveform results in better performance of the drive. One of the most popular features of PWM is its high efficiency, making it ideal for controlling the power supply to a load with minimum dissipation. Furthermore, it can easily be combined with digital controls to set the PWM duty cycle.
Real-Time Monitoring Interface (RTMI)
Real-time monitoring interface (RTMI) allows engineers to see how their setup performs in real time using the ADI Trinamic USB-2-RTMI adapter. It offers the same tiny 10-pin connector with the same pin assignment for all ADI Trinamic products supporting RTMI. This adapter translates RTMI signals into USB signals, which can easily be viewed using the TMCL-IDE.
RTMI offers a parallel interface to the normal SPI interface. This means you can command the controller IC via the MCU, as you would normally do in your setup, while at the same time connecting the RTMI and controller IC to look at the registers and adjust them if needed. The interface allows fine-tuning of the chip while visualizing the result in graphs on your computer using the TMCL-IDE.
Besides giving you the benefit of monitoring your setup, RTMI also allows high data rates and real-time measurements such as PWM frequency, which simplifies the tuning of highly dynamic drives.

Step/Direction (STEP/DIR)
Step and direction (STEP/DIR) interfaces offer simplified control of various motors and are widespread in industrial applications, meaning step and direction drivers and motion controllers allow for compatible solutions. This interface is most commonly used for stepper motors because, especially at high microstep resolutions and step frequencies, STEP/DIR architectures require a fraction of the bandwidth when compared to SPI or PWM interfaces.
While there are other, more advanced communication interfaces, STEP/DIR is still popular in industrial motion control where long distances need to be covered using as few control lines as possible, while at the same time offering a simple and robust motor control interface.
The STEP/DIR interface works by using two digital inputs for controlling motion, one for velocity or position (STEP), and the other for the direction in which the motor turns (DIR). It’s a relatively simple way of controlling stepper motors. One example is a motion controller that uses SPI for the setup and feedback channel for diagnostics down to the power stage while communicating with the stepper motors via STEP/DIR.
