Datasheet

2010 Microchip Technology Inc. DS22250A-page 29
MCP4902/4912/4922
6.4.1.2 Building a “Window” DAC
When calibrating a set point or threshold of a sensor,
typically only a small portion of the DAC output range is
utilized. If the LSb size is adequate enough to meet the
application’s accuracy needs, the unused range is
sacrificed without consequences. If greater accuracy is
needed, then the output range will need to be reduced
to increase the resolution around the desired threshold.
If the threshold is not near V
REF
or V
SS
, then creating
a “window” around the threshold has several
advantages. One simple method to create this
“window” is to use a voltage divider network with a
pull-up and pull-down resistor. Example 6-2 and
Example 6-4 illustrate this concept.
EXAMPLE 6-2: SINGLE-SUPPLY “WINDOW” DAC
V
REF
V
DD
SPI
3
V
trip
R
1
R
2
0.1 µF
Comparator
R
3
V
CC-
V
CC+
V
CC+
V
CC-
V
OUT
R
23
R
2
R
3
R
2
R
3
+
------------------=
V
23
V
CC+
R
2
V
CC-
R
3
+
R
2
R
3
+
-----------------------------------------------------=
V
trip
V
OUT
R
23
V
23
R
1
+
R
2
R
23
+
--------------------------------------------=
R
1
R
23
V
23
V
OUT
V
O
Thevenin
Equivalent
R
sense
G = Gain selection (1x or 2x)
D
n
= Digital value of DAC (0-255) for MCP4901/MCP4902
V
OUT
V
REF
G
D
n
2
N
------

=
= Digital value of DAC (0-1023) for MCP4911/MCP4912
= Digital value of DAC (0-4095) for MCP4921/MCP4922
N = DAC Bit Resolution
DAC
MCP4901
MCP4911
MCP4921
(a) Single Output DAC:
(b) Dual Output DAC:
MCP4902
MCP4912
MCP4922