I2C (Inter Integrated Circuit) : Features
I2C (Inter Integrated Circuit) : Features
Simplicity and flexibility are the key characteristics that make this bus especially
attractive for consumer and automotive electronics.
The I2C-bus has 2-wire interface architecture. Those are SDL (Serial Data Line)
and SCL (Serial Clock Line).
SDL is responsible for transmission and reception of data. Master only gives the
clock pulses those clock pulses are nothing but SCL.
Features:
Only two bus lines are required (SDL, SCL) two are bidirectional.
No strict baud rate requirements like for instance with RS-232, the Master
generates a bus clock.
Simple Master/Slave relationships exist between all components. Each device
connected to the bus soft ware addressable by a unique address.
I2C is a true multi master bus providing arbitration and collision detection.
Design of I2C:
Devices to interface:
LCD/LED drivers
EPROM’s
The device initiating data transfers and providing the clock signal on the bus is
called a “Master”, a device being addressed by the Master is called a “Slave”.
Master and Slave those are having I2C Rx (Receiver) and I2C Tx (Transmitter), so both
sides we can sends data and receives data.
Timing diagram:
Frame format:
The first byte of an I2C transfer contains slave address and data direction. The
address is 7-bit long. Direction bit is 1-bit long.
112 Slave addresses are available from the 127 possible ones (7-bit) as some
address are reserved for special purposes. 10 bit addressing has been defined as
well.
Master can stop the transfer. That is RD/WR (Read/Write) the data depends on
Master.
In multi Master system, sending data at a same time but the data will not be
disturbed or collisions will not occur.
I2C arbitration:
Several I2C Masters can be connected to the same lines at the same time. To
prevent collisions all Masters prior to transmission have to:
-Constantly monitor SDA and SCL from start and stop conditions.
-Determine whether the bus is idle or not.
-Delay the transmission until the bus is free.
-Monitor SDA and SCL during transmission as two Masters might start the
transmission at the same time. In case of detection SDA being low while
transmitting high the transmitter has to stop the transmission. This is called bus
arbitration.
I2C interface:
By the AND operation I2C detects the clocks of all Masters are given as HIGH.
When, SDA = 0
SCL = 1
It indicates that, now we can start of transfer
When, SDA = 1
SCL = 0
It indicates that, end of transfer of data.
Performance of I2C:
Standard mode:
Speed is 100 Kbits/sec. It is the default mode.
Control limitations are done on the speed of the Slave device.
It is having a 7-bit address.
Fast mode:
Speed is 400 Kbits/sec.
It is having a 7-bit/10-bit address.