Flotulopex / Sayzer

I wonder if this what you are looking for. SPI is basically a synchronous way of transferring data between a MCU and peripherals.

If you understand asynchronous serial transmission, synchronous is just easier. Asynch is used in RS232 and you might be using it quite easily. Basically, asynch relies on the timing(Baud Rate) to be near accurate for it to work right. Try doing a serial transmission with interrupts on and you will see why it is so important to have a perfect timing.

SPI or any synch protocol for that matter makes life simpler by qualifying the data bit via a clock bit. The simplest analogy would be a serial to parallel shift register like the CD4094. You set up the data bit, CLOCK it in, next data bit, CLOCK it in, and so on.

Now, you will say; but, spi has 4 wires. Yes it does. One of them is for the Chip selection. The communication only works when the chip is selected via the ChipSelect line.

So, one data line going to the Serial-Parallel register SDI, one data line coming from the Parallel-Serial register SDO, one clock line to clock both these registers together and a chipselect that enables all this to work.

Look at this image to understand the concept better.
Name:  SPI.GIF
Views: 1460
Size:  2.3 KB

Advantage of SPI, you can clock in/out the data without strict timing requirements, at your own pace.