Hardware Reference
In-Depth Information
All commands and requests sent from the master are received by all devices
on the bus. Each I 2 C slave device has a unique 7-bit address, or ID number. When
communication is initiated by the master device, a device ID is transmitted. I 2 C
slave devices react to data on the bus only when it is directed at their ID number.
Because all the devices are receiving all the messages, each device on the I 2 C
bus must have a unique address. Some I 2 C devices have selectable addresses,
whereas others come from the manufacturer with a fixed address. If you want
to have multiple numbers of the same device on one bus, you need to identify
components that are available with different IDs.
Temperature sensors, for example, are commonly available with various pre-
programmed I 2 C addresses because it is common to want more than one on a
single I 2 TC74 bus. In this chapter, you use the TC74 temperature sensor. A peek at
the TC74 datasheet reveals that it is available with a variety of different addresses.
FigureĀ 8-2 shows an excerpt of the datasheet. In this chapter, you use TC74A0-
5.0VAT, which is the 5V, T0-220 version of the IC with an address of 1001000.
Figure 8-2: TC74 address options
You can purchase this particular IC with eight different ID numbers; hence,
you could put up to eight of them on one I 2 C bus and read each of them inde-
pendently. While you're writing programs to interface with this temperature
sensor later in this chapter, make sure to be aware of the ID of the device you
ordered so that you send the right commands!
Other I 2 C chips, such as the AD7414 and AD7415, have address select (AS)
pins that allow you to configure the I 2 C address of the device. Take a look at
the excerpt from the AD7414 datasheet in FigureĀ 8-3.
Search WWH ::




Custom Search