The serial peripheral interface, or SPI, was created to allow multiple embedded devices to be networked together on a common bus. It's much like I2C in this respect. Unlike I2C, SPI can operate in full duplex mode, which means that one device can send and receive data at the same time. It accomplishes this using two separate lines for send and receive.
There are generally three lines on the bus: one each for transmit and receive and a third line for the clock. The clock line is controlled by the master node in the network, and allows the master and slave to remain synchronized. In order for more than one slave to be used at a time, each slave must have a slave select input. This input, generally active low, determines which slave is listening and talking. This means the master will have a number of outputs to allow it to control each slave. This caused me a number of headaches over the weekend because the PIC I'm using for my current project was already running short of output pins. Inactive slaves will almost always put their output pin into tri-state. There are apparently a few exceptions to this.
When transferring data, the master will send a clock signal to the slave. At each clock signal, one bit will be sent and one received by each device. If data only needs to be transferred in one direction, the data going the other way can be discarded when it arrives. It is important to note that data is sent no matter what.
For the PIC that I've been using, the transmission of data is performed using shift registers. Each device has an eight bit shift register that will shift on each clock cycle. Received data gets shifted in as sent data is shifted out, and after eight clock cycles the data can be read from the shift register. To transmit a value, the shift registers are preloaded with that value and then the clock cycles eight times.
The observant among you may have noticed a problem with this. If data is shifted in and out on the same clock cycle, how do you account for data rise and fall times? Basically, how do I know that a the change I've made on my slave's output port has propagated to the master before the master reads? The answer is that reads might happen on a rising edge of the clock and writes might happen on the falling edge of the clock. There are other ways to organize this, but they all revolve around reading and writing on different parts of the clock cycle. These different ways of organizing the SPI read and write functions are often called the modes of transmission.
Once you have your master and slave talking to each other, you may decided you want to add another slave or six. This is actually pretty simple to do. The new slaves can be put on the same bus as the original slave as long as the master has a separate select pin for each of the slaves (or a counter that can be decoded).
Overall, SPI is a fairly simple method of transmitting data between embedded devices. It can send and receive data at the same time (i.e. it's full duplex). It also gets rid of the need for sophisticated PLL circuitry to synchronize master and slave. The number of output pins is also much smaller than the amount needed for parallel communication, which is very useful. Problems with SPI include a lack of acknowledgment from slaves, short communication distance, and more pins required than I2C.
Information about SPI was found at wikipedia and in the datasheet for the PIC 16F877.