SX User’s Manual Rev. 3.1 136 © 2000 Scenix Semiconductor, Inc. All rights reserved. www.scenix.com Chapter 4 Clocking, Power Down, and Reset These are the configuration registers that you must program in order to prepare Port B pins for Multi-
Input Wakeup/Interrupt operation:
RB Data Direction register WKEN_B (Port B Wakeup Enable register) WKED_B (Port B Wakeup Edge Select register) WKPND_B (Port B Wakeup Pending Flag register) To make a Port B pin operate as a high-impedance input (not as an output), set the corresponding bit
to 1 in the RB data direction register.
To enable a Port B pin to operate as a Multi-Input Wakeup input, clear the corresponding bit to 0 in
the WKEN_B register.
To specify the edge sensitivity of the pin, set or clear the corresponding bit in the WKED_B register.
Set the bit to 1 to sense falling edges (high-to-low transitions) or clear the bit to 0 to sense rising edges
(low-to-high  transitions).  An  edge  of  the  specified  type  on  the  wakeup-enabled  pin  will  trigger  a
wakeup or interrupt.
The WKPND_B register contains flag bits that indicate occurrences of wakeup/interrupt events on the
Port B pins. When a valid edge is received on a wakeup-enabled pin, it sets the corresponding flag bit
is set to 1 in the WKPND_B register and triggers the wakeup or interrupt. The program can read the
WKPND_B register to determine which Port B pin received the wakeup/interrupt signal.
Upon reset, the WKPND_B register contains unknown data. Therefore, the program should clear this
register  to  zero  before  it  enables  the  Multi-Input  Wakeup  function  in  the  WKEN_B  register.
Otherwise, the program will not be able to determine which pin received the wakeup signal.
Upon reset, the WKEN_B register is set to FFh. This disables the wakeup interrupts by default. You
must explicitly enable any pins that you want to use as wakeup/interrupt pins.