Datasheet


SLAS370CAPRIL 2002 − REVISED OCTOBER 2004
www.ti.com
26
Digital Input/Output State Register
The Digital I/O State register (ADDR = 5) contains the state of each of the four digital I/O pins. Each pin can
function as a digital input (the state of the pin is set by an external signal connected to it) or a digital output (the
state of the pin is set by data from a serial input to the ADS7871). The input/output functional control is
established by the digital I/O mode control bits (OE3−OE0) in the Digital I/O Control register. In addition, the
convert/busy bit (CNV/BSY) can be used to start a conversion via a write instruction or determine if the converter
is busy by executing a read instruction.
Digital I/O State Bits
Bits D3 through D0 (I/O3−I/O0) of the Digital I/O State register are the state bits. If the corresponding mode
bit makes the pin a digital input, the state bit indicates whether the external signal connected to the pin is a 1
or a 0, and it is not possible to control the state of the corresponding bit with a write operation. The state of the
bit is only controlled by the external signal connected to the digital I/O pin. Coding is shown in Figure 29.
DIGITAL I/O STATE REGISTER
ADDR D7 (MSB) D6 D5 D4 D3 D2 D1 D0
5 CNV/BSY 0 0 0 IO3 IO2 IO1 IO0
ADDR = 5
BIT SYMBOL NAME VALUE FUNCTION
D7 CNV/BSY Convert/Busy 0
1
Idle Mode
Busy Mode; write = start conversion
D6−D4 0 These bits are not used and are always 0.
D3 IO3 State for I/O3 0
1
Input or Output State = 0
Input or Output State = 1
D2 IO2 State for I/O2 0
1
Input or Output State = 0
Input or Output State = 1
D1 IO1 State for I/O1 0
1
Input or Output State = 0
Input or Output State = 1
D0 IO0 State for I/O0 0
1
Input or Output State = 0
Input or Output State = 1
Bold items are power-up default conditions.
NOTE:
When the mode control makes a pin a digital input, it is not possible to control the state of the corresponding bit in the Digital I/O State register
with a write operation. The state of the bit is only controlled by the external signal connected to the digital I/O pin.
Figure 29. Digital I/O State Register (ADDR = 5)
The four digital I/O pins allow control of external circuitry, such as a multiplexer, or allow the digital status lines
from other devices to be read without using any additional microcontroller pins. Reads from this register always
reflect the state of the pin, not the state of the latch inside the ADS7871.
Convert/Busy
If CNV/BSY is set to a 1 during a write operation, a conversion starts on the second falling edge of DCLK after
the active edge of SCLK that latched the data into the Digital I/O register. The CNV/BSY bit may be read with
a read instruction. The CNV/BSY bit is set to 1 in a read operation if the ADS7871 is performing a conversion
at the time the register is sampled in the read operation.