SX Users Manual Rev. 3.1
134
© 2000 Scenix Semiconductor, Inc. All rights reserved.
www.scenix.com
Chapter 4 Clocking, Power Down, and Reset
4.3.2
Waking Up from the Power Down Mode
Any one of the following events will cause a wakeup from the power down state:
a timeout signal from the Watchdog timer, generated when the Watchdog timer overflows
a valid transition on any Port B pin configured to operate as a Multi-Input Wakeup pin
a low voltage on the MCLR input pin (Master Clear Reset)
a brown-out reset resulting from a low voltage on the power supply
When a wakeup event occurs, the TO and PD bits are both set to 1 in the STATUS register, and
program execution resumes at the highest program memory address, just like an ordinary reset
operation. The highest program memory address should contain an instruction to jump to the device
initialization routine.
4.4
Multi-Input Wakeup/Interrupt
The Multi-Input Wakeup circuit allows the Port B pins to be used as device inputs to wake up the
device from the power down state, or to trigger an interrupt from an external source.
The same Multi-Input Wakeup circuit is used for both wakeups and interrupts. In the power down state,
a wakeup signal on a Port B pin wakes up and resets the device, causing the program to jump to the
highest program memory address (7FFh or FFFh, depending on the SX device type). The same signal
received on a Port B pin during normal operation triggers an interrupt, which causes the device to save
the program context (program counter, W, STATUS, and FSR) and then jump to the lowest memory
address (000h). For more information on interrupts, see Chapter 6.
4.4.1
Port B Configuration for Multi-Input Wakeup/Interrupt
Figure 4-4 is a block diagram of the Multi-Input Wakeup circuit. The circuit uses the I/O pins of Port
B for the wakeup inputs. Port B must be properly configured for Multi-Input Wakeup operation. The
eight Port B pins can be individually configured for this purpose. You control the port configuration
by writing to its configuration registers using the MOV !RB,W instruction. Selection of those
registers is controlled by the MODE register.