Hardware Reference
In-Depth Information
Figure 8-3: AD7414 addressing
As shown in Figure 8-3, the AD7414 is available in four versions, two with
an AS pin and two without. The versions with AS pins can each have three
possible ID numbers depending on whether the AS pin is left disconnected, is
tied to VCC, or is tied to GND.
HardwareRequirementsandPull-UpResistors
You may have noticed in Figure 8-1 that the standard I 2 C bus configuration
requires pull-up resistors on both the clock and data lines. The value for these
resistors depends on the slave devices and how many of them are attached. In
this chapter, you use 4.7kΩ resistors for both pull-ups; this is a fairly standard
value that will be specified by many datasheets.
CommunicatingwithanI 2 CTemperatureProbe
The steps for communicating with different I 2 C devices vary based on the
requirements of the specific device. Thankfully, you can use the Arduino I 2 C
library to abstract away most of the difficult timing work. In this section of the
chapter, you talk to the I 2 C temperature sensor described earlier. You learn how
to interpret the datasheet information as you progress so that you can apply
these concepts to other I 2 C devices with relative ease.
The basic steps for controlling any I 2 C device are as follows:
1. Master sends a start bit.
2. Master sends 7-bit slave address of device it wants to talk to.
3. Master sends read (1) or write (0) bit depending on whether it wants to
write data into an I 2 C device's register or if it wants to read from one of
the I 2 C device's registers.
4. Slave responds with an “acknowledge” or ACK bit (a logic low).
 
Search WWH ::




Custom Search