3.2.1 Voltage Thresholds
The voltage thresholds define the minimum valid output levels. Voltages above and below the max and min are considered valid, with anything between the two considered a brown-out. These constants are defined as ADC_THRESHOLD_HIGH and ADC_THRESHOLD_LOW and represent the desired value as seen by the ADC. To convert a number into this format, the following formula can be used:
Where VNUM is the desired value to convert, VREF is the reference voltage of the ADC, and n is the resolution of the ADC (n = 10 on the PIC16F15245).