I2C Communication

Goal

In this lab we will understand how I2C communication works, we will measure the rise time of a clock signal by changing the value of the pull up resistor to the I2C communication.

Background

I2C stands for Inter Integrated Circuit, this protocol uses 2 signals, one signal is clock and the other is data signal. However, this is misleading. In addition to these two lines that carry digital signals, there are two other lines required to be connected in common to all devices: power and ground. There are two types of devices in I2C bus: 1) Controller (master) 2) Minions (Slaves)

SCL: It is a unidirectional signal that originated from controller.

SDA: It is a data signal which is bidirectional that can travel to from controller or minion.

The standard rated frequency for the bus is 100 kbits/sec. In fast mode, this can go up to 400 kHz. The SCL and SDA drivers for all minions and some controllers are “open collector” or “open drain”. This means the drivers connected to the bus connect by an open collector, if bipolar. This means when the driver wants to write a 0-bit, it turns the transistor on, pulling the line down. But it has no way of writing a 1-bit, or a HIGH signal. Instead, it relies on a pull up resistor to pull the line HIGH when the transistor is turned off. Without a pull up resistor, there is no way for a line to reach the Vdd level of a digital 1. Therefore, all I2C buses show a pull up resistor to the VDD line attached to the SCL and SDA lines. An example of the circuit is shown below.

From the I2C spec sheet we can see that the rated sink current for a transistor is 3mA. The drop across transistor is about 0.2 to 0.6V So, For 3.3V input, pull up resistor ➔ (3.3 – 0.4)/3mA = 1KΩ approximately, pull up resistor is at least 1KΩ. For 5V input, pull up resistor ➔ (5 – 0.4)/3mA = 1.5KΩ, pull up resistor is at least 1KΩ.

I2C Waveform without Pull up resistor

I2C Waveform with Pull up resistor

A detailed report on this lab can be found here: