SlideShare ist ein Scribd-Unternehmen logo
1 von 22
By-
Akhil Srivastava
Ajay Sharma
I2C Bus
Basic Characteristics
 Serial protocol for two-wire interface.
 Used in low-speed devices like microcontrollers,
EEPROMs, I/O interfaces and other similar peripherals in
embedded systems.
 Speeds:
– 100 kbps (standard mode)
– 400 kbps (fast mode)
– 3.4 Mbps (high-speed mode)
– 5 Mbps Ultra Fast-mode
 Data transfers: serial, 8-bit oriented, bi-directional
 Master/slave relationships with multi-master option
 Master can operate as transmitter or receiver
 Addressing: 7bit or 10bit unique addresses
Wires and Signals contd..
 Two-wired bus
– serial data line (SDA)
– serial clock line (SCL)
 Bit transfer (level triggered)
– SCL = 1 ⇒ SDA = valid data
– one clock pulse per data bit
– stable data during high clocks
– data change during low clocks
Wires and Signals
 Signals –
 Start
 Stop
 Ack
 Not Ack
 Bus state
– free/Idle … after stop and before next Start.
(an IDLE bus condition is defined as having
both SDA and SCL high)
– busy … after Start and before next stop
Masters and Slaves
 Master device
– controls the SCL
– starts and stops data transfer
– controls addressing of other devices
 Slave device
– device addressed by master
 Transmitter/Receiver
– master or slave
– master-transmitter sends data to slave-recevier
– master-receiver requires data from slave-
transmitter
Frame Formats
I2C Protocol
Normally, a standard communication consists of
four parts:
 START signal generation
 Slave address transfer
 Data transfer
 STOP signal generation
START signal generation
 Start condition (S)
– SDA 1→0 transition when SCL = 1
Slave Address Transfer
 Slave address bits are transferred after start condition
 Transmission is byte oriented
 Most significant bit (MSB) first
 8 pulses for data bits are followed by one pulse for
ack. bit
{ 7 bits + R/W+ one acknowledge bit }
 Ack by slave at 9th SCL clk cycle by pulling SDA low.
 Slave address is also datum
– first byte transferred
– during the first byte transfer:
• master is transmitter
• addressed slave is receiver
Data Transfer
 Data transfer starts after successful slave
addressing.
 Data bits are generated by transmitter as SCL
pulses
 9-th pulse:
– transmitter releases SDA
– receiver must hold SDA low in order to ack.
received data
– slave must release SDA after ack. bit
(allows master to end frame)
Stop Signal
 The master can terminate the communication by
generating a STOP signal(P)
– SDA 0→1 transition when SCL = 1
Wave…..
Clock stretching
 Clock stretching is a feature of some slaves.
 If no slaves in a system can stretch the clock
(hold SCL LOW),
 the master need not be designed to handle this
procedure.
 The transaction cannot continue until the line is
released HIGH again.
 Clock stretching is optional
 most slave devices do not include an SCL driver
so they are unable to stretch the clock.
Clock stretching ….Contd
 Example- On the byte level, a device may be able to
receive bytes of data at a fast rate, but needs more time to
store a received byte or prepare another byte to be
transmitted. Slaves can then hold the SCL line LOW after
reception and acknowledgment of a byte to force the
master into a wait state until the slave is ready for the next
byte transfer in a type of handshake procedure
Multiple Masters
 more bus controllers can be connected
 several masters can start frame at once
 synchronization needed on SCL
 arbitration needed on SDA
 using wired-AND connection to SCL/SDA
Synchronization on SCL
 frame started SCL = 1
 first 10 transition (*)
– involved masters restart their
clocks
– master holds 0 until its low-
period is over
 master finished its low-period
– releases SCL
– SCL = 0 switches to wait
state, waits for SCL = 1
– SCL = 1 or waiting finished
starts counting high-period
 first master finished its high-period
– sets SCL = 0
– equivalent to (*) state
Synchronized Clocks
 low-period
– determined by max{low-periods of involved
masters}
 high-period
– determined by min{high-periods of involved
masters}
Arbitration on SDA
 frame started, SCL synchronized high periods = valid data
 each master generates its data
 master aborts if there is another level on SDA than it
generates
it loses arbitration, releases SDA and tries again when
bus is free
Notes on Arbitration
 can continue for many bits
 addresses are compared at first stage
 if the same slave is addressed in the same mode (R/W):
