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

External devices that are used to expand a microcontrollerýs internal resources are generally available with a parallel interface but a serial interface is becoming more popular. There is a wide range of such devices, including EEPROMs, display controllers, real-time clocks, A/D and D/A converters, and I/O expanders. Serial thermal sensors, directly connectable to a microcontroller, are offered as well. Serially accessed devices require less wiring and space on printed circuit boards than parallel ones. Thus, printed circuit boards and connectors can be simpler and smaller. Reduced wiring also increases reliability of a system. In some cases, such microcontrollers without an external address and data bus, the application of serial devices enables interaction between the microcontroller and the outside world.

Most serial devices are equipped with a synchronous interface for which they require separate signal lines for transferring data and clock information. The clock, called the master, must be supplied by a microcontroller. This clock frequency does not have to be constant. The master also initiates communication with serial devices called slaves. Often, multiple slaves can use common data and clock lines, with each slave having its own select line or address.

One of the most popular synchronous interfaces is the inter-integrated circuit (I2C), which was developed by Philips nearly 20 years ago. I2C is a low-bandwidth, short-distance, two-wire interface that was originally designed to enable communication between devices inside a TV. Now, I2C interface is implemented in over 1000 different devices. [1] Some microcontrollers have a hardware I2C controller built-in (e.g., the P8xC528 from Philips and the PIC16C6x from Microchip). An all-software implementation of I2C protocol is also possible. Thanks to this method, any microcontroller can communicate with I2C devices. In this article, Iýd like to present such an implementation for the popular 8031 microcontroller.


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