English
Language : 

PIC16LF18854 Datasheet, PDF (386/668 Pages) Microchip Technology – C Compiler Optimized RISC Architecture
PIC16(L)F18856/76
25.0 5-BIT DIGITAL-TO-ANALOG
CONVERTER (DAC1) 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
• DAC1OUT pin
The Digital-to-Analog Converter (DAC) is enabled by
setting the DAC1EN bit of the DAC1CON0 register.
25.1 Output Voltage Selection
The DAC has 32 voltage level ranges. The 32 levels
are set with the DAC1R<4:0> bits of the DAC1CON1
register.
The DAC output voltage is determined by Equation 25-1:
EQUATION 25-1: DAC OUTPUT VOLTAGE
VOUT
=




VSO
U
R
CE+
–
VSOURCE-

D-----A----C-----1-2--R-5-------4---:--0----
+ VSOURCE-
VSOURCE+ = VDD or VREF+ or FVR
VSOURCE- = VSS or VREF-
25.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 Table 37-15.
25.3 DAC Voltage Reference Output
The DAC voltage can be output to the DAC1OUT1/2
pins by setting the DAC1OE1/2 bits of the DAC1CON0
register, respectively. Selecting the DAC reference
voltage for output on the DAC1OUT1/2 pins
automatically overrides the digital output buffer and
digital input threshold detector functions, disables the
weak pull-up, and disables the current-controlled drive
function of that pin. Reading the DAC1OUT1/2 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 the DAC1OUT1/2 pins.
Figure 25-2 shows an example buffering technique.
DS40001824A-page 386
Preliminary
 2016 Microchip Technology Inc.