Skip to content

Communication Protocols

steigeia edited this page May 9, 2017 · 1 revision

Serial Peripheral Interface (SPI)

SPI is a communication protocol that is used facilitate communication between a single "master" device and one or more "slave" devices. All "slave" devices can utilize the same MISO (Master in Slave out), MOSI (Master out Slave in), and SCK (Serial Clock) line on the "master" device. This is important for this project because the Arduino UNO only has 1 set of SPI pins, digital pins 13-11, as seen below.

Even though all "slave" devices use the same MISO, MOSI, and SCK pins, they do not all listen to those pins at the same time. Each slave device has a unique SS (Slave Select) line on the "master" device. When the SS is low for a "slave" device it communicates with the "master" through MISO, MOSI, and SCK and ignores those lines if SS is high. This allows for the single "master" device to communicate with the "slave" devices one at a time by keeping only one SS line low at a time. You might notice that the Arduino UNO has a SS pin, digital pin 10, but that is for when the UNO is being used as a "slave" device but for this project the UNO is acting as the "master" device.

Inter-Integrated Circuit (I2C)

I2C is also communication protocol that is used facilitate communication between a single "master" device and one or more "slave" devices but I2C can also facilitate multiple "master" devices. I2C only uses 2 wires on both the "master" and "slave" device, SCL (clock signal) and SDA (data signal). For this project analog pins 4 (SDA) and 5 (SCL) are used to allow for I2C communication between the Arduino UNO and the Real Time Clock on the data logging shield.