Welcome FPGA engineers to join the official WeChat technical group.
Clickthe blue textto follow us at FPGA Home – the best and largest pure FPGA engineer community in China

SPI Bus
SPI (Serial Peripheral Interface) is a high-speed, full-duplex, synchronous, serial communication bus that uses 3 to 4 lines and operates in a master-slave mode, allowing multiple SPI devices to connect with each other.
The SPI device providing the serial clock is referred to as the SPI master, while the other devices are referred to as SPI slaves.
The SPI bus consists of three signal lines: SCLK (serial clock), SDI (serial data input), and SDO (serial data output). When there are multiple slave devices, a chip select line (CS) can be added to control whether a chip is selected, enabling multiple SPI devices to connect on the same bus.
If simulating the SPI bus using GPIO pins, there must be one output pin (SDO), one input pin (SDI), and the other pin depends on the type of device being implemented. If implementing a master-slave device, both input and output pins are needed; if only a master device is to be implemented, only the output pin is necessary; if only a slave device is to be implemented, only the input pin is needed.
SDI – Data input to the master, data output from the slave; SDO – Data output from the master, data input to the slave; SCLK – Clock signal generated by the master; CS – Slave enable signal controlled by the master.
SPI is a protocol that allows one master device to initiate synchronized communication with a slave device, thereby completing data exchange. SPI is a serial protocol, meaning data is transmitted one bit at a time, which is why the SCLK clock line exists to provide clock pulses, with SDI and SDO completing data transmission based on these pulses.
Data output occurs via the SDO line, with data changing on the rising or falling edge of the clock, and being read on the subsequent falling or rising edge. A single bit of data transmission is completed in this manner, and the input follows the same principle.
Thus, at least 8 clock signal changes (one change for both the rising and falling edges) are needed to complete the transmission of 8 bits of data.
This transmission method has an advantage; unlike ordinary serial communication, which continuously transmits at least 8 bits of data at a time, SPI allows for the transmission of data one bit at a time and even allows for pauses. This is because the SCLK clock line is controlled by the master device; when there is no clock transition, the slave device does not collect or transmit data. In other words, the master device can control communication by controlling the SCLK clock line.
SPI is also a data exchange protocol: because the data input and output lines of SPI are independent, it allows for simultaneous data input and output. Different implementations of SPI devices may vary, primarily in the timing of data changes and sampling, with different definitions for sampling on the rising or falling edges of the clock signal. Please refer to the relevant device documentation for specifics.
Lastly, a drawback of the SPI interface is that it lacks designated flow control and acknowledgment mechanisms to confirm whether data has been received.
In point-to-point communication, the SPI interface does not require addressing operations and is simple and efficient due to its full-duplex communication. In systems with multiple slave devices, each slave device requires an independent enable signal, making the hardware slightly more complex than I2C systems. The SPI interface is primarily used in EEPROMs, FLASH, real-time clocks, AD converters, as well as between digital signal processors and digital signal decoders.
UART Bus
-
Converts parallel data sent from within the computer into an output serial data stream;
-
Converts serial data coming from outside the computer into bytes for use by devices within the computer that use parallel data;
-
Adds parity bits to the output serial data stream and performs parity checks on the incoming data stream;
-
Adds start and stop markers to the output data stream and removes start and stop markers from the received data stream;
-
Handles interrupt signals sent from the keyboard or mouse;
-
Can manage synchronization issues between the computer and external serial devices;
-
Some high-end UARTs provide input and output data buffers; the more recent UART is the 16550, which can store 16 bytes of data in its buffer before the computer needs to process it.

IIC Bus

Scanto follow
FPGA Home
Welcome FPGA, Embedded, Signal Processing engineers to follow our public account.
Follow me!Engineers!

The largest FPGA technology community in the country
Welcome everyone to join the largest and strongest FPGA WeChat technical group, which has tens of thousands of engineers and a group of engineers who love technology. FPGA engineers here help and share with each other, creating a strong technical atmosphere! Hurry and invite your friends to join!
Press and hold to join the national FPGA technical group!

One of the best Xilinx and Altera chip suppliers in the country!
Platform self-operated, guaranteed quality of imported original products!
Continuously supplying multiple military research institutes and listed companies!
The best FPGA chip prices and the best after-sales service!
With the industry’s top service reputation!
Backed by global top supplier quality standards!
Full range of XILINX orders or stock advantages!
XCVU9P-2FLGB2104I 200PCS
XCVU9P-2FLGA2104I 500PCS
XCVU13P-2FLGB2104I 300PCS
XC7K325T-2FFG900I 1500PCS
XC7K325T-2FFG676I 950PCS
XC7K160T-2FFG676I 850PCS
XC7VX690T-2FFG1927I Coming soon, please reserve!
XC7VX690T-2FFG1761I Coming soon, please reserve!
For more Xilinx model inquiries, please consult us! Thank you! Scan the QR code to get in touch!
Official thanks to brands supporting the FPGA technical group: Xilinx, Intel (Altera), Microsemi (Actel), Lattice, Vantis, Quicklogic, Lucent, and others for their support of the technical group!