TODO: AryanSPI is a 4-wire common communication protocol used to communicate with ICs. It is full-duplex, meaning it can receive and transmit at the same time! We use it in our car for high-speed communication with ICs, SD card logging, and in our BMS.
Hardware:
...
MOSI = Master out slave in = Streams binary data
MISO = Master in slave out = Receives binary data
SCLK = Serial clock = Synchronizes binary data. 4 modes to determine the sampling period
CS = Chip select = CS idles high and is pulled low when transmission starts
Since SPI is full-duplex, both the MOSI and MISO lines can be active at the same time, meaning the master can transmit and receive!
Standard-Speed SPI - 100 kHz to 1 MHz
High-Speed SPI - 1 MHz to 50 MHz
Clock Polarity and Phase (CPOL and CPHA):
Daisy-Chaining:
Packet Protocol:
...
https://www.circuitbasics.com/basics-of-the-spi-communication-protocol/