English
Language : 

EM78P341 Datasheet, PDF (86/102 Pages) ELAN Microelectronics Corp – 8-Bit Microprocessor with OTP ROM
EM78P341N/342N/343N
8-Bit Microprocessor with OTP ROM
6.14.3 Programming Process
Follow these steps to obtain data from the LVD:
1. Write to the two bits (LVD1: LVD0) on the LVDCR register to define the LVD level.
2. Set the LVDWE bit, if the wake-up function is employed.
3. Set the LVDIE bit, if the interrupt function is employed.
4. Write “ENI” instruction, if the interrupt function is employed.
5. Set LVDEN bit to 1
6. Write “SLEP” instruction or Polling /LVD bit.
7. Clear the interrupt flag bit (LVDIF) when Low Voltage Detector interrupt occurred.
The internal LVD module uses the internal circuit, and when the code option is set to
enable the LVD module, the current consumption will increase to about 5µA.
During sleep mode, the LVD module continues to operate. If the device voltage drops
slowly and crosses the detect point, the LVDIF bit will be set and the device will wake
up from Sleep mode. The LVD interrupt flag is still set as the prior status.
When the system resets, the LVD flag will be cleared.
Figure 6-25 shows the LVD module to detect the external voltage situation.
When Vdd drops not below VLVD, LVDIF is kept at “0”. When Vdd drops below VLVD,
LVDIF is set to “1”. If global ENI is enabled, LVDIF will be set to “1”, the next instruction
will branch to an interrupt vector. The LVD interrupt flag is cleared to “0” by software.
When Vdds drops below VRESET and it is less than 80µs, the system will keep all the
register status and the system halts but oscillation is active. When Vdd drops below
VRESET and it is more than 80µs, a system reset will occur. Refer to Section 6.5.1 for
detailed RESET description.
Vdd
LVDIF is cleared by software
VLVD
VRESET
LVDIF
Internal
Reset
<LVR Voltage drop
18ms
>LVR Voltage drop
Vdd < Vreset not longer than 80us, the system still keeps on operating
System occur reset
Fig. 6-25 LVD Waveform Situation
80 •
Product Specification (V1.0) 12.01.2006
(This specification is subject to change without further notice)