Individual assignment:

  Design, build, and connect wired or wireless node(s)
  with network or bus addresses and local input &/or
  output device(s)

For this week's project, The master board will feature a switch to select the slave board. An LED on the slave board will indicate the chosen slave board. The slave board selection can be done using a push button on the master board.

I've decided to utilize the I2C protocol to facilitate this function.

I2C Communication Protocol

I2C, which stands for Inter-Integrated Circuit, is a bus interface connection protocol that is integrated into devices for serial communication.

It's a commonly used protocol for short-distance communication and is also referred to as Two Wire Interface (TWI).

The I2C communication protocol operates using only 2 bi-directional open-drain lines for data transmission, known as SDA and SCL. Both of these lines are initially pulled high.

I2C operates in 2 modes –

Every data bit transferred on the SDA line is synchronized by a transition from the high to low pulse of each clock signal on the SCL line.

img02.jpg

As per the I2C protocols, the data line cannot change while the clock line is high;

It can only change when the clock line is low.

Since the devices on the I2C bus are actively low, pull-up resistors are required to keep lines high.