Datasheet
www.ti.com
1
2
3
6
8
7
10
9
DAC6574
V
OUT
A
V
OUT
B
V
DD
GND
V
OUT
C
V
OUT
D
A1
A0
SDA
SCL
GPIO-2
GPIO-1
V
DD
Microcontroller or
Microprocessor
NOTE: DAC6574 power and input/output connections are omitted for clarity, except I
C Inputs.
4
5
POWER SUPPLY REJECTION
DAC6574
SLAS408 – DECEMBER 2003
APPLICATION INFORMATION (continued)
Figure 39. Using GPIO With a Single DAC6574
Bit-banging I
2
C with GPIO pins can be done by setting the GPIO line to zero and toggling it between input and
output modes to apply the proper bus states. To drive the line low, the pin is set to output a zero; to let the line
go high, the pin is set to input. When the pin is set to input, the state of the pin can be read; if another device is
pulling the line low, this reads as a zero in the port's input register.
Note that no pullup resistor is shown on the SCL line. In this simple case the resistor is not needed. The
microcontroller can simply leave the line on output, and set it to one or zero as appropriate. It can do this
because the DAC6574 never drives its clock line low. This technique can also be used with multiple devices, and
has the advantage of lower current consumption due to the absence of a resistive pullup.
If there are any devices on the bus that may drive their clock lines low, the above method should not be used.
The SCL line should be high-Z or zero, and a pullup resistor provided as usual. Note also that this cannot be
done on the SDA line in any case, because the DAC6574 drives the SDA line low from time to time, as all I
2
C
devices do.
Some microcontrollers have selectable strong pullup circuits built in to their GPIO ports. In some cases, these
can be switched on and used in place of an external pullup resistor. Weak pullups are also provided on some
microcontrollers, but usually these are too weak for I
2
C communication. Test any circuit before committing it to
production.
The positive reference voltage input of DAC6574 is internally tied to the power supply pin of the device. This
increases I
2
C system flexibility, creating room for an extra I
2
C address pin in a low pin-count package. To
eliminate the supply noise appearing at the DAC output, the user must pay close attention to how DAC6574 is
powered. The supply to DAC6574 must be clean and well regulated. For best performance, use of a precision
voltage reference is recommended to supply power to DAC6574. This is equivalent to providing a precision
26