SlideShare a Scribd company logo
I2C 2010/05/13 by Sean Chen
Agenda What’s I2C? I2C Protocol Other I2C Bus I2C components NXP UM1024 Data transfer  How to R/W I2C? Iboot References
What’s I2C? Definition I²C  ( Inter-Integrated Circuit ) is a  multi-master   serial   single-ended   computer bus  invented by  Philips  that is used to attach low-speed peripherals to a  motherboard ,  embedded system , or  cellphone .  Internal Bus (400 kbit/s  Fast mode , 1 Mbit/s  Fast mode plus  or Fm+, and 3.4  Mbit/s   High Speed mode );
I2C Protocol  1/2 protocol Serial Data Line(SDA)  Serial Clock (SCL) RD Pull up resistors Switch on/off Speed per-byte ACK/NACK bits. keywords Master Slaver
I2C Protocol  2/2 Timing diagram Data transfer is initiated with the START bit ( S ) when SDA is pulled low while SCL stays high. Then, SDA sets the transferred bit while SCL is low (blue) and the data is sampled (received) when SCL rises (green). When the transfer is complete, a STOP bit ( P ) is sent by releasing the data line to allow it to be pulled up while SCL is constantly high.
Other I2C Bus Other I2C Bus CBUS compatibility SMBus - System Management Bus is a  single-ended  simple two-wire  bus  for the purpose of lightweight communication. Most commonly it is found in computer motherboards for communication with the power source for ON/OFF instructions.  PMBus - Power Management Bus is a variant of the  System Management Bus  (SMBus) which is targeted at digital management of  power supplies . Like SMBus, it is a relatively slow speed two wire  communications protocol  based on  I²C .  Intelligent Platform Management Interface (IPMI)
NXP UM1024 I2C components
Data transfer Data transfer Master  Slaver Selection (Slave Address) Mode (R/W) Data transfer N bytes + ack
How to R/W I2C? i2c_rx Config Address registers is_write Flase bufferLen Transfer data length unit(bytes) Do I2c_readwrite FSM Case : Start ()? NT=I2CSendRegister: NT=I2CSetup; Case : I2CSendRegister .. … . ST=NT;
Iboot-> I2C.h iboot I2CState I2CStart I2CTx I2CRx I2CSendRegister … . I2CInfo I2CState uint32_t address; uint32_t frequency; uint8_t* buffer; Gpio Interface
Iboot-> I2C.c iBoot->I2C / 2 I2C Bus i2c_setup clock_gate_switch(I2C0_CLOCKGATE, ON); init_i2c(&I2C[0], FrequencyBasePeripheral); settings Frequency; divisorRequired; Prescaler; gpio_custom_io; Methods I2CError  i2c_rx ( int bus, int iicaddr, const uint8_t* registers, int num_regs, void* buffer, int len); I2CError  i2c_tx (int bus, int iicaddr, void* buffer, int len);
References I2C protocol  原理及應用   http://jyhshin3.blogspot.com/2009/04/ic-inter-integrated-circuit.html NXP UM10204.pdf http://www.nxp.com/documents/user_manual/UM10204.pdf WiKi I2C http://en.wikipedia.org/wiki/I%C2%B2C

More Related Content

PPTX
I2c protocol - Inter–Integrated Circuit Communication Protocol
PDF
I2C Bus (Inter-Integrated Circuit)
PDF
I2C BUS PROTOCOL
PPTX
AMBA AHB 5
PPTX
PPTX
I2C Protocol
PPT
I2C Protocol
PPTX
I2C introduction
I2c protocol - Inter–Integrated Circuit Communication Protocol
I2C Bus (Inter-Integrated Circuit)
I2C BUS PROTOCOL
AMBA AHB 5
I2C Protocol
I2C Protocol
I2C introduction

What's hot (20)

