Sie sind auf Seite 1von 17

I C Protocol

Agenda

Need of I2C
Features of I2C
The I2C Protocol
Electrical Interface
Physical Layer / Signalling
Data Link Layer
Bus Arbitration
Clock Synchronization
References

Need of I2C
Maximize hardware efficiency
Circuit Simplicity
Efficient Inter IC Control
Hence solve interfacing problems encountered
during designing digital control circuits

Features of I2C
Only 2 lines are required SDA and
SCL
Each device connected to the bus is
software addressable by a unique
address
True multi-master bus including
collision detection and arbitration
Can provide data speeds ranging
from 100kbps to 3.4Mbps depending
on modes

The I2C Protocol (De Facto)


Master
Transmitter/
Receiver

Slave
Receive
r

Slave
Receiver/ Transmitter

Master 2

I C Electrical Interface
2

I C Physical Layer
2

Data Validity

Start and Stop bits

Data format
Acknowledgement

Physical Layer (Contd...)


Not Acknowledge

Conditions of NACK
No receiver is present on the bus with
the transmitted address
Receiver is busy in some other task
Receiver gets data/ commands that it
doesnt understand
Receiver cannot accept more data bytes
Master receiver must signal end of
transfer to slave transmitter

Data Link Layer


Data transfer:

Transferred byte

Data Transfer Formats


Master Transmitter and Slave receiver

Master receiver and Slave transmitter

Data Transfer Formats


(Contd...)
Combined format

Bus Arbitration
Is performed when multiple masters
are operating

Bus Arbitration (Contd...)


Undefined cases of Bus Arbitration
Master 1 sends a repeated START
condition and master 2 sends a data bit
Master 1 sends a STOP condition and
master 2 sends a data bit
Master 1 sends a repeated START
condition and master 2 sends a STOP
condition

Clock Synchronization

SCL decided with longest LOW period and shortest HIGH period

References
UM10204 I2C bus specification and user
manual
http://www.robot-electronics.co.uk/i2c-tutor
ial
http://www.byteparadigm.com/applications/i
ntroduction-to-i2c-and-spi-protocols/
Understanding I2C Bus, Texas Instruments

Das könnte Ihnen auch gefallen