
AD7877
8-BIT DAC
The AD7877 features an on-chip 8-bit DAC for LCD contrast
control. The DAC can be configured for voltage output by
clearing Bit 2 of the DAC register (Address 1110b), or for
current output by setting this bit.
Rev. A | Page 26 of 44
The output voltage range can be set to 0 V
CC
/2 by clearing
Bit 0 of the DAC register, or to 0 V
CC
by setting this bit. In
current mode, the output range is selectable by an external
resistor, R
RNG
, connected between the ARNG pin and GND. This
sets the full-scale output current according to the following
equations:
I
FS
=
V
CC
/(
R
RNG
× 6)
so
R
RNG
=
V
CC
/(
I
FS
× 6)
In current mode, the DAC sinks current, that is, positive current
flows into ground. The maximum output current is 1000 μA.
The DAC is updated by writing to Address 1110b of the DAC
register. The 8 MSBs of the data-word are used for DAC data.
The most effective way to control LCD contrast with the DAC is
to use it to control the feedback loop of the dc-dc converter that
supplies the LCD bias voltage, as shown in Figure 44. The bias
voltage for graphic LCDs is typically in the range of 20 V to
25 V, and the dc–dc converter usually has a feedback loop that
attenuates the output voltage and compares it with an internal
reference voltage.
0
DC-DC
CONVERTER
V
FB
V
OUT
TO LCD
8-BIT
DAC
AD7877
ARNG
R
RNG1
GND
NOTES:
1
R
IS REQUIRED ONLY IF DAC IS IN CURRENT MODE.
2
R1 IS REQUIRED ONLY IF DAC IS IN VOLTAGE MODE.
AOUT
R1
2
I
OUT
R3
R2
COMP
VREF
Figure 44. Using the DAC to Adjust LCD Contrast
The circuit operates as follows. If the DAC is in current mode
when the DAC output is zero, it has no effect on the feedback
loop. Irrespective of what the DAC does, the feedback loop
maintains the voltage across R4, V
FB
, equal to V
REF
, and the
output voltage V
OUT
is
V
REF
× (
R2
+
R3
)/
R3
As the DAC output is increased, it increases the feedback
current, so the voltage across R2 and, therefore, the output
voltage also increase. Note that the voltage across R3 does not
change. This is important for calculation of the adjustment
range.
In current mode, it is quite easy to calculate the resistor values
to give the required adjustment range in V
OUT
:
1.
Find the required maximum and minimum values of V
OUT
from the LCD manufacturer’s data.
2.
Decide on the current around the feedback loop, which for
reasonable accuracy of the output voltage should be at least
100 times the input bias current of the dc–dc converter’s
comparator.
3.
Calculate R3 using the following equation:
R3
=
V
FB
/
I
FB
=
V
REF
/
I
FB
4.
Calculate R2 for the minimum value of V
OUT
, when the
DAC has no effect:
R2
=
R3
(
V
OUT(MIN)
V
REF
)/
V
REF
5.
Because the voltage across R3 does not change, subtract
V
REF
from V
OUTMAX
and V
OUTMIN
to get the maximum and
minimum voltages across R2.
6.
Calculate the change in feedback current between
minimum and maximum output voltages:
I
=
V
R2(MAX)
/
R2
V
R2(MIN)
/
R2
This is the required full-scale current of the DAC.
7.
Calculate R
RNG
from the equation given previously.
Example:
1.
V
CC
= 5 V.
V
OUT(MIN)
is 20 V and
V
OUT(MAX)
is 25 V.
V
REF
is
1.25 V.
2.
Allow 100 μA around the feedback loop.
3.
R3
= 1.25 V/100 μA = 12.5 k. Use the nearest preferred
value of 12 k and recalculate the feedback current as
I
FB
= 1.25 V/12 k = 104 μA
4.
R2
= (20 V 1.25 V)/104 μA = 180 k.
5.
I
= 23.75 V/180 k 18.75 V/180 k = 28 μA.
6.
R
RNG
= 5 V/(6 × 28 μA) = 30 k.
In voltage mode, the circuit operation depends on whether the
maximum output voltage of the DAC exceeds the dc–dc
converter V
REF
.
When the DAC output voltage is zero, it sinks the maximum
current through R1. The feedback current, and, therefore, V
OUT
are at their maximum. As the DAC output voltage increases, the
sink current and, therefore, the feedback current decrease, and