PDF
The I2C Interface
PPTX
Introduction about APB Protocol
PPTX
AMBA Ahb 2.0
PPT
ODP
axi protocol
PPTX
I2 c protocol
PPTX
8251 USART
PDF
Pre-Si Verification for Post-Si Validation
PPTX
Advance Peripheral Bus
PPT
Axi protocol
PPTX
I2C Protocol
PPTX
AMBA 3 APB Protocol
ODP
PPT
PPT
Uart
PPTX
I2C-Bus Design and Verification Specs
PPT
SPI Bus Protocol
ODP
APB protocol v1.0
PPTX
Ambha axi
PPTX
Amba axi 29 3_2015
The I2C Interface
Introduction about APB Protocol
AMBA Ahb 2.0
axi protocol
I2 c protocol
8251 USART
Pre-Si Verification for Post-Si Validation
Advance Peripheral Bus
Axi protocol
I2C Protocol
AMBA 3 APB Protocol
Uart
I2C-Bus Design and Verification Specs
SPI Bus Protocol
APB protocol v1.0
Ambha axi
Amba axi 29 3_2015
Ad

Viewers also liked (13)

PPTX
I2C BUS
PDF
SPI Protocol
PPTX
Serial peripheral interface
PPT
Serial Peripheral Interface(SPI)
PDF
Verification of amba axi bus protocol implementing incr and wrap burst using ...
PPT
Computer Architecture: A quantitative approach - Cap4 - Section 2
PPTX
Reference Signal for LTE-Advanced
PPSX
Serial Peripherical Interface (SPI)
PDF
SPI Protocol in LPC2148
PDF
Lpc2148 i2c
PPT
Unit 4 memory system
PPTX
Memory organisation
PPT
Memory management
I2C BUS
SPI Protocol
Serial peripheral interface
Serial Peripheral Interface(SPI)
Verification of amba axi bus protocol implementing incr and wrap burst using ...
Computer Architecture: A quantitative approach - Cap4 - Section 2
Reference Signal for LTE-Advanced
Serial Peripherical Interface (SPI)
SPI Protocol in LPC2148
Lpc2148 i2c
Unit 4 memory system
Memory organisation
Memory management
Ad

Similar to I2 c (20)

PDF
I2 c devices
PDF
PPT
I2C PRESENTATION.PPT
PPTX
INTRODUCTION TO INTER INTEGRATED CIRCUIT PROTOCOL
PPT
I2C Bus 11.3.2 Unit 2 Design of Embedded systems Ref. Book Ajay Deshmukh
PPTX
seial pheripheral interface and inter integrated circuitsi2c.pptx
PPTX
Linux I2C
PPTX
Part-2: Mastering microcontroller with embedded driver development
PPTX
I2c buses
PPTX
Inter intergrated circuits-communication protocol
PPTX
serial_busses_i2c.pptx
PDF
PDF
ELC 2016 - I2C hacking demystified
PPTX
Slow peripheral interfaces (i2 c spi uart)
PPTX
I2C presentation for Microcontrollers and Microprocessors
PDF
Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDL
PPTX
Serial Busses.pptx
PDF
I2c drivers
PDF
I2c drivers
DOCX
project 3 full report
I2 c devices
I2C PRESENTATION.PPT
INTRODUCTION TO INTER INTEGRATED CIRCUIT PROTOCOL
I2C Bus 11.3.2 Unit 2 Design of Embedded systems Ref. Book Ajay Deshmukh
seial pheripheral interface and inter integrated circuitsi2c.pptx
Linux I2C
Part-2: Mastering microcontroller with embedded driver development
I2c buses
Inter intergrated circuits-communication protocol
serial_busses_i2c.pptx
ELC 2016 - I2C hacking demystified
Slow peripheral interfaces (i2 c spi uart)
I2C presentation for Microcontrollers and Microprocessors
Design &Implementation of I2C Master Controller Interfaced With RAM Using VHDL
Serial Busses.pptx
I2c drivers
I2c drivers
project 3 full report

More from sean chen (20)

