SPI is a synchronous serial communication protocol, mainly used for short-distance, high-speed communication between chips. Its core features are "synchronization" (relying on a clock signal to synchronize the master and slave devices), "full-duplex" (able to send and receive data simultaneously), and "master-slave architecture" (typically one master device controls multiple slave devices).
The SPI standard defines four core signal lines:
- SCLK (Serial Clock): Clock line, output by the master device, used to synchronize the data transmission rhythm between the master and slave devices.
- MOSI (Master Output Slave Input): Master-to-slave data line, through which the master device sends data to the slave device.
- MISO (Master Input Slave Output): Slave-to-master data line, through which the slave device sends data to the master device.
- SS/CS (Slave Select/Chip Select): Chip select line, controlled by the master device (active low), used to select the slave device to communicate with.
