Datasheet

VDD
GPIO_0
GPIO_1
Microcontrolleror
Microprocessor
withGPIOPorts
5
10
1
2
3
4
ADDR
ALERT/RDY
GND
AIN0
AIN1
SCL
9
8
7
6
SDA
VDD
AIN3
AIN2
ADS1115
ADS1113
ADS1114
ADS1115
SBAS444B MAY 2009REVISED OCTOBER 2009
www.ti.com
CONNECTING MULTIPLE DEVICES states. To drive the line low, the pin is set to output
'0'; to let the line go high, the pin is set to input. When
Connecting multiple ADS1113/4/5s to a single bus is
the pin is set to input, the state of the pin can be
simple. Using the address pin, the ADS1113/4/5 can
read; if another device is pulling the line low, this
be set to one of four different I
2
C addresses. An
configuration reads as a '0' in the port input register.
example showing three ADS1113/4/5 devices is given
in Figure 35. Up to four ADS1113/4/5s (using Note that no pull-up resistor is shown on the SCL
different address pin configurations) can be line. In this simple case, the resistor is not needed;
connected to a single bus. the microcontroller can simply leave the line on
output, and set it to '1' or '0' as appropriate. This
Note that only one set of pull-up resistors is needed
action is possible because the ADS1113/4/5 never
per bus. The pull-up resistor values may need to be
drive the clock line low. This technique can also be
lowered slightly to compensate for the additional bus
used with multiple devices, and has the advantage of
capacitance presented by multiple devices and
lower current consumption as a result of the absence
increased line length.
of a resistive pull-up.
The TMP421 and DAC8574 devices detect the
If there are any devices on the bus that may drive the
respective I
2
C bus addresses based on the states of
clock lines low, this method should not be used; the
pins. In the example, the TMP421 has the address
SCL line should be high-Z or '0' and a pull-up resistor
0101010, and the DAC8574 has the address
provided as usual.
1001100. Consult the DAC8574 and TMP421 data
sheets, available at www.ti.com, for further details. Some microcontrollers have selectable strong pull-up
circuits built in to the GPIO ports. In some cases,
these circuits can be switched on and used in place
USING GPIO PORTS FOR COMMUNICATION
of an external pull-up resistor. Weak pull-ups are also
Most microcontrollers have programmable
provided on some microcontrollers, but usually these
input/output (I/O) pins that can be set in software to
are too weak for I
2
C communication. If there is any
act as inputs or outputs. If an I
2
C controller is not
doubt about the matter, test the circuit before
available, the ADS1113/4/5 can be connected to
committing it to production.
GPIO pins and the I
2
C bus protocol simulated, or
bit-banged, in software. An example of this
configuration for a single ADS1113/4/5 is shown in
Figure 34.
Bit-banging I
2
C with GPIO pins can be done by
setting the GPIO line to '0' and toggling it between
input and output modes to apply the proper bus
NOTE: ADS1113/4/5 power and input connections omitted for clarity.
Figure 34. Using GPIO with a Single ADS1115
24 Submit Documentation Feedback Copyright © 2009, Texas Instruments Incorporated
Product Folder Link(s): ADS1113 ADS1114 ADS1115