– masters are transmitters data-bits are compared
– masters are receivers acknowledge-bits are compared
 if arbitration is not over before stop or repeated start:
– comparation not allowed: stop-data, repeated start-data,
stop-repeated start
– involved masters must generate stops/repeated starts in
the same positions
 loser can generate SCL pulses for synchronization until the byte
is over
 losing master which can be also a slave
– must switch immediately to slave mode
General Call
 addresses all devices
 device ignores call  not acknowledges address
 device accepts call  acknowledges address
 R/W = 0 (W)  master-transmitter, slave-receiver
 command in the second byte
 LSB = 0 (least significant bit)
– programmable part of device’s address
manipulation
– resetting devices
 • LSB = 1
– master (e.g. keyboard scanner) doesn’t know where
to send data
– remaining 7 bits contain master’s address
References
 The I2C Bus Specification, version 2.1, January
2006
 www.opencores.org
 http://www.semiconductors.philips.com/buses/i2c
Thank You
!!!!!!!!!!!!!!!

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

AMBA Ahb 2.0
AMBA Ahb 2.0AMBA Ahb 2.0
AMBA Ahb 2.0
 
APB protocol v1.0
APB protocol v1.0APB protocol v1.0
APB protocol v1.0
 
axi protocol
axi protocolaxi protocol
axi protocol
 
SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)
 
Ambha axi
Ambha axiAmbha axi
Ambha axi
 
I2C BUS
I2C BUSI2C BUS
I2C BUS
 
The I2C Interface
The I2C InterfaceThe I2C Interface
The I2C Interface
 
I2 c protocol
I2 c protocolI2 c protocol
I2 c protocol
 
Verification Strategy for PCI-Express
Verification Strategy for PCI-ExpressVerification Strategy for PCI-Express
Verification Strategy for PCI-Express
 
Axi protocol
Axi protocolAxi protocol
Axi protocol
 
SPI Protocol
SPI ProtocolSPI Protocol
SPI Protocol
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
Spi master core verification
Spi master core verificationSpi master core verification
Spi master core verification
 
Apb
ApbApb
Apb
 
AMBA 3 APB Protocol
AMBA 3 APB ProtocolAMBA 3 APB Protocol
AMBA 3 APB Protocol
 
CPU Verification
CPU VerificationCPU Verification
CPU Verification
 
Dual port ram
Dual port ramDual port ram
Dual port ram
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral Interface
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
System verilog verification building blocks
System verilog verification building blocksSystem verilog verification building blocks
System verilog verification building blocks
 

Andere mochten auch

Designing of fifo and serial peripheral interface protocol using Verilog HDL
Designing of fifo and serial peripheral interface protocol using Verilog HDLDesigning of fifo and serial peripheral interface protocol using Verilog HDL
Designing of fifo and serial peripheral interface protocol using Verilog HDLJay Baxi
 
PR_ALT_28072015_SiConTech_acquisition
PR_ALT_28072015_SiConTech_acquisitionPR_ALT_28072015_SiConTech_acquisition
PR_ALT_28072015_SiConTech_acquisitionAkhil Srivastava
 
I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24Varun Mahajan
 
S3 Group on Code Management - RDK Users Conference 2014
S3 Group on Code Management - RDK Users Conference 2014S3 Group on Code Management - RDK Users Conference 2014
S3 Group on Code Management - RDK Users Conference 2014S3 Group | TV Technology
 
HKG15-506: Comcast - Lessons learned from migrating the RDK code base to the ...
HKG15-506: Comcast - Lessons learned from migrating the RDK code base to the ...HKG15-506: Comcast - Lessons learned from migrating the RDK code base to the ...
HKG15-506: Comcast - Lessons learned from migrating the RDK code base to the ...Linaro
 
Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++ppd1961
 
I2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoI2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoMike Ochtman
 
Singleton design pattern
Singleton design patternSingleton design pattern
Singleton design pattern11prasoon
 
Design pattern (Abstract Factory & Singleton)
Design pattern (Abstract Factory & Singleton)Design pattern (Abstract Factory & Singleton)
Design pattern (Abstract Factory & Singleton)paramisoft
 
用Raspberry Pi 學Linux I2C Driver
用Raspberry Pi 學Linux I2C Driver用Raspberry Pi 學Linux I2C Driver
用Raspberry Pi 學Linux I2C Driver艾鍗科技
 
