Continue working on Final project w/ Jane
Physical Computing Final
Synchronous Serial Communication: The Basics
To communicate with these ICs, you need to use synchronous serial communication.
Serial Peripheral Interface (SPI)
- Serial Data In (SDI) - controller sends data to the peripheral devices.
- Serial Data Out (SDO) - peripheral devices send data to the controller.
- Clock (SCLK) - connection, on which the controller sends a regular clock signal to the peripheral devices.
- Chip Select (CS) - connections, which the controller uses to signal the peripheral devices when to listen to incoming data and when to ignore it.
Inter-Integrated Circuit (I2C) or Two-Wire Interface (TWI)
I2C is another popular synchronous serial protocol. It also uses a bus configuration like SPI, but there are only two connections between the controller device and the peripheral devices.
- a Serial Clock (SCL) connection**,** on which the controller sends the clock signal, just as in SPI
- a Serial Data (SDA) connection, on which the controller and peripherals exchange data in both directions.
SPI and I2C are useful protocols because they allow you to interface with a wide variety of sensor and actuator ICs without having to use many of your microcontroller’s IO pins. Because they are both bus protocols, you can chain many devices on the same bus, and call on them only when needed from your microcontroller.
LABS:
I2C