English
Language : 

M38258MCM Datasheet, PDF (18/70 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
3825 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
INTERRUPTS
Interrupts occur by seventeen sources: eight external, eight inter-
nal, and one software.
Interrupt Control
Each interrupt is controlled by an interrupt request bit, an interrupt
enable bit, and the interrupt disable flag except for the software in-
terrupt set by the BRK instruction. An interrupt occurs if the corre-
sponding interrupt request and enable bits are “1” and the inter-
rupt disable flag is “0”.
Interrupt enable bits can be set or cleared by software.
Interrupt request bits can be cleared by software, but cannot be
set by software.
The BRK instruction cannot be disabled with any flag or bit. The I
flag disables all interrupts except the BRK instruction interrupt.
When several interrupts occur at the same time, the interrupts are
received according to priority.
Interrupt Operation
By acceptance of an interrupt, the following operations are auto-
matically performed:
1. The contents of the program counter and the processor status
register are automatically pushed onto the stack.
2. The interrupt disable flag is set and the corresponding interrupt
request bit is cleared.
3. The interrupt jump destination address is read from the vector
table into the program counter.
sNotes
When the active edge of an external interrupt (INT0–INT3, CNTR0,
or CNTR1) is changed, the corresponding interrupt request bit
may also be set. Therefore, please take following sequence:
(1) Disable the external interrupt which is selected
(2) Change the active edge selection (use the timer X mode reg-
ister for CNTR0, the timer Y mode register for CNTR1)
(3) Clear the interrupt request bit which is selected to “0”
(4) Enable the external interrupt which is selected.
Table 7. Interrupt vector addresses and priority
Interrupt Source
Reset (Note 2)
INT0
Priority
1
2
INT1
3
Serial I/O
4
reception
Serial I/O
5
transmission
Timer X
6
Timer Y
7
Timer 2
8
Timer 3
9
CNTR0
10
CNTR1
11
Timer 1
12
INT2
13
INT3
14
Key input
15
(Key-on wake up)
Vector Addresses (Note 1)
High
Low
FFFD16
FFFC16
FFFB16
FFFA16
FFF916
FFF816
FFF716
FFF616
FFF516
FFF316
FFF116
FFEF16
FFED16
FFEB16
FFE916
FFE716
FFE516
FFE316
FFE116
FFF416
FFF216
FFF016
FFEE16
FFEC16
FFEA16
FFE816
FFE616
FFE416
FFE216
FFE016
Interrupt Request
Generating Conditions
At reset
At detection of either rising or
falling edge of INT0 input
At detection of either rising or
falling edge of INT1 input
At completion of serial I/O data
reception
At completion of serial I/O transmit
shift or when transmission buffer is
empty
At timer X underflow
At timer Y underflow
At timer 2 underflow
At timer 3 underflow
At detection of either rising or
falling edge of CNTR0 input
At detection of either rising or
falling edge of CNTR1 input
At timer 1 underflow
At detection of either rising or
falling edge of INT2 input
At detection of either rising or
falling edge of INT3 input
At falling of conjunction of input
level for port P2 (at input mode)
Remarks
Non-maskable
External interrupt
(active edge selectable)
External interrupt
(active edge selectable)
Valid when serial I/O is selected
Valid when serial I/O is selected
External interrupt
(active edge selectable)
External interrupt
(active edge selectable)
External interrupt
(active edge selectable)
External interrupt
(active edge selectable)
External interrupt
(valid when an “L” level is applied)
ADT
16
FFDF16
FFDE16
At falling of ADT input
A-D conversion
At completion of A-D conversion
BRK instruction
17
FFDD16
FFDC16
At BRK instruction execution
Notes 1: Vector addresses contain interrupt jump destination addresses.
2: Reset function in the same way as an interrupt with the highest priority.
Valid when ADT interrupt is selected
External interrupt
(Valid at falling)
Valid when A-D interrupt is
selected
Non-maskable software interrupt
18