I2 c protocol

Post on 12-Apr-2017

110 views 0 download

Transcript of I2 c protocol

I2C PROTOCOL(TUTORIAL)

…….by

Azad Mishra

I2C = Inter IC = Inter Integrated Circuit Developed by Philips semiconductor (Now NXP) Two serial wire: 1.serial data(SDA) 2.serial clock(SCL) Since dedicated SCL and SDA it support

synchronous communication Bidirectional data transfer (not simultaneously)

Introduction

Multi master support Byte oriented transfer(byte) Wide range of Bus speed1.Standard mode = 100 kbps2.Fast mode = 400 kbps3.High speed mode = 1 mbps4.High speed mode = 3.4 mbps5.Ultra fast mode = 5 mbps

Contd………

Signal definition

Operation

All the transition from 0 to 1 or 1 to 0,the should happen only when clk is low..

As the start and stop condition is defined when clk is high ,so all the data transition shroud happen only when clk is low.

So that receiving device could sample its pin ,when clk is high.

So when clk is high the data line will be stable. Lets say we want to transmit 0xAA = 1010

1010 So msb bit goes frist

RULES

Star conditionIn start condition master send 1 byte in which (8 bit)So first 7 bit is slave device address and 8th bit is define its read or write operationIf 8th bit 0 = write operationIf 8th bit 1 = read operationAfter start condition master continuously send data or receive data. Stop condition Note- i2c will send 1 byte at a time on 7 bit

address line or 10 bit address line.

R/D and W/R operation

Termination of operation

https://drive.google.com/file/d/0BwDvWYgN9s0cTHl5WlppcFItaEE/view?usp=sharing

For more detail refer bellow document