The MCP4802/4812/4822 devices are dual 8-bit, 10-bit
and 12-bit buffered voltage output Digital-to-Analog
Converters (DACs), respectively. The devices operate
from a single 2.7V to 5.5V supply with SPI compatible
Serial Peripheral Interface.
The devices have a high precision internal voltage
reference (V
full-scale range of the device to be 2.048V or 4.096V by
setting the Gain Selection Option bit (gain of 1 of 2).
Each DAC channel can be operated in Active or
Shutdown mode individually by setting the Configuration
register bits. In Shutdown mode, most of the internal
circuits in the shutdown channel are turned off for power
savings and the output amplifier is configured to present
a known high resistance output load (500 k typical.
The devices include double-buffered registers,
allowing synchronous updates of two DAC outputs
using the LDAC
Power-on Reset (POR) circuit to ensure reliable powerup.
The devices utilize a r esistive string arc hitecture , with
its inherent advantages of low DNL error, low ratio
metric temperature coefficient and fast settling time.
These devices are specified over the extended
temperature range (+125°C).
The devices provide high accuracy and low noise
performance for consumer and industrial applications
where calibration or compensation of signals (such as
temperature, pressure and humidity) are required.
The MCP4802/4812/4822 devices are available in the
PDIP, SOIC and MSOP packages.
DS20002249B-page 2 2010-2015 Microchip Technology Inc.
MCP4802/4812/4822
1.0ELECTRICAL
CHARACTERISTICS
† Notice: Stresses above those listed under “Maximum
Ratings” may cause permanent damage to the device.
This is a stress rating only and functional operation of
the device at tho se or any oth er conditions ab ove those
indicated in the operational listings of this specification
is not implied. Exposure to maximum rating conditions
for extended periods may affect device reliability.
Current at Input Pins .........................................±2 mA
Current at Supply Pins ....................................±50 mA
Current at Output Pins ....................................±25 mA
Storage temperature ..........................-65°C to +150°C
Ambient temp. with power applied.....-55°C to +125°C
ESD protection on all pins 4 kV (HBM), 400V (MM)
Maximum Junction Temperature (T
Specified Temperature RangeT
Operating Temperature RangeT
Storage Temperature RangeT
Thermal Package Resistances
Thermal Resistance, 8L-MSOP
Thermal Resistance, 8L-PDIP
Thermal Resistance, 8L-SOICNote 1:The MCP4802/4812/4822 devices operate over this extended temperature range, but with reduced
performance. Operation in this range must not cause T
of +150°C.
DS20002249B-page 8 2010-2015 Microchip Technology Inc.
MCP4802/4812/4822
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
01024204830724096
Code (Decimal)
DNL (L SB)
-0.2
-0.1
0
0.1
0.2
01024204830724096
Code (Decimal)
DNL (LSB)
125C 85C25C
0.075
0.0752
0.0754
0.0756
0.0758
0.076
0.0762
0.0764
0.0766
-40-200 20406080100120
Ambient Temperature (ºC)
Absolute DNL (LSB)
-5
-4
-3
-2
-1
0
1
2
3
4
5
01024204830724096
Code (Decimal)
INL (LSB)
125C8525
Ambient Temperat ure
0
0.5
1
1.5
2
2.5
-40 -20020406080 100 120
Ambient Temperature (ºC)
Absolute IN L (LS B)
-6
-4
-2
0
2
01024204830724096
Code (Decimal )
INL (LSB)
2.0TYPICAL PERFORMANCE CURVES
Note:The graphs and table s prov ided following this note are a st a tis tic al s umm ary based on a limited number of
samples and are provided for informational purposes only. The performance characteristics listed herein
are not tested or guaranteed. In some graphs or tables, the data presented may be outside the specified
operating range (e.g., outside specified power supply range) and therefore outside the warranted range.
Note: Unless otherwise in dic ate d, TA = +25°C, VDD = 5V, VSS = 0V, V
FIGURE 2-1:DNL vs. Code (MCP4822).
FIGURE 2-4:INL vs. Code and
Temperature (MCP4822).
= 2.048V, Gain = 2x, RL = 5 k, CL = 100 pF.
REF
FIGURE 2-2:DNL vs. Code and
Temperature (MCP4822).
FIGURE 2-3:Absolute DNL vs.
Temperature (MCP4822).
Synchronization Input. This pin is used to transfer DAC settings
(Input Registers) to the output registers (V
OUTB
SS
OUTA
DACB Output
Ground reference point for all circuitry on the device
DACA Output
OUT
)
3.1Supply Volt age Pins (V
DD, VSS
)
VDD is the po siti ve sup ply v oltage input pin. The i nput
supply voltage is relative to V
2.7V to 5.5V. The power supply at the V
and can range from
SS
pin should
DD
be as clean as possible for a good DAC performance.
It is recommended to use an appropriate bypass
capacitor of about 0.1 µF (ceramic) to ground. An
additional 10 µF capacitor (tantalum) in parallel is also
recommended to further attenuate high-frequency
noise present in application boards.
is the analog ground pin and the current return path
V
SS
of the device. The user must connect the V
pin to a
SS
ground plane through a low-impedance connection. If
an analog ground path is available in the application
Printed Circuit Board (PCB), it is highly recommended
that the VSS pin be tied to the analog ground path or
isolated within an analog ground plane of the circuit
board.
3.2Chip Select (CS)
CS is the Chip Select input pin, which requires an
active-low to enable serial clock and data functions.
3.3Serial Clock Input (SCK)
3.4Serial Data Input (SDI)
SDI is the SPI compatible serial data input pin.
3.5Latch DAC Input (LDAC)
LDAC (latch DAC sync hro ni z at i on i npu t ) pi n is us ed to
transfer the input latch registers to their corresponding
DAC registers (output latches, V
low, both V
OUTA
and V
are updated at the same
OUTB
time with t heir input regi ster c onten ts. This pin can be
tied to low (VSS) if the V
rising edge of the CS
OUT
pin. This pin can be driven by an
external control device such as an MCU I/O pin.
3.6Analog Outputs (V
V
is the DAC A output pin, and V
OUTA
B output pin. Each output has its own output amplifier.
The full-scale range of the DAC output is from
to G* V
V
SS
(1x or 2x). The DAC analog output cannot go higher
than the supply voltag e (V
DS20002249B-page 16 2010-2015 Microchip Technology Inc.
MCP4802/4812/4822
V
OUT
2.048V D
n
2
n
-----------------------------------G=
Where:
2.048V =Internal voltage reference
D
n
=DAC input code
G= Gain selection
=2 for <GA
> bit = 0
=1 for <GA> bit = 1
n=DAC Resolution
=8 for MCP4802
=10 for MCP4812
=12 for MCP4822
111
110
101
100
011
010
001
000
Digital
Input
Code
Actual
Transfer
Function
INL < 0
Ideal Transfer
Function
INL < 0
DAC Output
4.0GENERAL OVERVIEW
The MCP4802, MCP4812 and MCP4822 are dual
voltage output 8-bit, 10-bit and 12-bit DAC devices,
respectively. These devices include rail-to-rail output
amplifiers, internal voltage reference, shutdown and
reset-management circuitry. The devices use an SPI
serial communication interface and operate with a single supply voltage from 2.7V to 5.5V.
The DAC input coding of these devices is straight
binary. Equation 4-1 shows the DAC analog output
voltage calculation.
EQUATION 4-1:ANALOG OUTPUT
VOLTAGE (V
OUT
)
1 LSb is the ideal voltage difference between two
successive codes. Table 4-1 illustrates the LSb
calculation of each device.
Integral Non-Linearity (INL) error for these devices is
the maximum devi ation be tween an actua l code tra nsition point and its corresponding ideal transition point
once offset and gain errors have been removed. The
two end points method (from 0x000 to 0xFFF) is used
for the calculation. Figure 4-1 shows the details.
A positive INL error represents transition(s) later than
ideal. A negative INL error represents transition(s)
earlier than ideal.
The ideal output range of each device is:
• MCP4802 (n = 8)
(a) 0.0V to 255/256 * 2.048V when gain setting = 1x.
(b) 0.0V to 255/256 * 4.096V when gain setting = 2x.
• MCP4812 (n = 10)
(a) 0.0V to 1023/1024 * 2.048V when g ain setting= 1x.
(b) 0.0V to 1023/1024 * 4.096 V when gain setting = 2x.
• MCP4822 (n = 12)
(a) 0.0V to 4095/4096 * 2.048V when g ain setting= 1x.
(b) 0.0V to 4095/4096 * 4.096V when g ain setting= 2x.
A Differential Non-Li ne arity (DNL) error is the measure
of variations in code widths from the ideal code width.
A DNL error of zero indicate s that every co de is exa ctly
1 LSb wide.
FIGURE 4-2:Example for DNL Error.
4.0.3OFFSET ERROR
An offset erro r is the devi ation from z ero vol tag e outp ut
when the digital input code is zero.
4.0.4GAIN ERROR
A gain error is the deviation from the ideal output,
– 1 LSb, excluding the effects of offset error.
V
REF
4.1Circuit Descriptions
4.1.1OUTPUT AMPLIFIERS
The DAC’s outputs are buffered with a low-power,
precision CMOS amplifier. This amplifier provides low
offset volt ag e an d l ow no is e. T he o utp ut s tage enables
the device to operate with output voltages close to the
power supply rails. Refer to Section 1.0 “Electrical
Characteristics” for the analog output voltage range
and load conditions.
In addition to resistive load-driving capability, the
amplifier will also drive high capacitive loads without
oscillation. The ampl ifier’s strong ou tputs allow V
be used as a programmable voltage reference in a
system.
4.1.1.1Programmable Gain Block
The rail-to-rail output amplifier has two configurable
gain options: a gain of 1x (<GA
> = 0). The default value for this bit is a gain
(<GA
of 2 (<GA
output of 0.000V to 4.096V due to the internal
reference (V
> = 0). This results in an ideal full-scale
= 2.048V).
REF
> = 1) or a gain of 2x
4.1.2VOLTAGE REFERENCE
The MCP4802/4812/4822 devices utilize internal
2.048V voltage refere nce. The volt a ge referen ce has a
low temperature coefficient and low noise
characteristics. Refer to Section 1.0 “Electrical Char-
acteristics” for the voltage reference specifications.
OUT
to
DS20002249B-page 18 2010-2015 Microchip Technology Inc.
MCP4802/4812/4822
Transients above the curve
will cause a reset
Transients below the curve
will NOT cause a reset
5V
Time
Supply Voltages
Transient Duration
V
POR
VDD - V
POR
TA = +25°C
Transient Duration (µs)
10
8
6
4
2
0
12345
V
DD
- V
POR
(V)
500 k
Power-Down
Control Circuit
Resistive
Load
V
OUT
Op
Amp
Resistive String DAC
4.1.3POWER-ON RESET CIRCUIT
The internal Power-on Res et (POR) circuit moni tors the
power supply voltage (V
operation. The circuit also ensures that the DAC
powers up with high output impedance (<SHDN> = 0,
typically 500 k. The devices will continue to have a
high-impedance output until a valid write command is
received and the LDAC
threshold.
If the power supply voltage is less than the POR
threshold (V
= 2.0V, typical), the DACs will be held
POR
in their Reset state. The DACs will remain in that state
until VDD > V
and a subsequent write command is
POR
received.
Figure 4-3 shows a typical power supply transient
pulse and the duration required to cause a reset to
occur, as well as the relationship between the duration
and trip voltage. A 0.1 µF decoupling capacitor,
mounted as close as possible to the V
provide additional transient immunity.
) during the device
DD
pin meets the input low
pin, can
DD
4.1.4SHUTDOWN MODE
The user can shut down each DAC channel selectively
using a software command (<SHDN
Shutdown mode, most of the internal circuits in the
channel that was shut down are turned off for power
savings. The internal reference is not affected by the
shutdown command. The serial interface also remains
active, thus allowing a write command to bring the
device out of the Shutdown mode. There will be no
analog output at the channel that was shut down and
the V
pin is internally switc he d to a known resistive
OUT
load (500 k typical. Figure 4-4 shows the analog
output stage during the Shutdown mode.
The device will remain in Shutdown mode until the
<SHDN
> bit = 1 is latched into the device. When a
DAC channel is changed from Shutdown to Active
mode, the output settling time takes < 10 µs, but
greater than the standard active mode settling time
(4.5 µs).
DS20002249B-page 20 2010-2015 Microchip Technology Inc.
MCP4802/4812/4822
5.0SERIAL INTERFACE
5.1Overview
The MCP4802/4812/4822 devices are designed to
interface directly with the Serial Peripheral Interface
(SPI) port, available on many microcontrollers, and
supports Mode 0,0 and Mod e 1,1. Comma nds and da ta
are sent to the device via the SDI pin, with data being
clocked-in on the rising edge of SCK. The
communications are unidirectional and, thus, data
cannot be read out of the MCP4802/4812/4822
devices. The CS
of a write command. The write command consists of
16 bits and is used to configure the DAC’s control and
data latches. Register 5-1 to Register 5-3 detail the
input register that is used to configure and load the
and DACB registers for each device. Figure 5-1
DAC
A
to Figure5-3 show the write command for eac h devic e.
Refer to Figure 1-1 and SPI Timing Specifications
Table for detailed input and outpu t timing sp ecification s
for both Mode 0,0 and Mode 1,1 operation.
pin must be held low for the duration
5.2Write Command
The write command is initiated by driving the CS pin
low, followed by clocking the four Configuration bits and
the 12 data bits into the SDI pin on the rising edge of
SCK. The CS
latched into the selected DAC’s input registers.
The MCP4802/4812/4822 devices utilize a doublebuffered latch structure to allow both DAC
DAC
’s outputs to b e s ynchro ni zed with the LDAC pi n,
B
if desired.
By bringing down the LDAC
tents stored in the DA C’s input reg isters are transferre d
into the DAC’s output registers (V
and V
OUTB
All writes to the MCP4802/4812/4822 devices are
16-bit words. Any clocks af ter the fi rst 16
ignored. The Most Significant four bits are
Configuration bits. The remaining 12 bits are data bits.
No data can be transferred into the device with CS
high. The data transfe r will on ly occur if 16 c locks have
been transferred into the device. If the rising edge of
occurs prior, shifting of data into the input registers
R = Readable bitW = Writable bitU = Unimplemented bit, read as ‘0’
-n = Value at POR1 = bit is set0 = bit is clearedx = bit is unknown
REGISTER 5-1: WRITE COMMAND REGISTER FOR MCP4822 (12-BIT DAC)
REGISTER 5-2:WRITE COMMAND REGISTER FOR MCP4812 (10-BIT DAC)
REGISTER 5-3:WRITE COMMAND REGISTER FOR MCP4802 (8-BIT DAC)
Where:
bit 15A/B: DACA or DACB Selection bit
1 = Write to DAC
0 = Write to DAC
bit 14 — Don’t Care
bit 13GA
: Output Gain Selection bit
1 =1x (V
0 =2x (V
OUT
OUT
bit 12SHDN: Outp ut Shutdown Control bit
1 = Active mode operation. VOUT is available.
0 = Shutdown the selected DAC cha nnel. Analog outp ut is not availab le at the channel t hat was shut down.
V
pin is connected to 500ktypical)
OUT
bit 11-0D11:D0: DAC Input Data bits. Bit x is ignored.
B
A
= V
REF
= 2 * V
* D/4096)
* D/4096), where internal VREF = 2.048V.
REF
DS20002249B-page 22 2010-2015 Microchip Technology Inc.
MCP4802/4812/4822
SDI
SCK
CS
0
21
A
/B — GA SHDN D11
D10
config bits12 data bits
LDAC
34
D9
5
6
7
D8
D7
D6
89 1012
D5
D4
D3
D2
D1 D0
11
13
14 15
V
OUT
(Mode 1,1)
(Mode 0,0)
SDI
SCK
CS
0
21
A
/B — GA SHDN D9
D8
config bits12 data bits
LDAC
34
D7
56
7
D6
D5
D4
8
9 1012
D3
D2
D1
D0
X X
11
13
14 15
V
OUT
(Mode 1,1)
(Mode 0,0)
Note:X = “don’t care” bits.
SDI
SCK
CS
0
21
A
/B — GA SHDN
config bits12 data bits
LDAC
34
5
6
7
X
D7
D6
89 1012
D5
D4
D3
D2
D1
D0
11
13
14 15
V
OUT
(Mode 1,1)
(Mode 0,0)
XX
X
Note:X = “don’t care” bits.
FIGURE 5-1:Write Command for MCP4822 (12-bit DAC).
FIGURE 5-2:Write Command for MCP4812 (10-bit DAC).
DS20002249B-page 24 2010-2015 Microchip Technology Inc.
MCP4802/4812/4822
V
DD
V
DD
V
DD
AV
SS
AV
SS
V
SS
V
OUTA
V
OUTB
PIC
®
Microcontroller
V
OUTA
V
OUTB
SDI
SDI
CS
1
SDO
SCK
LDAC
CS
0
1µF
1µF
MCP48x2
MCP48x2
C1 = 10 µF
C2 = 0.1 µF
C1
C2
C2
C1
C1
C2
6.0TYPICAL APPLICATIONS
The MCP4802/4812/4822 family of devices are
general pur pose DACs for variou s applica tions wher e
a precision operation with low-power and internal
voltage refe rence is required.
Applications generally suited for the devices are:
• Set Point or Offset Trimming
• Sensor Calibration
• Precision Selectable Voltage Reference
• Portable Instrument ati on (Batte ry-Po w ered )
• Calibration of Optical Communication Devices
6.1Digital Interface
The MCP4802/4812/4822 devices utilize a 3-wire
synchronous serial prot ocol to transfer the DAC’ s setup
and input codes from the digital devices. The serial
protocol can be interfaced to SPI or Microwire
peripherals that is common on many microcontroller
units (MCUs), including Microchip’s PIC
®
DSCs.
dsPIC
In addition to the three serial connections (CS
and SDI), the LDAC
signal synchronizes the two DAC
outputs. By bringing down the LDAC
DAC input codes and sett ings in the two DAC input registers are latched into their DAC output registers at the
same time. Therefore, both DAC
A
are updated at the same time. Figure 6-1 shows an
example of the pin conn ections. Note that the LDAC
can be tied low (V
) to reduce the required
SS
connections from fo ur to three I/O pin s. In this cas e, the
DAC output can be immediately updated when a valid
16 clock transmission has been received and the CS
pin has been raised.
®
MCUs and
, SCK
pin to “low”, all
and DACB outputs
pin
6.3Output Noise Considerations
The voltage noise density (in µV/Hz) is illustrated in
Figure 2-13. This noise appears at V
primarily a result of the internal reference voltage.
Its 1/f corner (f
CORNER
) is approximately 400Hz.
Figure 2-14 illustrates the voltage noise (in mV
). A small bypass capacitor on V
mV
P-P
effective method to produce a single-pole Low-Pass
Filter (LPF) that will reduce this noise. For instance, a
bypass capacitor si zed to pro duce a 1 kHz LPF would
result in an E
of about 10 0 µ V
NREF
RMS
necessary when trying to achieve the low DNL error
performance (at G = 1) that the MCP4802/4812/4822
devices are capable of. The tested range for st a bi lity i s
.001µF through 4.7 µF.
, and is
OUTX
or
RMS
is an
OUTX
. This woul d be
6.2Power Supply Considerations
The typical application will require a bypass capacitor
in order to filter out the noise in the power supply
traces. The noise can be induced onto the power
supply's traces from various events such as digital
switching or as a result of changes on the DAC's
output. The bypass capacitor helps to minimize the
effect of these noise sources. Figure 6-1 illustrates an
appropriate bypass strategy. In this example, two
bypass capacitors are used in parallel: (a) 0.1 µF
(ceramic) and (b)10 µF (tantalum). These capacitors
should be placed as close to the device power pin
(V
DD
The power source supplying these devices should be
as clean as possible. If the application circuit has
Inductively-coupled AC transients and digital switching
noises can degrade the output signal integrity, and
potentially reduce the device performance. Careful
board layout will minimize these effects and increase
the Signal-to-Noise Ratio (SNR). Bench testing has
shown that a multi-layer board utilizing a
low-inductance ground plane, isolated inputs and
isolated outputs with proper decoupling, is critical for
the best performance. Particularly harsh environments
may require shielding of critical signals.
Breadboards and wire-wrapped boards are not
recommended if low noise is desired.
MCP4802/4812/4822
V
DD
SPI
3-wire
V
TRIP
R
1
R
2
0.1 µF
Comparator
V
OUT
2.048 G
D
n
2
N
------
=
V
CC
+
V
CC
–
V
OUT
V
tripVOUT
R
2
R1R2+
--------------------
=
V
DD
R
SENSE
DAC
(a) Single Output DAC:
MCP4801
MCP4811
MCP4821
(b) Dual Output DAC:
MCP4802
MCP4812
MCP4822
G = Gain selection (1x or 2x)
D
n
= Digital value of DAC (0-255) for MCP4801/MCP4802
= Digital value of DAC (0-1023) for MCP4811/MCP4812
= Digital value of DAC (0-4095) for MCP4821/MCP4822
N = DAC bit resolution
6.5Single-Supply Operation
The MCP4802/4812/482 2 family of devices are rail-torail voltage output DAC devices designed to operate
with a V
robust enough to drive small-signal loads directly.
Therefore, it does not require any external output buffer
for most applications.
6.5.1DC SET POINT OR CALIBRATION
A common application for the devices is a digitallycontrolled set point and/or calibration of variable
parameters, such as sensor offset or slope. For
example, the MCP4822 provides 4096 output steps. If
G = 1 is selected, the internal 2.048V V
produce 500 µV of resolution. If G = 2 is selected, the
internal 2.048 V
range of 2.7V to 5.5V. Its output amplifier is
DD
REF
would produce 1 mV of resolution.
REF
would
6.5.1.1Decreasing Output Step Size
If the application is calibrating the bias voltage of a
diode or transistor , a bia s voltage range of 0.8V may be
desired with about 200 µV resolution per step. Two
common methods to ac hieve a 0.8V range are to eith er
reduce V
device that uses external reference) or use a voltage
divider on the DAC’s output.
Using a V
the desired output voltage range. However,
occasionally, when using a low-volt age V
floor causes SNR error that is intolerable. Using a
voltage divider method is another option and provides
some advantages when V
when the desired ou tput v olt age is not av ailab le. In thi s
case, a larg er value V
scale the output range down to the precise desired
to 0.82V (using the MCP49XX family
REF
is an option if the V
REF
REF
is used while two resistors
REF
REF
needs to be very low or
level.
Example 6 -1 illustrates this concept. Note that the
bypass capacitor on the output of the voltage divider
plays a critical function in attenuating the output noise
of the DAC and the induced noise from the environment.
EXAMPLE 6-1:EX AMPL E CIRCUIT OF SET POINT OR THRESHOLD CALIBRATION
is available with
, the noise
REF
DS20002249B-page 26 2010-2015 Microchip Technology Inc.
= Digital value of DAC (0-255) for MCP4801/MCP4802
= Digital value of DAC (0-1023) for MCP4811/MCP4812
= Digital value of DAC (0-4095) for MCP4821/MCP4822
N = DAC bit resolution
6.5.1.2Building a “Window” DAC
When calibrating a set point or threshold of a sensor,
typically only a sma ll portion of the DA C 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 resolutio n around the desired threshol d.
EXAMPLE 6-2:SINGLE-SUPPLY “WINDOW” DAC
If the threshold is not near V
REF
, 2V
or VSS, then
REF
creating a “window” around the threshold has several
advantages. One simple method to create this
“window” is to use a volt age divi der network with a pullup and pull-down resistor. Example 6-2 shows this
concept.
= Digital value of DAC (0-255) for MCP4801/MCP4802
= Digital value of DAC (0-1023) for MCP4811/MCP4812
= Digital value of DAC (0-4095) for MCP4821/MCP4822
Bipolar operation is achievable using the
MCP4802/4812/4822 family of devices by utilizing an
external operational amplifier (op amp). This
configuration is desirable due to the wide variety and
availability of op amps. This allows a general purpose
Example 6 -3 illustrates a simple bipolar voltage sourc e
configuration. R
while R
and R4 shift the DAC's output to a selected
3
and R2 allow the gain to be selected,
1
offset. Note that R4 ca n be tie d to V
if a higher offset is desired. Also note that a pull-up to
VDD could be used ins tead of R4, or in addition to R4, if
a higher offset is desired.
DAC, with its cost and availability advantages, to meet
almost any desired output voltage range, power and
noise performance.
EXAMPLE 6-3:DIGITALLY-CONTROLLED BIPOLAR VOLTAGE SOURCE
, instead of VSS,
DD
6.6.1DESIGN EXAMPLE: DESIGN A
BIPOLAR DAC USING Example 6-3
WITH 12-BIT MCP4822 OR
MCP4821
An output step magnitude of 1mV, with an out put range
of ±2.05V, is desired for a particular application.
Step 1: Calculate the range: +2.05V – (-2.05V) = 4.1V.
Step 2: Calculate the resolution needed:
Step 3:The amplifier gain (R
DS20002249B-page 28 2010-2015 Microchip Technology Inc.
4.1V/1 mV = 4100
12
Since 2
= 4096, 12-bit resolution is
desired.
scale V
(4.096V), must be equal to the
OUT
desired minimum output to achieve bipolar
operation. Since any gain can be realized by
choosing resistor values (R
value must be se lected first. If a V
is used (G=2), solve for the amplifier’s gain by
setting the DAC to 0, knowing that the output
needs to be -2.05V.
= Digital value of DAC (0-255) for MCP4802
= Digital value of DAC (0-1023) for MCP4812
= Digital value of DAC (0-4095) for MCP4822
6.7Selectable Gain and
Offset Bipolar Voltage Output
Using a Dual Output DAC
In some applications, precision digital control of the
This circuit is typically used for linearizing a sensor
whose slope and offset varies.
The equati on to de sig n a bip ola r “win dow ” DAC would
be utilized if R
, R4 and R5 are populated.
3
output range is desirable. Example 6-4 illustra tes how
to use the MCP4802/4812/4822 family of devices to
achieve this in a bipolar or single-supply application.
EXAMPLE 6-4:BIPOLAR V OLTAGE SOURCE WITH SELECTABLE GAIN AND OFFSET
Gx= Gain selection (1x or 2x)
Dn= Digital value of DAC (0-4096)
6.8Designing a Double-Precision
DAC Using a Dual DAC
Example 6-5 illustrates how to design a single-supp ly
voltage output capable of up to 24-bi t re solution fro m a
dual 12-bit DAC (MCP4822). This design is simply a
voltage divider with a buffered output.
As an example, if an application similar to the one
developed in Section 6.6.1 “Design Example:
Design a Bipolar DAC Using Example 6-3 with 12bit MCP4822 or MCP4821” required a resolut ion of
1 µV instead of 1 mV, and a range of 0V to 4.1V, then
12-bit resolution would not be adequate.
Step 1: Calculate the resolution needed:
4.1V/1 µV = 4.1 x 10
22-bit resolution is desired. Since
DNL =±0.75 LSb, this design can be done
with the 12-bit MCP4822 DAC.
Step 2: Since DAC
its output only needs to be “pulled” 1/1000 to
meet the 1 µV target. Divi ding V
would allow the application to compensate for
’s DNL error.
DAC
B
Step 3: If R
is 100, then R1 needs to be 100k.
2
Step 4: The resulting transfer function is shown in the
equation of Example 6-5.
EXAMPLE 6-5:SIMPLE, DOUBLE-PRECISION DAC WITH MCP4822
B
’s V
6
. Since 222=4.2x106,
has a resolution o f 1 mV,
OUTB
OUTA
by 1000
DS20002249B-page 30 2010-2015 Microchip Technology Inc.
MCP4802/4812/4822
DAC
R
SENSE
I
b
Load
I
L
V
DD
SPI
3-wire
V
CC
+
V
CC
–
V
OUT
I
L
V
OUT
R
sense
---------------
1+
-------------
=
I
b
I
L
----=
Common-Emitter Current Gainwhere
V
DD
or V
REF
(a) Single Output DAC:
MCP4801
MCP4811
MCP4821
(b) Dual Output DAC:
MCP4802
MCP4812
MCP4822
G = Gain selection (1x or 2x)
D
n
= Digital value of DAC (0-255) for MCP4801/MCP48 0 2
= Digital value of DAC (0-1023) for MCP4811/MCP4812
= Digital value of DAC (0-4095) for MCP4821/MCP4 822
N = DAC bit resolution
6.9Building Programmable Current
Source
Example 6-6 shows an example of building a
programmable current source using a voltage foll ower.
The current sensor (sen sor resist or) is used to convert
the DAC voltage output into a digitally-selectable
current source.
However, this also reduces the resolution that the
current can be controlled with. The voltage divider, or
“window”, DAC configuration would allow the range to
be reduced, thus increasing resolution around the
range of interest. Whe n wor king wit h very small sens or
voltages, pl an on e lim inating the amplifier’s off set e rror
by storing the DAC’s setting under known sensor
conditions.
Adding the resistor network from Example 6-2 would
be advantageous in this application. The smaller
DS20002249B-page 32 2010-2015 Microchip Technology Inc.
7.0DEVELOPMENT SUPPORT
7.1Evaluation and Demonstration
Boards
The Mixed Signal PICtail™ Demo Board supports the
MCP4802/4812/4822 family of devices. Refer to
www.microchip.com for further information on this
product’s capabilities and availability.
DS20002249B-page 34 2010-2015 Microchip Technology Inc.
MCP4802/4812/4822
Legend: XX...XCustomer-specific information
YYear code (last digit of calendar year)
YYYear code (last 2 digits of calendar year)
WWWeek code (week of January 1 is week ‘01’)
NNNAlphanume ric trac ea bil ity code
Pb-free JEDEC designator for Matte Tin (Sn)
*This package is Pb-free. The Pb-free JEDEC designator ()
can be found on the outer packaging for this package.
Note:In the event the full Microchip part nu mber ca nnot be m arked o n one lin e, it will
be carried over to the next line, thus limiting the number of available
characters for customer-specific information.
Microchip Technology Drawing No. C04-018D Sheet 2 of 2
For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Note:
8-Lead Plastic Dual In-Line (P) - 300 mil Body [PDIP]
UnitsINCHES
Dimension LimitsMINNOMMAX
Number of PinsN8
Pitch
e
.100 BSC
Top to Seating PlaneA--.210
Molded Package ThicknessA2.115.130.195
Base to Seating PlaneA1.015
Shoulder to Shoulder WidthE.290.310.325
Molded Package WidthE1.240.250.280
Overall LengthD.348.365.400
Tip to Seating PlaneL.115.130.150
Lead Thickness
c
.008.010.015
Upper Lead Widthb1.040.060.070
Lower Lead Width
b
.014.018.022
Overall Row SpacingeB--.430
BSC: Basic Dimension. Theoretically exact value shown without tolerances.
3.
1.
protrusions shall not exceed .010" per side.
2.
4.
Notes:
§
--
Dimensions D and E1 do not include mold flash or protrusions. Mold flash or
Pin 1 visual index feature may vary, but must be located within the hatched area.
§ Significant Characteristic
Dimensioning and tolerancing per ASME Y14.5M
e
DATUM ADATUM A
e
b
e
2
b
e
2
ALTERNATE LEAD DESIGN
(VENDOR DEPENDENT)
DS20002249B-page 40 2010-2015 Microchip Technology Inc.
MCP4802/4812/4822
Note:For the most current package drawings, please see the Microchip Packaging Specification located at
DS20002249B-page 48 2010-2015 Microchip Technology Inc.
Note the following details of the code protection feature on Microchip devices:
YSTEM
CERTIFIED BY DNV
== ISO / T S 16949==
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•The re are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are com mitted to continuously improving the c ode prot ection f eatures of our
products. Attempts to break Microchip’s code protection feature may be a violation of t he Digit al Mill ennium Copyright Act. If such act s
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and t he lik e is provided only for yo ur c o n ve nience
and may be su perseded by updates . I t is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life supp ort and/or safety ap plications is entir ely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless M icrochip from any and all dama ges, claims,
suits, or expenses re sulting from such use. No licens es are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
FlashFlex, flexPWR, JukeBlox, K
LANCheck, MediaLB, MOST, MOST logo, MPLAB,
OptoLyzer , PIC, PICSTART, PIC
SST, SST Logo, SuperFlash and UNI/O are registered
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
The Embedded Control Solutions Company and mTouch are
registered trademarks of Microchip Technology Incorporated
in the U.S.A.
Analog-for-the-Digital Age, BodyCom, chipKIT, chipKIT logo,
CodeGuard, dsPICDEM, dsPICDEM.net, ECAN, In-Circuit
Serial Programming, ICSP , Inter-Chip Connectivity, KleerNet,
KleerNet logo, MiWi, MPASM, MPF, MPLAB Certified logo,
MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code
Generation, PICDEM, PICDEM.net, PICkit, PICtail,
RightTouch logo, REAL ICE, SQI, Serial Quad I/O, Total
Endurance, TSHARC, USBCheck, VariSense, ViewSpan,
WiperLock, Wireless DNA, and ZENA are trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
SQTP is a service mark of Microchip T echnology Incorporated
in the U.S.A.
Silicon Storage Technology is a registered trademark of
Microchip Technology Inc. in other countries.
GestIC is a registered trademarks of Microchip Technology
Germany II GmbH & Co. KG, a subsidiary of Microchip
Technology Inc., in other countries.
All other trademarks mentioned herein are property of their
respective companies.
Microchip received ISO/TS-16949:2009 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
®
MCUs and dsPIC® DSCs, KEELOQ
®
code hopping
Worldwide Sales and Service
AMERICAS
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
http://www.microchip.com/
support
Web Address:
www.microchip.com
Atlanta
Duluth, GA
Tel: 678-957-9614
Fax: 678-957-1455
Austin, TX
Tel: 512-257-3370
Boston
Westborough, MA
Tel: 774-760-0087
Fax: 774-760-0088