- Published: Tuesday, 05 February 2013
- Written by Jon Chandler
Many of the 18F-series micros have an HIGH/LOW-VOLTAGE DETECT (HLVD) module that can be used to monitor VDD and warn if it has decreased below a specified voltage or increased above a specified voltage. This is a great technique for monitoring the supply voltage of a micro that is directly battery powered. It has several advantages over using an ADC channel for the purpose:
- No port pins are needed to implement.
- No external components are required and no power is consumed by an external voltage divider.
- The HLVD module uses an internal band-gap reference and draws a maximum of 45 µA when enabled. It can be disabled except when needed to reduce even this tiny current draw.
- It can generate an interrupt when VDDis below or above (depending on how it's configured) the selected set point.