|
4518 Datasheet, PDF (26/160 Pages) Renesas Technology Corp – SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER | |||
|
◁ |
4518 Group
(1) External 0 interrupt request flag (EXF0)
External 0 interrupt request flag (EXF0) is set to â1â when a valid
waveform is input to P30/INT0 pin.
The valid waveforms causing the interrupt must be retained at their
level for 4 clock cycles or more of the system clock (Refer to Figure
16).
The state of EXF0 flag can be examined with the skip instruction
(SNZ0). Use the interrupt control register V1 to select the interrupt
or the skip instruction. The EXF0 flag is cleared to â0â when an in-
terrupt occurs or when the next instruction is skipped with the skip
instruction.
(2) External 1 interrupt request flag (EXF1)
External 1 interrupt request flag (EXF1) is set to â1â when a valid
waveform is input to P31/INT1 pin.
The valid waveforms causing the interrupt must be retained at their
level for 4 clock cycles or more of the system clock (Refer to Figure
16).
The state of EXF1 flag can be examined with the skip instruction
(SNZ1). Use the interrupt control register V1 to select the interrupt
or the skip instruction. The EXF1 flag is cleared to â0â when an in-
terrupt occurs or when the next instruction is skipped with the skip
instruction.
⢠External 0 interrupt activated condition
External 0 interrupt activated condition is satisfied when a valid
waveform is input to P30/INT0 pin.
The valid waveform can be selected from rising waveform, falling
waveform or both rising and falling waveforms. An example of
how to use the external 0 interrupt is as follows.
⢠External 1 interrupt activated condition
External 1 interrupt activated condition is satisfied when a valid
waveform is input to P31/INT1 pin.
The valid waveform can be selected from rising waveform, falling
waveform or both rising and falling waveforms. An example of
how to use the external 1 interrupt is as follows.
â Set the bit 3 of register I1 to â1â for the INT0 pin to be in the in-
put enabled state.
â Select the valid waveform with the bits 1 and 2 of register I1.
â Clear the EXF0 flag to â0â with the SNZ0 instruction.
â Set the NOP instruction for the case when a skip is performed
with the SNZ0 instruction.
â Set both the external 0 interrupt enable bit (V10) and the INTE
flag to â1.â
â Set the bit 3 of register I2 to â1â for the INT1 pin to be in the in-
put enabled state.
â Select the valid waveform with the bits 1 and 2 of register I2.
â Clear the EXF1 flag to â0â with the SNZ1 instruction.
â Set the NOP instruction for the case when a skip is performed
with the SNZ1 instruction.
â Set both the external 1 interrupt enable bit (V11) and the INTE
flag to â1.â
The external 0 interrupt is now enabled. Now when a valid wave-
form is input to the P30/INT0 pin, the EXF0 flag is set to â1â and the
external 0 interrupt occurs.
The external 1 interrupt is now enabled. Now when a valid wave-
form is input to the P31/INT1 pin, the EXF1 flag is set to â1â and the
external 1 interrupt occurs.
Rev.3.01 2005.06.15 page 26 of 157
REJ03B0008-0301
|
▷ |