32.3 Buffered DAC Output Range Selection
The DAC offers selectable output ranges that improve the output performance of the buffered DAC output (DAC1OUT1). Range selection allows module hardware to optimize the DAC buffer output by biasing the reference voltages towards either DACxREF+ (high range) or DACxREF- (low range). Range selection can be done automatically or through software control.
The DAC Buffer Automatic Range Select Enable (DACAUTOEN) bit of the Configuration Words is used to select either user software-controlled ranging or automatic ranging via hardware control.
1
), the range is determined by the Buffer Reference Range Selection
(REFRNG) bit in user software. When REFRNG is set (REFRNG =
1
), the high range ((VSS + 1.0V) through VDD)
is selected as the voltage reference range. When REFRNG is clear (REFRNG =
0
), the low range (VSS through (VDD - 1.0V)
is selected as the reference range.When DACAUTOEN is clear (DACAUTOEN =
0
), module hardware monitors the DACxDATL register and automatically
selects the appropriate range based on the DACxDAT value.
- Enable the DAC Auto-Ranging
feature in the Configuration Words (DACAUTOEN =
0
) - Set the Charge Pump to Auto mode
(CPCONbits.CPON =
‘b10
) - Wait the required settling time when changing the DACxDATL values (see the “Electrical Specifications” section)
This allows module hardware to continuously monitor the DAC output and VDD levels to ensure a stable, accurate result with little software overhead.