English
Language : 

MC68HC05E0 Datasheet, PDF (55/96 Pages) Motorola, Inc – High-density complementary metal oxide semiconductor (HCMOS) microcontroller unit
6.2
Port C Wake-up Function
Each bit on Port C can be individually configured to operate in a wake-up mode which can interrupt
the processor when an appropriate signal edge or level is applied to the input pin (see Figure 6-2).
This is controlled by the corresponding Wake-up Enable bits (WE0 to WE7) in the Wake-up Enable
Register ($0013) and Wake-up Phase bits (WP0 to WP7) in the wake-up Phase Register ($0014).
Wake-up enable register
Address bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
$0013 WE7 WE6 WE5 WE4 WE3 WE2 WE1 WE0 0000 0000
WEx bit
1 (set) – Wake-up Interrupt enabled
6
0 (clear) – Wake-up Interrupt disabled
Wake-up phase register
Address bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
$0014 WP7 WP6 WP5 WP4 WP3 WP2 WP1 WP0 0000 0000
WPx bit:
1 (set) – Wake-up on rising edge or logic high level
0 (clear) – Wake-up on falling edge or logic low level
PITW (program interrupt type wake-up function), bit 4 of the Timer Control Register ($000C),
provides additional control of wake-up interrupts on Port C by selecting either edge or level
sensitive triggering.
Timer control register
Address bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
$000C SC1 SC0 PITX PITW 1 XROM CETB CETA 0000 1100
PITW
1 (set) – Level-triggered interrupt selected
0 (clear) – Edge-triggered only interrupt selected
If port C is used as an output port, the wake-up function is disabled. Therefore, a wake-up function
can only be used in conjunction with Port C being an input (see also Timer Control Register).
The wake-up function uses the INTX vector ($FFFA, $FFFB). In the INTX interrupt routine, the
user should test the WAKF flag (bit 7 in the Interrupt Control Register ($000E) to see if a wake-up
interrupt is pending. The wake-up interrupt routine should also clear the WAKF flag before
returning to the main program flow.
MC68HC05E0
PARALLEL INPUT/OUTPUT PORTS
MOTOROLA
6-3