EM78156E
8-Bit Microcontroller with MASK ROM
Table 4 Usage of Port 6 Input Change Wake-up/Interrupt Function
Usage of Port 6 input status changed Wake-up/Interrupt
(I) Wake-up from Port 6 Input Status change
(II) Port 6 Input Status Change Interrupt
1. Read I/O Port 6 (MOV R6,R6)
2. Execute "ENI"
(a) Before SLEEP
1. Disable WDT2 (using very carefully)
2. Read I/O Port 6 (MOV R6,R6)
3. Execute "ENI" or "DISI"
3. Enable interrupt (Set IOCF.1)
4. IF Port 6 change (interrupt)
→ Interrupt vector (008H)
4. Enable interrupt (Set IOCF.1)
5. Execute "SLEP" instruction
(b) After Wake-up
1. IF "ENI" → Interrupt vector (008H)
2. IF "DISI" → Next instruction
PCRD
ROC
VCC
P
R
Q
Q
D
Weakly
Pull-up
CLK
PCWR
C
L
P
R
PORT
Q
Q
D
IOD
PDWR
C
L
PDRD
0
1
M
U
X
Rex*
*The Rex is 430K ohm external resistor
Fig. 8 The Circuit of I/O Port with R-option(P50,P51)
4.5 RESET and Wake-up
4.5.1 RESET
A RESET is initiated by one of the following events-
(1) Power on reset.
2 NOTE: Software disables WDT (watchdog timer) but hardware must be enabled before applying Port
6 Changed Wake-up function. (CODE Option Register and Bit 11 (ENWDT) are set to “1”).
Product Specification (V1.3) 07.29.2004
• 15
(This specification is subject to change without further notice)