English
Language : 

PIC18F47J53 Datasheet, PDF (61/586 Pages) Microchip Technology – 28/44-Pin, High-Performance USB Microcontrollers with nanoWatt XLP Technology
PIC18F47J53 FAMILY
4.7 Ultra Low-Power Wake-up
The Ultra Low-Power Wake-up (ULPWU) on RA0 allows
a slow falling voltage to generate an interrupt-on-change
without excess current consumption.
Follow these steps to use this feature:
1. Configure a remappable output pin to output the
ULPOUT signal.
2. Map an INTx interrupt-on-change input function to
the same pin as used for the ULPOUT output func-
tion. Alternatively, in step 1, configure ULPOUT to
output onto a PORTB interrupt-on-change pin.
3. Charge the capacitor on RA0 by configuring the
RA0 pin to an output and setting it to ‘1’.
4. Enable interrupt-on-change (PIE bit) for the
corresponding pin selected in step 2.
5. Stop charging the capacitor by configuring RA0
as an input.
6. Discharge the capacitor by setting the ULPEN
and ULPSINK bits in the WDTCON register.
7. Configure Sleep mode.
8. Enter Sleep mode.
When the voltage on RA0 drops below VIL, an interrupt
will be generated, which will cause the device to
wake-up and execute the next instruction.
This feature provides a low-power technique for
periodically waking up the device from Sleep mode.
The time-out is dependent on the discharge time of the
RC circuit on RA0.
When the ULPWU module causes the device to
wake-up from Sleep mode, the ULPLVL (WDTCON<5>)
bit is set. When the ULPWU module causes the device
to wake-up from Deep Sleep, the DSULP
(DSWAKEL<5>) bit is set. Software can check these bits
upon wake-up to determine the wake-up source. Also in
Sleep mode, only the remappable output function,
ULPWU, will output this bit value to an RPn pin for
externally detecting wake-up events.
See Example 4-1 for initializing the ULPWU module.
Note:
For module related bit definitions, see the
WDTCON register in Section 28.2
“Watchdog Timer (WDT)” and the
DSWAKEL register (Register 4-6).
 2010 Microchip Technology Inc.
Preliminary
DS39964B-page 61