HD6433935 Hitachi, HD6433935 Datasheet - Page 95

no-image

HD6433935

Manufacturer Part Number
HD6433935
Description
8-Bit MICROCONTROLLER
Manufacturer
Hitachi
Datasheet
3.4.3
Either of the following methods should be used for flag clearing in the interrupt request registers
(IRR1, IRR2, IWPR).
Method 1
Clear the interrupt request flag with a BCLR instruction. (Recommended method)
Sample coding for clearing IRRI1 (bit 1 of IRR1):
BCLR #1,@IRR1:8
Method 2
Write data to the interrupt request register with 0 for the relevant interrupt request flag and 1s for
the other flags. (Faster execution than Method 1)
Sample coding for clearing IRRI1 (bit 1 of IRR1):
MOV.B #B'11111101,R1L
MOV.B R1L,@IRR1:8
Figure 3-7 Port Mode Register Setting and Interrupt Request Flag Clearing Procedure
Notes on Interrupt Request Flag Clearing Methods
Clear interrupt request flag to 0
Set port mode register bit
Execute NOP instruction
CCR I bit
CCR I bit
1
0
Interrupts masked. (Another possibility
is to disable the relevant interrupt in
interrupt enable register 1.)
After setting the port mode register bit,
first execute at least one instruction
(e.g., NOP), then clear the interrupt
request flag to 0
Interrupt mask cleared
83

Related parts for HD6433935