Datasheet

PIC12F752/HV752
DS41576B-page 116 Preliminary 2011 Microchip Technology Inc.
14.1 DAC Positive Voltage Source
The DACPSS bit of the DACCON0 register selects the
positive voltage source, V
SRC+. The following voltage
sources are available:
•V
DD pin (default)
•VREF+ pin
DAC module can select the positive voltage source
using the DACPSS bit of the DACCON0 register. The
default source, DACPSS = 0, connects V
DD to the pos-
itive voltage source (V
SRC+). VSRC+ can be changed to
the V
REF+ pin by setting DACPSS = 1.
14.2 DAC Range Selection
The DACRNG bit of the DACCON0 register selects
between full-range or limited-range DAC output
voltage.
Each range selects the output in 32 equal steps.
In Full-Range mode, the output is (31/32)*VSRC+. In
Limited-Range mode, the maximum V
OUT is limited to
6% of VSRC+, (31/512) * V
SRC+.
14.3 Ratiometric Output Level
The DAC output value is derived using a resistor ladder
with one end of the ladder tied to the positive voltage
reference and the other end tied to V
SS. If the voltage of
the input source fluctuates, a similar fluctuation will
result in the DAC output value.
The resistor values within the ladder can be found in
Section 20.0 “Electrical Specifications”.
14.4 DAC Output Voltage
The DAC output voltage level of the DAC is determined
by the DACRNG and the DACR<4:0> bits of the
DACCON0 and DACCON1 registers, respectively.
Use Equation 14-1 to determine the value of the DAC
output voltage. Example 14-1 illustrates the calculations
of the minimum, maximum and increment size of the
DAC output voltage in Full Range mode. Example 14-2
illustrates the Limited Range mode of the DAC output
voltage values.
EQUATION 14-1: DAC OUTPUT VOLTAGE
EXAMPLE 14-1: FULL RANGE MODE
EXAMPLE 14-2: LIMITED RANGE MODE
VOUT VSRC+
DACR 4:0
2
n
------------------------------






=
Note: The value of ‘n’ is determined by the DACRNG bit.
When: DACRNG = 0 (Limited Range mode); n = 9;
DACRNG = 1 (Full Range mode); n = 5.
Given: VSRC = VDD = 5V, DACRNG = 1 VOUT = [VSRC+ * (DACR<4:0>/2
5
)]
Minimum V
OUT Calculation: Maximum VOUT Calculation: Step Increment Calculation:
DACR<4:0> = 0 0000b, (0d); DACR<4:0> = 1 1111b, (31d); DACR<4:0> = 0 0001b, (1d);
V
OUT = [5V * (0/32)] = 0V; VOUT = [5V * (31/32)] = 4.84V; VOUT = [5V * (1/32)] = 156 mV
Full Range Mode Operation
:
0V V
OUT 4.84V, with 32-step increments of 156 mV.
Given: VSRC = VDD = 5V, DACRNG = 0 VOUT = [VSRC+ * (DACR<4:0>/2
9
)]
Minimum V
OUT Calculation: Maximum VOUT Calculation: Step Increment Calculation:
DACR<4:0> = 0 0000b, (0d); DACR<4:0> = 1 1111b, (31d); DACR<4:0> = 0 0001b, (1d);
V
OUT = [5V * (0/512)] = 0V; VOUT = [5V * (31/512)] = 303 mV; VOUT = [5V * (1/512)] = 9.8 mV
Limited Range Mode Operation
:
0V V
OUT 303 mV, with 32-step increments of 9.8 mV.