SolderSplash Labs Forum2013-04-02T20:31:31+00:00http://www.uk-electronics.com/feed.php?f=12&t=202013-04-02T20:31:31+00:002013-04-02T20:31:31+00:00http://www.uk-electronics.com/viewtopic.php?t=20&p=32#p32SPI Clock (SCLK) - Used to clock data in or outSPI Master Out (MOSI) - Data sent from a master to a slaveSPI Master IN (MISO) - Data sent to a masterChip Select (CS) - Used to tell the slave to listen to the bus and that it can use the MISO line

Each bit of a each byte is indicated by setting or clearing the MOSI/MISO line and changing the SCLK to indicate that the data line should be sampled. Some devices change/setup the data line on the rising edge so it is valid (ready to be sampled) on the falling edge. Others do the reverse.

The number of bits sent per message is all up to the protocol the device you are communicating with expects.

A downside compared with I2C is that each slave on the SPI bus requires it's own chip select line. The chip select line tells the SPI device that it is being spoken too and that it use the MISO line to talk back. It is also used as a way of keeping in sync and knowing where the first bit is in an SPI message.

Because SPI is quite simple most micro controllers give you a FIFO buffer that in hardware will queue a series of bytes to send and bytes received. Some high end devices provide DMA, which allows you to specify where in your ram to read from/to.

Most of our SolderBridge's contain a small NXP LPC11U24 ARM M0 and we control/communicate to them using SPI.