beautypg.com

NEC PD75402A User Manual

Page 149

background image

138

CHAPTER 6. INTERRUPT FUNCTIONS

(2)

Example using INTBT, INT0 (falling edge active), and INTCSI

Reset

MOV

MOV
CLR1

EI

EI
EI
EI

RETI

INT0

A, #1
IM0, A
IRQ0
IEBT
IE0
IECSI

; MBE = 0

Status 0

Status 1

Status 0

All interrupts disabled and status 0 set by RESET input.

INT0 set to falling edge active.

Interrupts enabled by EI and EI IE

×××

instructions.

On fall of INT0, INT0 interrupt service program is started, status is changed to 1 and all interrupts are

disabled.

RETI instruction effects return from interrupt, restores status to 0, and enables interrupts.

4

This manual is related to the following products: