Understanding Serial Peripheral Interface (SPI)
Like I2C, the SPI bus is a simple bus for low speed communications. It operates faster than I2C since it uses chip selects rather than passing addresses that need to be decoded, wasting valuable bandwidth. It also utilizes a separate receive and transmit bus, so that it can operate bidirectionally at the same time. It is a four-wire interface that has bidirectional data, a clock, and chip select.
Figure 12.6: deadbeef displayed on the board
It’s used in places where you may want to have easy read and write access with optional burstiness – typically used on things like ADCs, DACs, and other sensors that typically do not operate with high performance. It’s also a common interface for Erasable Programmable Read-Only Memory (EPROM) or low-speed access to Flash or SD cards.
Let’s look at the Digilent ACL2 PMOD, a 3-axis MEMS accelerometer.
ACL2 PMOD
The ACL2 PMOD from Digilent is based...