I2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingI2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingBhargav Kakadiya
 
IoT - IT 423 ppt
IoT - IT 423 pptIoT - IT 423 ppt
IoT - IT 423 pptMhae Lyn
 

Andere mochten auch (12)

Designing of fifo and serial peripheral interface protocol using Verilog HDL
Designing of fifo and serial peripheral interface protocol using Verilog HDLDesigning of fifo and serial peripheral interface protocol using Verilog HDL
Designing of fifo and serial peripheral interface protocol using Verilog HDL
 
PR_ALT_28072015_SiConTech_acquisition
PR_ALT_28072015_SiConTech_acquisitionPR_ALT_28072015_SiConTech_acquisition
PR_ALT_28072015_SiConTech_acquisition
 
I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24I2C Subsystem In Linux-2.6.24
I2C Subsystem In Linux-2.6.24
 
S3 Group on Code Management - RDK Users Conference 2014
S3 Group on Code Management - RDK Users Conference 2014S3 Group on Code Management - RDK Users Conference 2014
S3 Group on Code Management - RDK Users Conference 2014
 
HKG15-506: Comcast - Lessons learned from migrating the RDK code base to the ...
HKG15-506: Comcast - Lessons learned from migrating the RDK code base to the ...HKG15-506: Comcast - Lessons learned from migrating the RDK code base to the ...
HKG15-506: Comcast - Lessons learned from migrating the RDK code base to the ...
 
Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++
 
I2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduinoI2c interfacing raspberry pi to arduino
I2c interfacing raspberry pi to arduino
 
Singleton design pattern
Singleton design patternSingleton design pattern
Singleton design pattern
 
Design pattern (Abstract Factory & Singleton)
Design pattern (Abstract Factory & Singleton)Design pattern (Abstract Factory & Singleton)
Design pattern (Abstract Factory & Singleton)
 
用Raspberry Pi 學Linux I2C Driver
用Raspberry Pi 學Linux I2C Driver用Raspberry Pi 學Linux I2C Driver
用Raspberry Pi 學Linux I2C Driver
 
I2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingI2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacing
 
IoT - IT 423 ppt
IoT - IT 423 pptIoT - IT 423 ppt
IoT - IT 423 ppt
 

Ähnlich wie I2 c bus

communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemsRaghunath reddy
 
I2C Bus 11.3.2 Unit 2 Design of Embedded systems Ref. Book Ajay Deshmukh
I2C Bus 11.3.2 Unit 2 Design of Embedded systems  Ref. Book Ajay DeshmukhI2C Bus 11.3.2 Unit 2 Design of Embedded systems  Ref. Book Ajay Deshmukh
I2C Bus 11.3.2 Unit 2 Design of Embedded systems Ref. Book Ajay DeshmukhTejas Shetye
 
Slow peripheral interfaces (i2 c spi uart)
Slow peripheral interfaces (i2 c  spi uart)Slow peripheral interfaces (i2 c  spi uart)
Slow peripheral interfaces (i2 c spi uart)PREMAL GAJJAR
 
USART - 8251 / usart-8251A Pallav Shukla
USART - 8251 / usart-8251A Pallav ShuklaUSART - 8251 / usart-8251A Pallav Shukla
USART - 8251 / usart-8251A Pallav ShuklaPallav Shukla
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolI2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolAnkur Soni
 
Raspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsRaspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsMohamed Abdallah
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Dhaval Kaneria
 
Universal synchronous asynchronous receiver transmitter(usart) and AtoD Coverter
Universal synchronous asynchronous receiver transmitter(usart) and AtoD CoverterUniversal synchronous asynchronous receiver transmitter(usart) and AtoD Coverter
Universal synchronous asynchronous receiver transmitter(usart) and AtoD CoverterTejas Shetye
 
8051 serialp port
8051 serialp port8051 serialp port
8051 serialp portTeju Kotti
 
8051 SERIAL PORTS.pptx
8051 SERIAL PORTS.pptx8051 SERIAL PORTS.pptx
8051 SERIAL PORTS.pptxmaheswariM7
 
Master synchronous serial port (mssp)
Master synchronous serial port (mssp)Master synchronous serial port (mssp)
Master synchronous serial port (mssp)babak danyal
 
