English
Language : 

PIC16C717_13 Datasheet, PDF (104/224 Pages) Microchip Technology – 18/20-Pin, 8-Bit CMOS Microcontrollers with 10/12-Bit A/D
PIC16C717/770/771
10.3 Low Voltage Detect (LVD)
This module is used to generate an interrupt when the
supply voltage falls below a specified “trip” voltage.
This module operates completely under software
control. This allows a user to power the module on
and off to periodically monitor the supply voltage, and
thus minimize total current consumption.
The LVD module is enabled by setting the LVDEN bit in
the LVDCON register. The “trip point” voltage is the
minimum supply voltage level at which the device can
operate before the LVD module asserts an interrupt.
When the supply voltage is equal to or less than the trip
point, the module will generate an interrupt signal set-
ting interrupt flag bit LVDIF. If interrupt enable bit LVDIE
was set, then an interrupt is generated. The LVD inter-
rupt can wake the device from SLEEP. The "trip point"
voltage is software programmable to any one of 16 val-
ues, five of which are reserved (See Figure 10-1). The
trip point is selected by programming the LV<3:0> bits
(LVDCON<3:0>).
Note:
The LVDIF bit can not be cleared until the
supply voltage rises above the LVD trip
point. If interrupts are enabled, clear the
LVDIE bit once the first LVD interrupt
occurs to prevent reentering the interrupt
service routine immediately after exiting
the ISR.
Once the LV bits have been programmed for the spec-
ified trip voltage, the low-voltage detect circuitry is then
enabled by setting the LVDEN (LVDCON<4>) bit.
If the bandgap reference voltage is previously unused
by either the brown-out circuitry or the voltage refer-
ence circuitry, then the bandgap circuit requires a time
to start-up and become stable before a low voltage con-
dition can be reliably detected. The low-voltage inter-
rupt flag is prevented from being set until the bandgap
has reached a stable reference voltage.
When the bandgap is stable the BGST (LVDCON<5>)
bit is set indicating that the low-voltage interrupt flag bit
is released to be set if VDD is equal to or less than the
LVD trip point.
10.3.1 EXTERNAL ANALOG VOLTAGE INPUT
The LVD module has an additional feature that allows
the user to supply the trip voltage to the module from
an external source. This mode is enabled when
LV<3:0> = 1111. When these bits are set the compar-
ator input is multiplexed from an external input pin
(RA1/AN1/LVDIN).
DS41120C-page 104
 1999-2013 Microchip Technology Inc.