This week's class had too much new information, so it was quite difficult to follow everything.
To understand basics of communication protocols, this [basics of protocols series on circuitsbasics.com](https://www.circuitbasics.com/basics-of-the-spi-communication-protocol) was very useful. For effective communication between electronic devices, they need to use the same language. This language is called communication protocol. Some basic protocols are SPI, I2C and UART. These are generally slower than protocols like USB, ethernet, bluetooth and wifi; but are ideal for communication between microcontrollers and sensors where the large amounts of high-speed data does not need to be transferred.
To understand basics of communication protocols, this [basics of protocols series on circuitsbasics.com](https://www.circuitbasics.com/basics-of-the-spi-communication-protocol) was very useful. For effective communication between electronic devices, they need to use the same language. This language is called communication protocol. Some basic protocols are SPI, I2C and UART. These are generally slower than protocols like USB, ethernet, bluetooth and wifi, but are ideal for communication between microcontrollers and sensors where the large amounts of high-speed data does not need to be transferred.
Since I do not have access to a lab or a lot of inventory right now, I chose to understand wired communication protocols - SPI & I2C, with Arduino Unos that I do have access to. When I'm in the lab, or get more access to parts, I want to learn about the other protocols.
Since I do not have access to a lab or a lot of inventory right now, I chose to understand wired communication protocols - SPI & I2C, with Arduino Unos that I do have access to. When I'm in the lab, or get more access to parts, I want to learn about the other wireless protocols too.
## Serial vs Parallel Communication
While communicating, bits are transferred from one device to another by quick changes in voltage. In a 5V system, O corresponds to 0V and 1 corresponds to 5V voltage.
I2C communication allows for a single or multiple masters(unlimited) to talk to a single or multiple slaves(max. 1008). It uses two wires to transmit data between devices. Since it follows series communication, it transfers bits one by one through the same wire.

* SDA (Serial Data) - to send as well as receive data between the master/s and slave/s
* SCL (Serial Clock) - sends the clock signal
The clock signal is controlled by the master, and the data is synchronized to the bit sampling.
Data is sent in messages. Here is a diagram of the structure of a message.

A pull-up resistor needs to be connected from the Master's SDA and SCL each to VCC, if there are more than one slaves or more then one masters.
### I2C in one master and one slave
I followed this tutorial and make a circuit to blink an LED on the slave.