UNI T 6- SPI_I2C_Lecture8.pptx
UNI                    T 6- SPI_I2C_Lecture8.pptxUNI                    T 6- SPI_I2C_Lecture8.pptx
UNI T 6- SPI_I2C_Lecture8.pptxnaveen088888
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentFastBit Embedded Brain Academy
 
Quick Guide Layer 2 Switching
Quick Guide   Layer 2 SwitchingQuick Guide   Layer 2 Switching
Quick Guide Layer 2 SwitchingCCNAResources
 

Ähnlich wie I2 c bus (20)

communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systems
 
I2C Bus 11.3.2 Unit 2 Design of Embedded systems Ref. Book Ajay Deshmukh
I2C Bus 11.3.2 Unit 2 Design of Embedded systems  Ref. Book Ajay DeshmukhI2C Bus 11.3.2 Unit 2 Design of Embedded systems  Ref. Book Ajay Deshmukh
I2C Bus 11.3.2 Unit 2 Design of Embedded systems Ref. Book Ajay Deshmukh
 
I2C PRESENTATION.PPT
I2C PRESENTATION.PPTI2C PRESENTATION.PPT
I2C PRESENTATION.PPT
 
Slow peripheral interfaces (i2 c spi uart)
Slow peripheral interfaces (i2 c  spi uart)Slow peripheral interfaces (i2 c  spi uart)
Slow peripheral interfaces (i2 c spi uart)
 
USART - 8251 / usart-8251A Pallav Shukla
USART - 8251 / usart-8251A Pallav ShuklaUSART - 8251 / usart-8251A Pallav Shukla
USART - 8251 / usart-8251A Pallav Shukla
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolI2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication Protocol
 
Raspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsRaspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication Protocols
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
 
COM_BASIC.pptx
COM_BASIC.pptxCOM_BASIC.pptx
COM_BASIC.pptx
 
Universal synchronous asynchronous receiver transmitter(usart) and AtoD Coverter
Universal synchronous asynchronous receiver transmitter(usart) and AtoD CoverterUniversal synchronous asynchronous receiver transmitter(usart) and AtoD Coverter
Universal synchronous asynchronous receiver transmitter(usart) and AtoD Coverter
 
8051 serialp port
8051 serialp port8051 serialp port
8051 serialp port
 
8051 SERIAL PORTS.pptx
8051 SERIAL PORTS.pptx8051 SERIAL PORTS.pptx
8051 SERIAL PORTS.pptx
 
ijseas20150367
ijseas20150367ijseas20150367
ijseas20150367
 
Master synchronous serial port (mssp)
Master synchronous serial port (mssp)Master synchronous serial port (mssp)
Master synchronous serial port (mssp)
 
UNI T 6- SPI_I2C_Lecture8.pptx
UNI                    T 6- SPI_I2C_Lecture8.pptxUNI                    T 6- SPI_I2C_Lecture8.pptx
UNI T 6- SPI_I2C_Lecture8.pptx
 
Part-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver developmentPart-2: Mastering microcontroller with embedded driver development
Part-2: Mastering microcontroller with embedded driver development
 
Quick Guide Layer 2 Switching
Quick Guide   Layer 2 SwitchingQuick Guide   Layer 2 Switching
Quick Guide Layer 2 Switching
 
Microcontroller part 9_v1
Microcontroller part 9_v1Microcontroller part 9_v1
Microcontroller part 9_v1
 
USART
USARTUSART
USART
 
Serial Busses.pptx
Serial Busses.pptxSerial Busses.pptx
Serial Busses.pptx
 

Kürzlich hochgeladen

Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 

Kürzlich hochgeladen (20)

Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 

