Datasheet
2011 Microchip Technology Inc. DS39932D-page 377
PIC18F46J11 FAMILY
FIGURE 24-3: HIGH-VOLTAGE DETECT OPERATION (VDIRMAG = 1)
24.5 Applications
In many applications, it is desirable to have the ability to
detect a drop below, or rise above, a particular threshold.
For general battery applications, Figure 24-4 provides a
possible voltage curve.
Over time, the device voltage decreases. When the
device voltage reaches voltage, V
A, the HLVD logic
generates an interrupt at time, T
A. The interrupt could
cause the execution of an ISR, which would allow the
application to perform “housekeeping tasks” and
perform a controlled shutdown before the device
voltage exits the valid operating range at T
B.
The HLVD, thus, would give the application a time
window, represented by the difference between T
A and
T
B, to safely exit.
FIGURE 24-4: TYPICAL HIGH/
LOW-VOLTAGE DETECT
APPLICATION
VHLVD
VDD
LVDIF
VHLVD
VDD
Enable HLVD
TIRVST
LVDIF may not be set
Enable HLVD
LVDIF
LVDIF cleared in software
LVDIF cleared in software
LVDIF cleared in software,
CASE 1:
CASE 2:
LVDIF remains set since HLVD condition still exists
T
IRVST
IRVST
Internal Reference is stable
Internal Reference is stable
IRVST
Time
Voltage
VA
VB
TA
TB
VA = HLVD trip point
V
B = Minimum valid device
operating voltage
Legend: