English
Language : 

MCP4822E-SN Datasheet, PDF (31/46 Pages) Microchip Technology – 8/10/12-Bit Dual Voltage Output Digital-to-Analog Converter with Internal VREF and SPI Interface
MCP4802/4812/4822
6.9 Building Programmable Current
Source
Example 6-6 shows an example of building a
programmable current source using a voltage follower.
The current sensor (sensor resistor) is used to convert
the DAC voltage output into a digitally-selectable
current source.
Adding the resistor network from Example 6-2 would
be advantageous in this application. The smaller
RSENSE is, the less power dissipated across it.
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. When working with very small sensor
voltages, plan on eliminating the amplifier’s offset error
by storing the DAC’s setting under known sensor
conditions.
EXAMPLE 6-6: DIGITALLY-CONTROLLED CURRENT SOURCE
(a) Single Output DAC:
MCP4801
MCP4811
MCP4821
(b) Dual Output DAC:
MCP4802
MCP4812
MCP4822
VDD
DAC
SPI
3-wire
VOUT
VDD or VREF
VCC+
Load
IL
Ib
VCC–
RSENSE
Ib = I---L-
IL = R-V---s-O--e--Un---s-T-e  -----+------1-
where Common-Emitter Current Gain
G = Gain selection (1x or 2x)
Dn = 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
 2010 Microchip Technology Inc.
DS22249A-page 31