PPTX
Demo
PDF
Uvm presentation dac2011_final
PPT
Uvm dcon2013
PDF
Example my hdl
PPT
0021.system partitioning
PPT
0015.register allocation-graph-coloring
PPT
0006.scheduling not-ilp-not-force
PDF
Lecture07
PDF
Lecture04
PDF
Lecture03
ODP
Dominator tree
PDF
Work items
PDF
Work items
ODP
ocelot
PDF
Lect.10.arm soc.4 neon
ODP
Image scalar hw_algorithm
PPT
Virtual platform
PPT
PPT
Serializer
PPT
Defense
Demo
Uvm presentation dac2011_final
Uvm dcon2013
Example my hdl
0021.system partitioning
0015.register allocation-graph-coloring
0006.scheduling not-ilp-not-force
Lecture07
Lecture04
Lecture03
Dominator tree
Work items
Work items
ocelot
Lect.10.arm soc.4 neon
Image scalar hw_algorithm
Virtual platform
Serializer
Defense

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
KodekX | Application Modernization Development
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Approach and Philosophy of On baking technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Spectral efficient network and resource selection model in 5G networks
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Building Integrated photovoltaic BIPV_UPV.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
MYSQL Presentation for SQL database connectivity
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Unlocking AI with Model Context Protocol (MCP)
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Machine learning based COVID-19 study performance prediction
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Per capita expenditure prediction using model stacking based on satellite ima...
Chapter 3 Spatial Domain Image Processing.pdf
KodekX | Application Modernization Development
CIFDAQ's Market Insight: SEC Turns Pro Crypto
NewMind AI Weekly Chronicles - August'25 Week I
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Approach and Philosophy of On baking technology
Network Security Unit 5.pdf for BCA BBA.
The Rise and Fall of 3GPP – Time for a Sabbatical?
Spectral efficient network and resource selection model in 5G networks

I2 c

  • 1. I2C 2010/05/13 by Sean Chen
  • 2. Agenda What’s I2C? I2C Protocol Other I2C Bus I2C components NXP UM1024 Data transfer How to R/W I2C? Iboot References
  • 3. What’s I2C? Definition I²C ( Inter-Integrated Circuit ) is a multi-master serial single-ended computer bus invented by Philips that is used to attach low-speed peripherals to a motherboard , embedded system , or cellphone . Internal Bus (400 kbit/s Fast mode , 1 Mbit/s Fast mode plus or Fm+, and 3.4 Mbit/s High Speed mode );
  • 4. I2C Protocol 1/2 protocol Serial Data Line(SDA) Serial Clock (SCL) RD Pull up resistors Switch on/off Speed per-byte ACK/NACK bits. keywords Master Slaver
  • 5. I2C Protocol 2/2 Timing diagram Data transfer is initiated with the START bit ( S ) when SDA is pulled low while SCL stays high. Then, SDA sets the transferred bit while SCL is low (blue) and the data is sampled (received) when SCL rises (green). When the transfer is complete, a STOP bit ( P ) is sent by releasing the data line to allow it to be pulled up while SCL is constantly high.
  • 6. Other I2C Bus Other I2C Bus CBUS compatibility SMBus - System Management Bus is a single-ended simple two-wire bus for the purpose of lightweight communication. Most commonly it is found in computer motherboards for communication with the power source for ON/OFF instructions. PMBus - Power Management Bus is a variant of the System Management Bus (SMBus) which is targeted at digital management of power supplies . Like SMBus, it is a relatively slow speed two wire communications protocol based on I²C . Intelligent Platform Management Interface (IPMI)
  • 7. NXP UM1024 I2C components
  • 8. Data transfer Data transfer Master Slaver Selection (Slave Address) Mode (R/W) Data transfer N bytes + ack
  • 9. How to R/W I2C? i2c_rx Config Address registers is_write Flase bufferLen Transfer data length unit(bytes) Do I2c_readwrite FSM Case : Start ()? NT=I2CSendRegister: NT=I2CSetup; Case : I2CSendRegister .. … . ST=NT;
  • 10. Iboot-> I2C.h iboot I2CState I2CStart I2CTx I2CRx I2CSendRegister … . I2CInfo I2CState uint32_t address; uint32_t frequency; uint8_t* buffer; Gpio Interface
  • 11. Iboot-> I2C.c iBoot->I2C / 2 I2C Bus i2c_setup clock_gate_switch(I2C0_CLOCKGATE, ON); init_i2c(&I2C[0], FrequencyBasePeripheral); settings Frequency; divisorRequired; Prescaler; gpio_custom_io; Methods I2CError i2c_rx ( int bus, int iicaddr, const uint8_t* registers, int num_regs, void* buffer, int len); I2CError i2c_tx (int bus, int iicaddr, void* buffer, int len);
  • 12. References I2C protocol 原理及應用 http://jyhshin3.blogspot.com/2009/04/ic-inter-integrated-circuit.html NXP UM10204.pdf http://www.nxp.com/documents/user_manual/UM10204.pdf WiKi I2C http://en.wikipedia.org/wiki/I%C2%B2C