I2 c bus

  • 2. Basic Characteristics  Serial protocol for two-wire interface.  Used in low-speed devices like microcontrollers, EEPROMs, I/O interfaces and other similar peripherals in embedded systems.  Speeds: – 100 kbps (standard mode) – 400 kbps (fast mode) – 3.4 Mbps (high-speed mode) – 5 Mbps Ultra Fast-mode  Data transfers: serial, 8-bit oriented, bi-directional  Master/slave relationships with multi-master option  Master can operate as transmitter or receiver  Addressing: 7bit or 10bit unique addresses
  • 3. Wires and Signals contd..  Two-wired bus – serial data line (SDA) – serial clock line (SCL)  Bit transfer (level triggered) – SCL = 1 ⇒ SDA = valid data – one clock pulse per data bit – stable data during high clocks – data change during low clocks
  • 4. Wires and Signals  Signals –  Start  Stop  Ack  Not Ack  Bus state – free/Idle … after stop and before next Start. (an IDLE bus condition is defined as having both SDA and SCL high) – busy … after Start and before next stop
  • 5. Masters and Slaves  Master device – controls the SCL – starts and stops data transfer – controls addressing of other devices  Slave device – device addressed by master  Transmitter/Receiver – master or slave – master-transmitter sends data to slave-recevier – master-receiver requires data from slave- transmitter
  • 7. I2C Protocol Normally, a standard communication consists of four parts:  START signal generation  Slave address transfer  Data transfer  STOP signal generation
  • 8. START signal generation  Start condition (S) – SDA 1→0 transition when SCL = 1
  • 9. Slave Address Transfer  Slave address bits are transferred after start condition  Transmission is byte oriented  Most significant bit (MSB) first  8 pulses for data bits are followed by one pulse for ack. bit { 7 bits + R/W+ one acknowledge bit }  Ack by slave at 9th SCL clk cycle by pulling SDA low.  Slave address is also datum – first byte transferred – during the first byte transfer: • master is transmitter • addressed slave is receiver
  • 10. Data Transfer  Data transfer starts after successful slave addressing.  Data bits are generated by transmitter as SCL pulses  9-th pulse: – transmitter releases SDA – receiver must hold SDA low in order to ack. received data – slave must release SDA after ack. bit (allows master to end frame)
  • 11. Stop Signal  The master can terminate the communication by generating a STOP signal(P) – SDA 0→1 transition when SCL = 1
  • 13. Clock stretching  Clock stretching is a feature of some slaves.  If no slaves in a system can stretch the clock (hold SCL LOW),  the master need not be designed to handle this procedure.  The transaction cannot continue until the line is released HIGH again.  Clock stretching is optional  most slave devices do not include an SCL driver so they are unable to stretch the clock.
  • 14. Clock stretching ….Contd  Example- On the byte level, a device may be able to receive bytes of data at a fast rate, but needs more time to store a received byte or prepare another byte to be transmitted. Slaves can then hold the SCL line LOW after reception and acknowledgment of a byte to force the master into a wait state until the slave is ready for the next byte transfer in a type of handshake procedure
  • 15. Multiple Masters  more bus controllers can be connected  several masters can start frame at once  synchronization needed on SCL  arbitration needed on SDA  using wired-AND connection to SCL/SDA
  • 16. Synchronization on SCL  frame started SCL = 1  first 10 transition (*) – involved masters restart their clocks – master holds 0 until its low- period is over  master finished its low-period – releases SCL – SCL = 0 switches to wait state, waits for SCL = 1 – SCL = 1 or waiting finished starts counting high-period  first master finished its high-period – sets SCL = 0 – equivalent to (*) state
  • 17. Synchronized Clocks  low-period – determined by max{low-periods of involved masters}  high-period – determined by min{high-periods of involved masters}
  • 18. Arbitration on SDA  frame started, SCL synchronized high periods = valid data  each master generates its data  master aborts if there is another level on SDA than it generates it loses arbitration, releases SDA and tries again when bus is free
  • 19. Notes on Arbitration  can continue for many bits  addresses are compared at first stage  if the same slave is addressed in the same mode (R/W): – masters are transmitters data-bits are compared – masters are receivers acknowledge-bits are compared  if arbitration is not over before stop or repeated start: – comparation not allowed: stop-data, repeated start-data, stop-repeated start – involved masters must generate stops/repeated starts in the same positions  loser can generate SCL pulses for synchronization until the byte is over  losing master which can be also a slave – must switch immediately to slave mode
  • 20. General Call  addresses all devices  device ignores call  not acknowledges address  device accepts call  acknowledges address  R/W = 0 (W)  master-transmitter, slave-receiver  command in the second byte  LSB = 0 (least significant bit) – programmable part of device’s address manipulation – resetting devices  • LSB = 1 – master (e.g. keyboard scanner) doesn’t know where to send data – remaining 7 bits contain master’s address
  • 21. References  The I2C Bus Specification, version 2.1, January 2006  www.opencores.org  http://www.semiconductors.philips.com/buses/i2c