English
Language : 

PIC16F1847_13 Datasheet, PDF (151/440 Pages) Microchip Technology – 18/20/28-Pin Flash Microcontrollers with XLP Technology
17.0 DIGITAL-TO-ANALOG
CONVERTER (DAC) MODULE
The Digital-to-Analog Converter supplies a variable
voltage reference, ratiometric with the input source,
with 32 selectable output levels.
The input of the DAC can be connected to:
• External VREF pins
• VDD 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
• DACOUT pin
The Digital-to-Analog Converter (DAC) can be enabled
by setting the DACEN bit of the DACCON0 register.
17.1 Output Voltage Selection
The DAC has 32 voltage level ranges. The 32 levels
are set with the DACR<4:0> bits of the DACCON1
register.
The DAC output voltage is determined by the following
equations:
EQUATION 17-1: DAC OUTPUT VOLTAGE
VOUT
=



VSOURCE+
–
VSOURCE- 

-D----A----C----2R---5-<----4---:-0--->--
+ VSRC-
Note:
VSOURCE+ can equal FVR Buffer 2, VDD or
VREF+. VSOURCE- can equal VSS or VREF-.
PIC16(L)F1847
17.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”.
17.3 DAC Voltage Reference Output
The DAC can be output to the DACOUT pin by setting
the DACOE bit of the DACCON0 register to ‘1’. Selecting
the DAC reference voltage for output on the DACOUT
pin automatically overrides the digital output buffer and
digital input threshold detector functions of that pin.
Reading the DACOUT 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 DACOUT. Figure 17-2 shows
an example buffering technique.
 2011-2013 Microchip Technology Inc.
Preliminary
DS40001453D-page 151