Datasheet

2010 Microchip Technology Inc. DS22248A-page 33
MCP4901/4911/4921
6.8 Building Programmable Current
Source
Example 6-6 shows an example for 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 R
sense
is, the less power is 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 the resolution around the range of interest.
When working with very small sensor voltages, plan on
eliminating the amplifiers offset error by storing the
DAC's setting under known sensor conditions.
EXAMPLE 6-6: DIGITALLY-CONTROLLED CURRENT SOURCE.
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
----
=
G = Gain select (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
Common-Emitter Current Gainwhere
V
REF
V
DD
or V
REF
MCP4901
MCP4911
MCP4921
(a) Single Output DAC:
(b) Dual Output DAC:
MCP4902
MCP4912
MCP4922