CHAPTER 6. INTERRUPT FUNCTIONS

The format of the edge detection mode register (IM0) which is used to select the detected edge is shown in Fig. 6-6. IM0 is set by 4-bit memory handling instructions.

On an RESET input, all bits of IM0 are cleared to 0 and the rising edge is specified for INT0.

Fig. 6-6 Edge Detection Mode Register Format

Address 3 2 1 0 Symbol

FB4H IM03

0

IM01 IM00

IM0

Detected edge specification

0

0

Rising edge specification

 

 

 

0

1

Falling edge specification

 

 

 

1

0

Rising and falling edge specification

 

 

 

1

1

Ignored (interrupt request flag is not set)

 

 

 

Sampling clock specification

0Φ (0.95 μs/1.91 μs/15.3 μs: operating at 4.19 MHz)

1fx/64 (15.3 μs: Operating at 4.19 MHz)

Note As the interrupt request flag may be set when the edge detection mode register is modified, the following procedure should be used: Disable interrupts and modify the mode register in advance, clear the interrupt request flag with the CLR1 instruction, and then enable interrupts again. Also, when fX/64 is selected as the sampling clock by modifying IM0, the interrupt request flag must be cleared after the elapse of 16 machine cycles following the mode register modification.

(3) Interrupt master enable flag (IME)

The interrupt master enable flag specifies acknowledgment enabled/disabled for all interrupts. IME is manipulated by the EI/DI instructions.

With a RESET input, IME is cleared to 0 and acknowledgment of all interrupts is disabled.

Address

FB2H

Fig. 6-7 IME Format

3

IME

Interrupt master enable flag (IME)

 

0

All interrupts are disabled, vectored interrupts

 

are notinitiated.

 

 

 

 

 

 

1

Interrupt enabling/disabling is controlled by the

 

corresponding interrupt enable flag.

 

 

 

 

 

132

Page 143
Image 143
NEC PD75402A, PD75P402 user manual Interrupt master enable flag IME, 132, FB4H IM03, FB2H