SlideShare a Scribd company logo
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
!!!!!!!!!!!!!!!

More Related Content

What's hot

I2 c protocol
I2 c protocolI2 c protocol
I2 c protocol
Azad Mishra
 
I2C Bus (Inter-Integrated Circuit)
I2C Bus (Inter-Integrated Circuit)I2C Bus (Inter-Integrated Circuit)
I2C Bus (Inter-Integrated Circuit)Varun Mahajan
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral Interface
Anurag Tomar
 
SPI Protocol
SPI ProtocolSPI Protocol
SPI Protocol
Anurag Tomar
 
AXI Protocol.pptx
AXI Protocol.pptxAXI Protocol.pptx
AXI Protocol.pptx
Yazan Yousef
 
Axi
AxiAxi
I2C
I2CI2C
APB protocol v1.0
APB protocol v1.0APB protocol v1.0
APB protocol v1.0
Azad Mishra
 
The I2C Interface
The I2C InterfaceThe I2C Interface
The I2C Interface
Corrado Santoro
 
Spi master core verification
Spi master core verificationSpi master core verification
Spi master core verificationMaulik Suthar
 
Axi protocol
Axi protocolAxi protocol
Axi protocol
Rohit Kumar Pathak
 
SPI Bus Protocol
SPI Bus ProtocolSPI Bus Protocol
SPI Bus Protocol
Sudhanshu Janwadkar
 
Apb
ApbApb
Amba axi 29 3_2015
Amba axi 29 3_2015Amba axi 29 3_2015
Amba axi 29 3_2015
kiemnhatminh
 
Introduction about APB Protocol
Introduction about APB ProtocolIntroduction about APB Protocol
Introduction about APB Protocol
Pushpa Yakkala
 
Pc ie tl_layer (3)
Pc ie tl_layer (3)Pc ie tl_layer (3)
Pc ie tl_layer (3)
Rakeshkumar Sachdev
 
AMBA AHB 5
AMBA AHB 5AMBA AHB 5
AMBA AHB 5
SUNODH GARLAPATI
 
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
Ankur Soni
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
Dhaval Kaneria
 
I2C-Bus Design and Verification Specs
I2C-Bus Design and Verification SpecsI2C-Bus Design and Verification Specs
I2C-Bus Design and Verification Specs
Mostafa Khamis
 

What's hot (20)

I2 c protocol
I2 c protocolI2 c protocol
I2 c protocol
 
I2C Bus (Inter-Integrated Circuit)
I2C Bus (Inter-Integrated Circuit)I2C Bus (Inter-Integrated Circuit)
I2C Bus (Inter-Integrated Circuit)
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral Interface
 
SPI Protocol
SPI ProtocolSPI Protocol
SPI Protocol
 
AXI Protocol.pptx
AXI Protocol.pptxAXI Protocol.pptx
AXI Protocol.pptx
 
Axi
AxiAxi
Axi
 
I2C
I2CI2C
I2C
 
APB protocol v1.0
APB protocol v1.0APB protocol v1.0
APB protocol v1.0
 
The I2C Interface
The I2C InterfaceThe I2C Interface
The I2C Interface
 
Spi master core verification
Spi master core verificationSpi master core verification
Spi master core verification
 
Axi protocol
Axi protocolAxi protocol
Axi protocol
 
SPI Bus Protocol
SPI Bus ProtocolSPI Bus Protocol
SPI Bus Protocol
 
Apb
ApbApb
Apb
 
Amba axi 29 3_2015
Amba axi 29 3_2015Amba axi 29 3_2015
Amba axi 29 3_2015
 
Introduction about APB Protocol
Introduction about APB ProtocolIntroduction about APB Protocol
Introduction about APB Protocol
 
Pc ie tl_layer (3)
Pc ie tl_layer (3)Pc ie tl_layer (3)
Pc ie tl_layer (3)
 
AMBA AHB 5
AMBA AHB 5AMBA AHB 5
AMBA AHB 5
 
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
 
Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
 
I2C-Bus Design and Verification Specs
I2C-Bus Design and Verification SpecsI2C-Bus Design and Verification Specs
I2C-Bus Design and Verification Specs
 

Viewers also liked

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
Jay 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 2014
S3 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 arduino
Mike Ochtman
 
Singleton design pattern
Singleton design patternSingleton design pattern
Singleton design pattern
11prasoon
 
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 interfacing
Bhargav Kakadiya
 
IoT - IT 423 ppt
IoT - IT 423 pptIoT - IT 423 ppt
IoT - IT 423 pptMhae Lyn
 

Viewers also liked (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
 

Similar to 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 systems
Raghunath 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 Deshmukh
Tejas Shetye
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
Sudhanshu Janwadkar
 
I2C PRESENTATION.PPT
I2C PRESENTATION.PPTI2C PRESENTATION.PPT
I2C PRESENTATION.PPT
venkatesh405785
 
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 Shukla
Pallav Shukla
 
SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)
SUNODH GARLAPATI
 
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
Mohamed Abdallah
 
COM_BASIC.pptx
COM_BASIC.pptxCOM_BASIC.pptx
COM_BASIC.pptx
BhagvatShukla
 
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
Tejas Shetye
 
8051 serialp port
8051 serialp port8051 serialp port
8051 serialp port
Teju Kotti
 
8051 SERIAL PORTS.pptx
8051 SERIAL PORTS.pptx8051 SERIAL PORTS.pptx
8051 SERIAL PORTS.pptx
maheswariM7
 
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.pptx
naveen088888
 
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
FastBit Embedded Brain Academy
 
Quick Guide Layer 2 Switching
Quick Guide   Layer 2 SwitchingQuick Guide   Layer 2 Switching
Quick Guide Layer 2 Switching
CCNAResources
 
Microcontroller part 9_v1
Microcontroller part 9_v1Microcontroller part 9_v1
Microcontroller part 9_v1
Keroles karam khalil
 
Serial Busses.pptx
Serial Busses.pptxSerial Busses.pptx
Serial Busses.pptx
ssuser1542b11
 

Similar to 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 Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
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
 
SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)SPI introduction(Serial Peripheral Interface)
SPI introduction(Serial Peripheral Interface)
 
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
 
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
 

Recently uploaded

Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 

Recently uploaded (20)

Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 

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