cop8tab9 National Semiconductor Corporation, cop8tab9 Datasheet - Page 30

no-image

cop8tab9

Manufacturer Part Number
cop8tab9
Description
8-bit Cmos Flash Microcontroller With 2k Byte Or 4k Byte Memory
Manufacturer
National Semiconductor Corporation
Datasheet
www.national.com
13.0 Power Save Modes
13.3 MULTI-INPUT WAKE-UP
The Multi-Input Wake-Up feature is used to exit from the
HALT and IDLE modes. In addition, the Multi-Input Wake-
Up/Interrupt feature may be used to generate up to 16
edge-selectable external interrupts on the 44-pin devices or
8 interrupts on the 20- and 28-pin devices. Figure 24 shows
the Multi-Input Wake-Up logic.
The Multi-Input Wake-Up feature uses the C and L ports.
(The 20- and 28-pin devices only have the L port.) Software
selects which port bit (or set of port bits) may cause the
device to exit the HALT or IDLE modes. The selection is
controlled by the CWKEN and LWKEN registers. These
registers are 8-bit read/write registers, which contain control
bits that correspond to the C and L port bits. Setting a
CWKEN or LWKEN bit enables a Wake-Up event or interrupt
from the associated C or L port pin.
If the ACCESS.Bus module is enabled, port pin L0 may also
be used to generate a Wake-Up event on ACCESS.Bus
activity. Please see the section on Section 17.0 ACCESS-
.Bus Interface for more information.
Software selects whether the trigger condition on the se-
lected port pin is a positive edge (low-to-high transition) or a
negative edge (high-to-low transition). The trigger conditions
are selected in the CWKEDG and LWKEDG registers, which
are 8-bit control registers with bits corresponding to the C
and L port pins. Setting a trigger condition control bit selects
the negative edge, while clearing the bit selects the positive
edge.
The occurrence of a selected trigger condition is latched in
the pending registers called CWKPND and LWKPND. The
bits of these registers correspond to the C and L port pins.
These bits are set on the occurrence of the selected trigger
condition on the corresponding port pin, whether or not the
trigger condition is enabled in CWKEN or LWKEN. Software
has responsibility for clearing the pending bits before en-
abling them for Wake-Up events or interrupts. Any set pend-
(Continued)
FIGURE 23. Wake-Up from IDLE
30
ing bit in CWKPND or LWKPND remains set until cleared by
software. The device will not enter HALT or IDLE mode if any
Wake-Up input is both enabled and pending.
Changing a trigger condition control bit requires several
steps to avoid generating a spurious Wake-Up event or
interrupt as a side effect
• First, the corresponding CWKEN or LWKEN bit should be
• Second, the trigger condition is selected in CWKEDG or
• Third, any spurious pending event is removed by clearing
• Finally, the trigger is re-enabled by setting the associated
An example shows how software performs this procedure.
Assume the trigger condition for L port bit 5 is to be changed
from positive (low-to-high transition) to negative (high-to-low
transition), and bit 5 has previously been enabled for an
input interrupt. Software would execute the following instruc-
tions:
If the C or L port pins have been used as outputs and then
changed to inputs using the Multi-Input Wake-Up feature, a
safe procedure should be used to avoid generating a spuri-
ous Wake-Up event or interrupt. After the selected C or L
port pins have been changed from output to input, the trigger
conditions are selected in CWKEDG or LWKEDG and the
pending bits in CWKPND or LWKPND are cleared. Finally,
the CWKEN or LWKEN bits are set to enable the desired
Wake-Up events or interrupts.
The same procedure should be used following reset, be-
cause the C and L port pins are left floating. The CWKPND
RBIT 5, LWKEN
SBIT 5, LWKEDG
RBIT 5, LWKPND
SBIT 5, LWKEN
cleared to disable any Wake-Up event or interrupt for that
port pin.
LWKEDG.
the associated bit in CWKPND or LWKPND.
bit in CWKEN or LWKEN.
; Disable MIWU Port L.5
; Change edge polarity
; Reset pending flag
; Enable MIWU Port L.5
20047535

Related parts for cop8tab9