I2C FAQ V1.3

Contents:



1) About the Author

This article is a collection of information sources on the I2C Bus

Author: Vincent Himpe
E-mail: Vincent.himpe@ping.be
Last-modified: 08 Jul 1995
Version: 1.3
Archive-name: I2C-BUS-FAQ

My signature:

--------------------------------------------------------------
Vincent Himpe
                                                 /////
Internet:                                        O  *)
   vincent.himpe@ping.be                          /
   vi_himpe@mietec.be                            \__/
Fido:
  2:291/1912.8

You can visit my Homepages: http://www.ping.be/~ping0751

God has put me on earth to do a certain number of things.
Right now I'm so far behind I'll probably never die.
--------------------------------------------------------------


2) Disclaimer

I disclaim everything. The contents of this article might be totally inaccurate, inappropriate, misguided, or otherwise perverse - except for my name (hopefully I got that right).


3) Copyright

Copyright (c) 1995 by Vincent Himpe, all rights reserved.


4) Preface

Hi and welcome to the Third edition of the I2C FAQ.

Some sections have been re-arranged or partially re-written. Some new sections give an address list and roadmap to I2C devices (which is not complete for the moment. Only Philips devices are incorporated. More to come in the next release).

[filipg - the next paragraph does NOT apply to THIS HTML version of this FAQ. This version comes in ONE part]

Furthermore the FAQ has been split into 2 pieces. This is due to the fact that some Usenet tools have problems accessing files larger then 64Kbyte. (Current FAQ is over 75 Kbytes long).

There is also a Q&A section and troubleshooting guide. These two are based on questions I got from people who start to use the bus.

I get lots of replies from people that want to know if this faq has been archived yet. Well it hasn't. I have two problems here.

  1. I do not have space enough to store it. (My net provider only allows 50K storage space)

  2. I don't know of public sites where you can upload this kind of stuff nor how to do it. I know of sites like SIMTEL and so but I don't know if you can post this kind of information there. Neither do I know how to do it. (By FTP I suppose but I guess you will need approval of your upload from the maintainers of these sites)

If someone has a solution for this please feel free to contact me.

The 'hull' of this FAQ was taken from the 8051-FAQ by Russ Hersh. Also check out that one. It's a great lead for people interested in I2C. Lot's of 8051 clones have an I2C controller on board. Hope its useful to you guys and girls out there.

Keep those replies coming

Regards,

Vincent


5) Acknowledgments

As usual greetings go to:

Russ Hersh
For allowing the use of this layout, saved me lots of typing
Phil Wood
For giving additional information on books available from Philips. Phil is a sales manager for Philips components in the USA and can be reached via E-Mail: woodp@zilker.net

Stephen Phillips
For pointing out grammatical errors.

English is not my natural language but I guess you figured that one out already.

The guys from Philips PCALE Eindhoven.
Ian Willis


6) ABOUT THIS FAQ


6.1) Who put this FAQ together?

I put this FAQ together in response to my own frustration in searching for information about I2C. I've been playing with the bus for some time and, although I am not an expert on this matter, I think my, and other people's, experiences with the I2C BUS can solve common problems.


6.2) How can I contribute to this FAQ?

If you have any suggestions or additions please inform me.

You can contact me:

    By e-mail:    Internet  : Vincent.himpe@ping.be (preferred)
                              vi_himpe@mietec.be
                  Fido      : 2:291/1912.8

    By Snail-Mail:    Vincent Himpe
                      A.De Taeyelaan 12
                      8792 Desselgem
                      Belgium

I hope that those of you who know of interesting items for this FAQ will share with everyone by contributing to this list. A good amount of stuff is turning up thanks to everyone's help.

If you are a manufacturer and have an anonymous ftp site or BBS available that has information and/or tools for the I2C Bus please let me know by EMail so that I can add it to this FAQ. Also, please feel free to update me on new products.


6.3) What newsgroups will this FAQ be posted to?

This FAQ will be posted to the following newsgroups:

          comp.protocols.misc
          sci.electronics

These newsgroups often contain discussions, announcements, or information about I2C. Check them out from time to time.

The schedule for posting will be once a month. I can't promise that it will be on time, but I hope to post it by the end of each month.


6.4) May I post this FAQ to my local BBS?

I am putting no restrictions on the use of this FAQ except - It must be distributed in its entirety with the copyright notice, and no financial gain may be realized from it. After all, I have spent, and continue to spend, a lot of time on this. The only thing that I intend to gain from it is more information on I2C.

For this reason I have appended a copyright statement to the end of this FAQ. I feel pretty silly doing this, but I just want to protect myself. The copyright does not limit the use of this FAQ for non-commercial purposes. I hereby give my permission to one and all to pass this FAQ around and post it wherever you want - as long as it is not for financial gain.

You are allowed to distribute portions of the FAQ as long as you incorporate the following note:

"Taken from The I2C FAQ as posted in SCI.ELECTRONICS."

Thank you.


6.5) Other interesting FAQ's

Microcontroller FAQs

      Subject:  PIC microcontrollers
      Newsgroups:  comp.realtime
                   comp.robotics
                   sci.electronics
      Maintainer:  Tom Kellett
                   Tom@takdsign.demon.co.uk

      Subject:  68hc11 microcontrollers
      Newsgroups:  comp.realtime
                   comp.robotics
                   sci.electronics
      Archive:  rtfm.mit.edu:   <plus all mirror sites>
                /pub/usenet/comp.answers/microcontroller-faq/68hc11
                /pub/usenet/sci.answers/microcontroller-faq/68hc11
                /pub/usenet/news.answers/microcontroller-faq/68hc11
      Maintainer:  Russ Hersch
                   Email: sibit@datasrv.co.il

      Subject:  Microcontroller primer and FAQ
      Newsgroups:  comp.sys.intel
                   comp.realtime
                   comp.robotics
                   sci.electronics
                   alt.comp.hardware.homebuilt
      Archive:  rtfm.mit.edu:   <plus all mirror sites>
                /pub/usenet/comp.answers/microcontroller-faq/primer
                /pub/usenet/sci.answers/microcontroller-faq/primer
                /pub/usenet/news.answers/microcontroller-faq/primer
      Maintainer:  Russ Hersch
                   Email:  sibit@datasrv.co.il

Additional FAQs of interest

      Subject:  Robotics
      Newsgroups:  comp.robotics
      Maintainer:  Kevin Dowling
                   (412)268-8830
                   Email:  nivek@ri.cmu.edu
                   Smail:  Carnegie Mellon University
                           The Robotics Institute
                           Pittsburgh, PA 15213

      Subject:  Electronics
      Newsgroups:  sci.electronics
      Comments:  There are a number of FAQs available in this newsgroup
                 on various subjects.  Among some of the subjects covered
                 are: LCDs, stepper motors, etc

      FAQ subject:  Real-time
      Newsgroups:  comp.realtime
                   comp.answers
                   news.answers
      Archive:  rtfm.mit.edu:  pub/usenet/comp.realtime
      Maintainer:  Mark Linimon
                       Lonesome Dove Computing Services
                       Roanoke, Virginia
                   Email: linimon@nominil.lonesome.com

      Subject:  Motorola 68K microprocessor line
      Newsgroups:  comp.sys.m68k
      Archive:  bode.ee.ualberta.ca : pub/motorola/general
                ftp.luth.se : /pub/misc/motorola/faq
                file name of archive is m68kfaq?.zip (? is version)
      Maintainer:  Robert Boys - Ontario, Canada
                   Email: r.boys@genie.geis.com
                                 or
                          fboys@uoguelph.ca


7) ABOUT THE I2C Bus


7.1) Historical background

The I2C bus was developed in the early 1980's by Philips semiconductors. It's purpose was to provide an easy way to connect a CPU to peripheral chips in a TV-set.

Normal Computer systems use ByteWide buses to accomplish this task. This results in lots of copper tracks on PCB's to route the Address and datalines. Not to mention a bunch of address decoders and glue logic to connect everything. In mass production items such as TV-sets, VCR's and audio equipment this is not acceptable. Furthermore lots of control lines implies that the systems is more susceptible to disturbances by EMC and ESD. The research done by Philips Labs in Eindhoven (The Netherlands) resulted in a 2 wire communication bus called the I2C bus.

I2C is an acronym for Inter-IC bus. It's name literally explains it's purpose: to provide a communication link between Integrated Circuits.

Nowadays the extent of the bus goes much further than Audio and Video equipment. The bus is generally accepted in industry. Offspring like D2B and ACCESS bus find their ways into computer peripherals like keyboards, mice, printers, monitors, etc. The I2C BUs has been adopted by several leading chip manufacturers like Xicor, SGS-Thomson, Siemens, Intel, TI, Maxim, Atmel, and Analog Devices.


7.2) I2C Bus protocol

The BUS physically consists of 2 active wires and a ground connection. The active wires, SDA and SCL, are both bidirectional. Where SDA is the Serial DAta line and SCL is the Serial CLock line.

Every component hooked up to the bus has its own unique address whether it is a CPU, LCD driver, memory, or complex function chip. Each of these chips can act as a receiver and/or transmitter depending on it's functionality. Obviously an LCD driver is only a receiver, while a memory or I/O chip can both be transmitter and receiver. Furthermore there may be one or more BUS MASTER's.

The BUS MASTER is the chip issuing the commands on the BUS. In the I2C protocol specification it is stated that the IC that initiates a data transfer on the bus is considered the BUS MASTER. At that time all the others are regarded to as the BUS SLAVEs.

As mentioned before, the IC bus is a Multi-MASTER BUS. This means that more than one IC capable of initiating data transfer can be connected to it. As MASTERs are generally microcomputers let's take a look at a general 'inter-IC chat' on the bus.

Lets consider the following setup:

    --------                    ------------
    | CPU  |-----------o--------| I/O port |
    --------           |        ------------
                       |
                       |        ------------
                       +--------| Memory   |
                                ------------

Case: The CPU wants to talk to the I/O port.

The CPU will issue a START condition (see further on for description of all these conditions) This acts as an 'ATTENTION' signal to all of the connected ic's. ALL IC's on the bus will listen to the bus for incoming data.

Then the CPU sends the address of the device