![]()
BACK ABOUT 1980, when digital ICs were really starting to be
used in consumer gear such as car radios, stereo systems and TV sets, Philips
developed a low-cost interfacing tech- These days, I2C is found not just in consumer audio and video gear but in computer and industrial equipment as well. In fact, it’s now used in over 1000 ICs, made by more than 50 different companies worldwide. So it’s well worth knowing how this very versatile bus works. I2C is usually described as a 2-wire synchronous serial bus, although strictly speaking it’s a 3-wire bus because the PC board’s ground line is also an essential part of the communications link. The two nominal wires or "lines" are the data or SDA line and the clock or SCL line. Both of these lines are regarded as bidirectional and to allow this they are both used in wired-OR or "open drain/open collector" mode. This means that both lines are connected to the PC board’s positive supply rail only via pull-up resistors and can only be pulled down to logic low (or ground potential) by the circuitry inside the chips connected to the bus lines. So strictly speaking, any chip connected to the SDA or SCL lines can pull them down but if none of the chips does so, both lines are pulled high by the external resistors. This is known as the "idle bus" condition, incidentally.
In its most basic form, I2C is used for "master-slave" communication – where one device takes control of the bus as the master, to send data to or request data from another device acting as the slave. It’s true that because both the SDA and SCL lines are bidirectional, any device on the bus can initiate a data transfer as the master and similarly, any device can play the role of the slave. So the I2C bus can operate as a multi-master bus and in fact its official specification provides for bus contention and resolution situations, where two devices try to take control of the bus at the same time. However, in most common applications, there is a single master device (usually a microcontroller) and the rest of the devices are used as slaves. These slave devices may be digital tuning chips, controlled-gain amplifier or filter chips, video switching or processing chips, EEPROM memories and LCD panels, etc. Fig.1 shows the basic master-slave I2C interface circuit. As shown, there are really three lines between the master and slave chips: SCL, SDA and ground. The external pull-up resistors (Rp) provide the only connections between the SCL and SDA lines and the positive supply rail (+V). Share this Article:
|
||||||||||||||||||||||||
|