EM78P156N

OTP 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

(a) Before SLEEP

1.

Read I/O Port 6 (MOV R6,R6)

1.

Disable WDT1 (using very carefully)

2. Execute "ENI"

2.

Read I/O Port 6 (MOV R6,R6)

3.

Enable interrupt (Set IOCF.1)

3.

Execute "ENI" or "DISI"

4.

IF Port 6 change (interrupt)

4.

Enable interrupt (Set IOCF.1)

Interrupt vector (008H)

5.Execute "SLEP" instruction

(b) After Wake-up

1.IF "ENI" Interrupt vector (008H)

2.IF "DISI" Next instruction

VCC

Weakly

Pull-up

PORT

ROC

PCRD

P

Q D

R

 

CLK

PCWR

Q

C

 

L

 

 

 

P

Q DIOD R

PDWR

QC L

PDRD

 

0

Rex*

1

M U X

*The Rex is 430K ohm external resistor

Fig. 8 The Circuit of I/O Port with R-option(P50,P51)

1NOTE: Software disables WDT (watchdog timer) but hardware must be enabled before applying Port 6 Change Wake-Up function. (CODE Option Register and Bit 11 (ENWDTB-) set to “1”).

This specification is subject to change without prior notice. 19

07.29.2004 (V1.2)