Datasheet

2000 Microchip Technology Inc. Preliminary DS40197B-page 15
PIC16HV540
4.5 OPTION2 Register
The OPTION2 register is a 6-bit wide, write-only regis-
ter which contains various control bits to configure the
added features on the PIC16HV540. A Power-on Reset
sets the OPTION2<5:0> bits.
Example 4-2 illustrates how to initialize the OPTION2
register.
EXAMPLE 4-2: INSTRUCTIONS FOR INITIALIZING OPTION2 REGISTER
movlw 0001 0111b ; load OPTION2 setup value into W
tris 0x07 ; initialize OPTION2 register
REGISTER 4-3: OPTION2 REGISTER (TRIS 07H)
Note: All Power-on Resets will disable the
Brown-out Detect circuit. All subsequent
resets will not disable the Brown-out
Detect if enabled.
U-0 U-0 W-1 W-1 W-1 W-1 W-1 W-1
PCWU SWDTEN RL SL BODL BODEN W = Writable bit
U = Unimplemented bit
- n = Value at POR reset
bit7 0
bit 7-6: Unimplemented
bit 5: PCWU
: Wake-up on Pin Change
1 = Disabled
0 = Enabled
bit 4: SWDTEN
: Software Controlled WDT Enable bit
1 = WDT is turned off it the WDTEN configuration bit = 0
0 = WDT is on if the WDTEN configuration bit = 0; if WDTEN bit = 1, then SWDTEN is dont care
bit 3: RL: Regulated Voltage Level Select bit
1 = 5 volt
0 = 3 volt
bit 2: SL: Sleep Voltage Level Select bit
1 = RL bit setting
0 = 3 volt
bit 1: BODL: Brown-out Voltage Level Select bit
1 = RL bit setting, but SL during SLEEP
0 = 3 volt
bit 0: BODEN
: Brown-out Enabled
1 = Disabled
0 = Enabled