ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

THE SOFTWARE IMPLEMENTATION OF I2C PROTOCOL


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

SOFTWARE IMPLEMENTATION OF I2C PROTOCOL

Applications
by Dariusz Caban

Start ý The Bus ý The Protocol ý The Process ý Conclusions ý Sources and PDF

THE BUS

The I2C interface is modest in its hardware resource requirements, because only a single pair of signal lines is needed: serial data (SDA) and serial clock (SCL) (see Figure 1). Both lines are bidirectional and must be connected to a positive supply voltage via pull-up resistors. The SDA and SCL pins of each device also must have an open drain or open collector in order to perform the wired AND function. Data can be transferred at a rate of up to 100 kbps in Standard mode, up to 400 kbps in Fast mode, and up to 3.4 Mbps in High-Speed mode. Each slave on the bus is identified by a unique address.

(Click here to enlarge)

Figure 1ýHere you can see how the I2C devices connect to the microcontroller.

In Standard mode, 7-bit addressing is used. In other modes, slaves can have 7- or 10-bit addresses. The number of devices that can be connected to the same bus is limited by the maximum bus capacitance of 400 pF.

The I2C bus can be controlled by more than one master. If two or more masters simultaneously initiate data transfer, collision is detected and an arbitration procedure is performed. The arbitration doesnýt cause data corruption, however, most system designs include only one master.

Only the master generates the clock, but transmission speed can be adjusted to the internal operating rate of the addressed slave. This adjustment is made by clock stretching, in which the slave keeps the SCL pulled low until it is ready to continue.

PREVIOUS NEXT


Circuit Cellar provides up-to-date information for engineers. Visit www.circuitcellar.com for more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com or subscribe online. ýCircuit Cellar, the Magazine for Computer Applications. Posted with permission.
 
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