| Electronic Components Datasheet Search |
|
PIC16C781 Datasheet(PDF) 69 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16C781 Datasheet(HTML) 69 Page - Microchip Technology |
|
69 / 186 page ![]() 2001 Microchip Technology Inc. Preliminary DS41171A-page 67 PIC16C781/782 Example 8-1 shows the configuration of the PLVD mod- ule and a sample polling routine to monitor for low volt- age conditions. EXAMPLE 8-1: PLVD EXAMPLE ;************************************************ ;* This code block will configure the PLVD for polling ;* and set the trip point for 4.2 to 4.4 volts ;* Includes polling routine ;* BANKSEL LVDCON ; Select Bank 1 BCF PIE1,LVDIE ; Disable PLVD interrupt MOVLW B’00011101’ MOVWF LVDCON ; Enable PLVD, 4.2-4.4V trip WRM_UP BTFSS LVDCON,BGST ; GOTO WRM_UP ; BANKSEL PIR1 ; Select Bank 0 BCF PIR1,LVDIF ; Clear PLVD interrupt flag ;************************************************** ;* Test for PLVD trip BANKSEL PIR1 ; Select Bank 0 BTFSC PIR1,LVDIF ; Test for PLVD trip GOTO LO_V_DET ; If tripped save 4 pwrfail 8.3 Operation During SLEEP When enabled, the PLVD circuitry continues to operate during SLEEP. If the device voltage crosses the trip point, the LVDIF bit is set and the device awakens from SLEEP. Device execution continues from the interrupt vector address, if interrupts have been globally enabled. 8.4 Effects of a RESET A device RESET forces all registers to their RESET state. This forces the PLVD module to be disabled. 8.5 Low Voltage Detect Registers The registers associated with Programmable Low Volt- age Detect are shown in Table 8-1. TABLE 8-1: SUMMARY OF REGISTERS ASSOCIATED WITH LOW VOLTAGE DETECT Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Value on: POR, BOR Value on all other RESETS 09Ch LVDCON — — BGST LVDEN LV3 LV2 LV1 LV0 --00 0101 --00 0101 08Ch PIE1 LVDIE ADIE C2IE C2IE — — — TMR1IE 0000 ---0 0000 ---0 08Ch PIR1 LVDIF ADIF C2IF C2IF — — — TMR1IF 0000 ---0 0000 ---0 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |