English
Language : 

PIC18F6390 Datasheet, PDF (256/412 Pages) Microchip Technology – 64/80-Pin Flash Microcontrollers with LCD Driver and nanoWatt Technology
PIC18F6390/6490/8390/8490
FIGURE 21-3:
CASE 1:
HIGH-VOLTAGE DETECT OPERATION (VDIRMAG = 1)
HLVDIF may not be set
VDD
VLVD
HLVDIF
Enable HLVD
IRVST
CASE 2:
VDD
TIVRST
Internal Reference is stable
HLVDIF cleared in software
VLVD
HLVDIF
Enable HLVD
IRVST
TIVRST
Internal Reference is stable
HLVDIF cleared in software
HLVDIF cleared in software,
HLVDIF remains set since HLVD condition still exists
21.5 Applications
In many applications, the ability to detect a drop below,
or rise above a particular threshold, is desirable. For
example, the HLVD module could be periodically
enabled to detect USB attach or detach. This assumes
the device is powered by a lower voltage source than
the Universal Serial Bus when detached. An attach
would indicate a high-voltage detect from, for example,
3.3V to 5V (the voltage on USB) and vice versa for a
detach. This feature could save a design a few extra
components and an attach signal (input pin).
For general battery applications, Figure 21-4 shows a
possible voltage curve. Over time, the device voltage
decreases. When the device voltage reaches voltage
VA, the HLVD logic generates an interrupt at time TA.
The interrupt could cause the execution of an ISR,
which would allow the application to perform “house-
keeping tasks” and perform a controlled shutdown
before the device voltage exits the valid operating
range at TB. The HLVD, thus, would give the
application a time window, represented by the
difference between TA and TB, to safely exit.
FIGURE 21-4:
TYPICAL LOW-VOLTAGE
DETECT APPLICATION
VA
VB
Time TA TB
Legend: VA = HLVD trip point
VB = Minimum valid device
operating voltage
DS39629B-page 254
Preliminary
 2004 Microchip Technology Inc.