
______
INT Interrupt
Mitsubishi microcomputers
M30220 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
45
______
INT Interrupt
________
INT0 to INT5 are triggered by the edges of external inputs. The edge polarity is selected using the polarity select bit.
________
Of interrupt control registers, 005816 is used both as timer A3 and external interrupt INT4 input control register, and
________
005916 is used both as timer A4 and as external interrupt INT5 input control register. Use the interrupt request cause
select bits - bits 6 and 7 of the interrupt request cause select register 1 (address 035F16) - to specify which interrupt
________
request cause to select. When INT4 is selected as an interrupt source, the input port for it can be selected by bits 0 and
________
1 of the interrupt source select register 0 (address 035E16). Similarly, when INT5 is selected as an interrupt source, the
input port for it can be selected by bits 2 and 3 of the interrupt source select register 0 (address 035E16). After having
set an interrupt request cause and interrupt input ports, be sure to set the corresponding interrupt request bit to “0”
before enabling an interrupt.
Either of the interrupt control registers - 005816, 005916 - has the polarity-switching bit. Be sure to set this bit to “0” to
select an timer as the interrupt request cause.
As for external interrupt input, an interrupt can be generated both at the rising edge and at the falling edge by setting
_______
“1” in the INTi interrupt polarity switching bit of the interrupt request cause select register 1 (035F16). To select two
edges, set the polarity switching bit of the corresponding interrupt control register to ‘falling edge’ (“0”).
________
When INT4 input pin select bits = “11”, INT4 interrupt polarity switching bit = “0”, and polarity select bit = “1” of the INT4
interrupt control register, an interrupt is generated by a rising edge on the input port when the exclusive pin is “H”, as
shown by “Single edge, Rise” in Figure 1.10.12. When the exclusive pin is “H”, interrupts can only be generated by an
________
active transition on a single edge. The same applies to INT5.
Figure 1.10.10 shows the interrupt request cause select register.
Figure 1.10.10. Interrupt request cause select registers 0, 1
Interrupt request cause select register 1
Bit name
Function
Bit
symbol
W
R
Symbol
Address
When reset
IFSR1
035F16
0016
IFSR10
b7
b6
b5
b4
b3
b2
b1
b0
INT0 interrupt polarity
switching bit
0 : Timer A3
1 : INT4
0 : Timer A4
1 : INT5
0 : One edge
1 : Two edges
0 : One edge
1 : Two edges
0 : One edge
1 : Two edges
0 : One edge
1 : Two edges
0 : One edge
1 : Two edges
INT1 interrupt polarity
switching bit
INT2 interrupt polarity
switching bit
INT3 interrupt polarity
switching bit
INT4 interrupt polarity
switching bit
INT5 interrupt polarity
switching bit
0 : One edge
1 : Two edges
Interrupt request cause
select bit
Interrupt request cause
select bit
IFSR11
IFSR12
IFSR13
IFSR14
IFSR15
IFSR16
IFSR17
Interrupt request cause select register 0
Bit name
Function
Bit
symbol
W
R
Symbol
Address
When reset
IFSR0
035E16
X00000002
IFSR00
b7
b6
b5
b4
b3
b2
b1
b0
INT4 input pin select bit
00: No INT4 input
01: P46 input enabled
10: P47 input enabled
11: P46, P47 input enabled
0 : Timer A5
1 :
Bus collision detection
INT5 input pin select bit
Interrupt request cause
select bitt
Reserved bit
Must always be set to “0”
IFSR01
IFSR02
IFSR03
IFSR04
00
00: No INT5 input
01: P80 input enabled
10: P81 input enabled
11: P80, P81 input enabled
Nothing is assigned.
In an attempt to write to this bit, write “0”. The value, if read, turns out
to be indeterminate.