Questions tagged [spi]

Serial Peripheral Interface (SPI) is a serial, synchronous bus commonly used in embedded systems. It is most often used for communication between a microcontroller and peripheral hardware such as memories, shift registers, sensors, displays etc, but can also be used for MCU to MCU communication.

Serial Peripheral Interface (SPI) is a serial, synchronous, full duplex bus commonly used in embedded systems. It is most often used for communication between a microcontroller and peripheral hardware such as memories, shift registers, sensors, displays etc, but can also be used for MCU to MCU communication.

SPI was originally developed by Motorola as a hardware peripheral in their microcontroller products. It has become an industry de facto standard and pretty much every MCU made today has got hardware support for SPI. It is however possible to implement SPI without hardware support: a software-controlled SPI communication can be created by using only general-purpose I/O pins, so called "bit-banging".

SPI can be used either as a point-to-point communication between one node called master and another called slave, or as a system with one master and multiple slaves. The latter can be achieved by using either multiplexer circuitry on the slave select line or a so-called daisy chain implementation.

SPI consists of 4 digital signals:

  • MOSI, Master Output Slave Input. Data line for transmission from the master to the slave.
  • MISO, Master Input Slave Output. Data line for transmission from the slave to the master.
  • SCLK, Serial Clock (sometimes called SCK or just CLK)). The clock used for all synchronization, generated by the master.
  • SS, Slave Select. Chip select for the slave(s), active low signal.

Tag usage

Use this tag in combination with and the tag for the MCU being used, if applicable. For hardware-related questions, use https://electronics.stackexchange.com.


References

1385 questions
-5
votes
2 answers

How to parse received data with variable length

Let us say I am receiving a packet with variable length data payload. **byte_num** **size** **type** 0 1 Length 1 1 SrcArsDev 2 4 Src_ID 6 1 DstArsDev …
-6
votes
1 answer

ARDUINO related C++ programming query. basic classes and function knowledge required from the great internet

instead of making libraries, can we have two or more classes within arduiono IDE? if so then can i call the objects of those classes within that code in seperate functions? like for example i have a communications class say SPI and an another class…
1 2 3
92
93