You are here

I2C Bus

I2C is a two-wired serial bus developed by Philips (now NXP) in the early '80s. Currently, the I2C bus is widely used for interconnection of single-chip microcontrollers, memory chips (EEPROM), analogue-to-digital and digital-to-analog converters, pressure and temperature sensors as well as a variety of other peripheral devices.

I2C bus specification describes four operating speed categories for bidirectional data transfer:

Standard-mode (Sm) a bit rate up to 100 kbit/s
Fast-mode (Fm) a bit rate up to 400 kbit/s
Fast-mode Plus (Fm+) a bit rate up to 1 Mbit/s
High-speed mode (Hs-mode) a bit rate up to 3.4 Mbit/s

I2C bus uses two lines - SDA (data line) and SCL (clock line).

I2C Bus

The data is transmitted between two devices - Master and Slave. Master initiates data transfer and generates the synchronization signals. Slave begins data transmission only after master requests it.

Multiple master and slave devices can be connected to the same bus. Later we will discuss the role of each of them, but now it is important to understand how they can transmit data on the same wire, avoiding conflicts.

All devices are connected to the bus via an open collector or open drain. With this connection, the device may output either a logic zero or nothing at all (the output is in the high impedance state).

If outputs of all connected devices are in the high-impedance state, the two external pull-up resistors Rp will hold the lines at high voltage level (logic 1 state). A typical value for these resistors ranges from 1 K to 10 K. 

I2C bus multimaster

If one or more devices output logic 0, they set the line voltage to low level. The bus is considered to be free when no transmission happens and both lines are in the logic 1 state.

In later chapters, we will examine in detail a variety of options for connecting devices to the I2C bus. Now let's move on and study the I2C protocol by the example of one data byte transmission from the I2C bus master to the slave.

I2C Data Byte Transfer

This waveform can be divided into seven parts:

  • generation of the START (S) condition
  • transmission of the slave device address (0x51)
  • data direction bit (read or write)
  • acknowledgment (ACK) of the slave device address
  • transmission of the data byte
  • acknowledgment (ACK) of the data byte
  • generation of the STOP (P) condition

We will discuss all seven parts of this waveform in I2C Byte Transfer section. Now lets turn our attention to the transmission of one data bit by the I2C bus.​

 

I2C Bit

While transferring data, values on the SDA line are changed when the SCL line is LOW. When the SCL line is HIGH, the receiver reads the data bit (the state of the SDA line). At this point the value of the SDA line must be stable.

Rating: 
Average: 5 (6 votes)
Raina Rawlings Raina
Raina Rawlings Raina's picture
Offline
Last seen: 6 months 1 week ago
Joined: 11/11/2018 - 09:10
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

That is really attention-grabbing, You're a very professional blogger.
I've joined your rss feed and look ahead to seeking
more of your great post. Additionally, I have shared your <a href="http://prima-ballett.de/user/RogelioEdmondson/">net gambling site</a> in my social networks

Chu Sanford Chu
Chu Sanford Chu's picture
Offline
Last seen: 7 hours 56 min ago
Joined: 01/24/2019 - 14:31
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

Amazing! Its truly amazing paragraph, I have got much clear idea regaqrding
from this paragraph.

