Datasheet
2011-2012 Microchip Technology Inc. Preliminary DS41579D-page 169
PIC16(L)F1782/3
19.0 DIGITAL-TO-ANALOG
CONVERTER (DAC) MODULE
The Digital-to-Analog Converter supplies a variable
voltage reference, ratiometric with the input source,
with 256 selectable output levels.
The input of the DAC can be connected to:
•External V
REF pins
•V
DD supply voltage
• FVR (Fixed Voltage Reference)
The output of the DAC can be configured to supply a
reference voltage to the following:
• Comparator positive input
• ADC input channel
•DACOUT1 pin
•DACOUT2 pin
The Digital-to-Analog Converter (DAC) is enabled by
setting the DACEN bit of the DACCON0 register.
19.1 Output Voltage Selection
The DAC has 256 voltage level ranges. The 256 levels
are set with the DACR<7:0> bits of the DACCON1
register.
The DAC output voltage is determined by Equation 19-1:
EQUATION 19-1: DAC OUTPUT VOLTAGE
19.2 Ratiometric Output Level
The DAC output value is derived using a resistor ladder
with each end of the ladder tied to a positive and
negative voltage reference input source. If the voltage
of either input source fluctuates, a similar fluctuation will
result in the DAC output value.
The value of the individual resistors within the ladder
can be found in
Section 30.0 “Electrical
Specifications”
.
19.3 DAC Voltage Reference Output
The DAC voltage can be output to the DACOUT1 and
DACOUT2 pins by setting the respective DACOE1 and
DACOE2 pins of the DACCON0 register. Selecting the
DAC reference voltage for output on either DACOUT
X
pin automatically overrides the digital output buffer and
digital input threshold detector functions of that pin.
Reading the DACOUT
X pin when it has been
configured for DAC reference voltage output will
always return a ‘0’.
Due to the limited current drive capability, a buffer must
be used on the DAC voltage reference output for
external connections to either DACOUTx pin.
Figure 19-2 shows an example buffering technique.
IF DACEN = 1
VSOURCE+ = VDD, VREF, or FVR BUFFER 2
VSOURCE- = VSS
VOUT VSOURCE+VSOURCE-–
DACR 7:0
2
8
------------------------------
V
SOURCE-+=