Datasheet
2010 Microchip Technology Inc. DS22249A-page 29
MCP4802/4812/4822
6.7 Selectable Gain and
Offset Bipolar Voltage Output
Using a Dual Output DAC
In some applications, precision digital control of the
output range is desirable. Example 6-4 illustrates how
to use the MCP4802/4812/4822 family of devices to
achieve this in a bipolar or single-supply application.
This circuit is typically used for linearizing a sensor
whose slope and offset varies.
The equation to design a bipolar “window” DAC would
be utilized if R
3
, R
4
and R
5
are populated.
EXAMPLE 6-4: BIPOLAR VOLTAGE SOURCE WITH SELECTABLE GAIN AND OFFSET
V
DD
R
3
R
4
R
2
V
O
DAC
A
V
DD
R
1
(DAC
A
for Gain Adjust)
(DAC
B
for Offset Adjust)
SPI
3
R
5
V
CC
+
Thevenin
Bipolar “Window” DAC using R
4
and R
5
0.1 µF
V
CC
–
V
CC
+
V
CC
–
V
OUTA
V
OUTB
V
IN+
V
OUTB
R
4
V
CC-
R
3
+
R
3
R
4
+
-------------------------------------------------=
V
O
V
IN+
1
R
2
R
1
------+
V
OUTA
R
2
R
1
----- -
–=
Equivalent
V
45
V
CC+
R
4
V
CC-
R
5
+
R
4
R
5
+
---------------------------------------------=R
45
R
4
R
5
R
4
R
5
+
-------------------=
V
IN+
V
OUTB
R
45
V
45
R
3
+
R
3
R
45
+
------------------------------------------------=V
O
V
IN+
1
R
2
R
1
------+
V
OUTA
R
2
R
1
------
–=
Offset Adjust Gain Adjust
Offset Adjust Gain Adjust
DAC
B
V
OUTA
2.048 G
A
D
n
2
N
------
=
V
OUTB
2.048 G
B
D
n
2
N
------
=
V
IN
+
Dual Output DAC:
MCP4802
MCP4812
MCP4822
G = Gain selection (1x or 2x)
N = DAC bit resolution
D
A ,
D
B
= Digital value of DAC (0-255) for MCP4802
= Digital value of DAC (0-1023) for MCP4812
= Digital value of DAC (0-4095) for MCP4822