My site: buzzfeed diy teeth wwhitening ( Forrest -
http://forum.sevencode.ir/entry.php?72713-What-You-Should-Find-Out-About-Caring-For-Your-Tooth )

Chu Sanford Chu
Chu Sanford Chu's picture
Offline
Last seen: 7 hours 56 min ago
Joined: 01/24/2019 - 14:31
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

Amazing! Its truly amazing paragraph, Ihave got
much clear idea regardding from this paragraph.

mywebsite :: buszfeed diy teeth whitening ( Forrest - http://forum.sevencode.ir/entry.php?72713-What-You-Should-Find-Out-About-Caring-For-Your-Toith )

Dante Bleau Dante
Dante Bleau Dante's picture
Offline
Last seen: 3 months 13 hours ago
Joined: 02/21/2019 - 06:31
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

Hey! I know this is kinda off topic but I was wondering if you knew where I could get
a captcha plugin for my comment form? I'm using the same blog platform as yours and I'm having trouble
finding one? Thanks a lot! viagra prices - https://charter.education/scandal/index.php?title=Viagra_Coupons_-_The_Story

Dante Bleau Dante
Dante Bleau Dante's picture
Offline
Last seen: 3 months 13 hours ago
Joined: 02/21/2019 - 06:31
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

Hey! I know this is kinda off topic but I was wondering if you knew where
I could get a captcha plugin for my comment form? I'm using the
same blog platform as yours and I'm having trouble finding one?
Thanks a lot! viagra prices - https://charter.education/scandal/index.php?title=Viagra_Coupons_-_The_Story

Linette Benjami...
Linette Benjamin Linette's picture
Offline
Last seen: 2 months 4 weeks ago
Joined: 02/23/2019 - 06:31
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

The other day, while I was at work, my cousin stole my apple ipad and tested to see if it can survive a thirty foot drop,
just so she can be a youtube sensation. My iPad is
now broken and she has 83 views. I know this is totally off
topic but I had to share it with someone! viagra - https://forum.arthas-legion.de/user/17462-geosonia2/

Linette Benjami...
Linette Benjamin Linette's picture
Offline
Last seen: 2 months 4 weeks ago
Joined: 02/23/2019 - 06:31
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

The other day, while I was at work, my cousin stole my apple
ipad and tested to see if it can survive a thirty
foot drop, just so she can be a youtube sensation. My iPad is now broken and she has
83 views. I know this is totally off topic but
I had to share it with someone! viagra - https://forum.arthas-legion.de/user/17462-geosonia2/

Deanna Gholson ...
Deanna Gholson Deanna's picture
Offline
Last seen: 2 months 4 weeks ago
Joined: 02/23/2019 - 14:37
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

I am really inspired along with your writing talents and also with the structure for
your blog. Is that this a paid theme or did you customize it your
self? Either way keep up the excellent quality writing,
it is uncommon to see a nice blog like this one today..

My web-site: Deniz Nakliye - https://www.dmgtransport.com/

Deanna Gholson ...
Deanna Gholson Deanna's picture
Offline
Last seen: 2 months 4 weeks ago
Joined: 02/23/2019 - 14:37
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

I am really inspired along with your writing talents and also with the structure for your blog.
Is that this a paid theme or did you customize it your self?
Either way keep up the excellent quality writing, it is
uncommon to see a nice blog like this one today..

Here is my site; Deniz Nakliye - https://www.dmgtransport.com/

Madeleine Fitzs...
Madeleine Fitzsimons Madeleine's picture
Offline
Last seen: 2 months 1 week ago
Joined: 03/09/2019 - 20:48
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

Thankfulness to my father who told me about thgis webpage, this webpage is really awesome.

my web page; Adana No Touch - https://cukurovagoz.com.tr/

Madeleine Fitzs...
Madeleine Fitzsimons Madeleine's picture
Offline
Last seen: 2 months 1 week ago
Joined: 03/09/2019 - 20:48
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

Thankfulness to my father who told me about this webpage, this webpage is really awesome.

My blog; Adana No Touch - https://cukurovagoz.com.tr/

Fatima Cowart Fatima
Fatima Cowart Fatima's picture
Offline
Last seen: 3 weeks 2 days ago
Joined: 04/25/2019 - 11:53
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

This iis my first time pay a visit at ere and i am genuinely happy to read all aat single place.

my blg :: ladies gold ings with prices; Mindy - http://bling.ie/ ,

Fatima Cowart Fatima
Fatima Cowart Fatima's picture
Offline
Last seen: 3 weeks 2 days ago
Joined: 04/25/2019 - 11:53
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

This is mmy fitst time pay a visit at here and i am genuinely happy too read all at single place.

Check out myy blopg post :: ladies gold rings wikth prices;
Mindy - http://bling.ie/ ,

Kenny Buie Kenny
Kenny Buie Kenny's picture
Offline
Last seen: 1 week 3 days ago
Joined: 05/12/2019 - 13:38
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

Goood day! I just want to give you a big thumbs up for the excellent info you hhave got here on this post.
I am returning tto your blog for more soon.

Also visit my web-site :: diyet tavsiyeleri - https://Beklentiler.com/

Kenny Buie Kenny
Kenny Buie Kenny's picture
Offline
Last seen: 1 week 3 days ago
Joined: 05/12/2019 - 13:38
I2C Bus | USB-I2C/SPI/GPIO Interface Adapters

Goodd day! I just want to give you a big thumbs up foor the excellent
info you have got here on this post. I am returning tto you blog for moree soon.

my homepage diyet tavsiyeleri - https://Beklentiler.com/

Languages

User login