NEC PD750008 User Manual

Page 224

Advertising
background image

204

µPD750008 USER'S MANUAL

(2) Example of using INTBT, INT0 (falling edge active), and INTT0 without multiple interrupt processing

<1> A RESET signal disables all interrupts, setting status 0.

<2> INT0 is set to be falling edge active.

<3> Interrupts are enabled by the EI and EI IExxx instructions.

<4> On the falling edge of INT0, the INT0 interrupt service program is started, status is set to 1, and all

interrupts are disabled.

<5> Control is returned from the interrupts by the RETI instruction, status 0 is set again, and interrupts

are enabled.

Remark If all the interrupts are used as having the lower priority as shown in this example, saving or

restoring the register bank is not necessary if RBE = 1 and RBS = 2 for the main program and

register banks 2 and 3 are used, and RBE = 0 for the interrupt service program and register banks

0 and 1 are used.

*

; RBE = 1, MBE = 0

<Main program>

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

••

Reset

<2> MOV

Status 0

Status 0

Status 1

A, #1

MOV IM0,

A

CLR1 IRQ0

<3> EI IEBT

EI

IE0

EI

IET0

EI

<4> INT0

<5> RETI

<INT0 service program>

<1>

; RBE = 0

Advertising
This manual is related to the following products: