📈I2C Protocol
Notes on I2C prorocol
Introduction
Multi master multi slave communication , 128 devices maximum because of the data frame having a fixed bits for addresses
Maximum of 3mbps , synchronous data transfer protocol
has start and stop conditions , and a data frame format
configuration / connection
Multi master multi slave
SDA - Data line , SCL - Serial clock
Open drain / open collector configuration / pull up pull down is required
In open drain (above image) a pull up resistor is used for idle state and pulled low when required
uses 4.7kohm resisitor typically
Details
Communication:
start condition : SDA is pulled low keeping scl (clk) high (idle)
Master sends 7 bit (0-127) slave address first with read/write and waits for ACK/NACK from slave
slave pulls sda low to indicate ACK
Master sends or recieves a data frame 8 bit waits for ack or nack
slave ACK once recieved
Master stop condition is issued: SDA is high before SCL
Arbitration / handling multiple slaves from collision
In Multi master configuration SDA is monitored and if its low then devices wont send data
Usage and limitations
As the name suggests its a very low speed communication meant for chip to chip in a pcb
used in sensors , eeprom etc
400kbps in the fast mode
References:
Last updated