Difference between revisions of "Embedded System I2C Tutorial"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Created page with "<font color="red">This article is under construction</font> <BR/> == Theory of Operation == I2C is prounced "eye-squared see". It is also known as "TWI" because of the intial...")
(No difference)

Revision as of 19:09, 30 September 2013

This article is under construction

Theory of Operation

I2C is prounced "eye-squared see". It is also known as "TWI" because of the intial patent issues of this BUS. This is a popular, low throughput (100-1000Khz), half-duplix BUS that only uses two wires regardless of how many devices are on this BUS. Many sensors use this BUS because of its ease of adding to a system.

Open-Collector BUS

I2C is an open-collector BUS, which means that no device shall have the capability of internally connecting either SDA or SCL wires to power source. The communication wires are instead connected to the power source through a "pull-up" resistor. When a device wants to communicate, it simply lets go of the wire for it to go back to logical "high" or "1" or it can connect it to ground to indicate logical "0".

Pull-up resistor

Using a smaller pull-up can acheiver higher speeds, but then each device must have the capability of sinking that much more current. For example, with a 5v BUS, and 1K pull-up, each device must be able to sink 5mA.

I2C Circuit Simulation


Protocol Information

Write Transaction

Read Transaction