2-19
3874 Group User's Manual
APPLICATION
2.2 Interrupts
Fig. 2.2.11 Interrupt setting method (1)
2.2.3 Interrupt setting method
Figures 2.2.11 to 2.2.13 show the interrupt setting method.
Process 1: When the acceptance of the other interrupts is disabled during set, set “1” to the
interrupt disable flag (I).
Process 2: Disable the acceptance of the each vector for interrupt to be set. (Note 1)
b7
b0
0 0 0 0 0 0 0 0
Interrupt control register 1
(ICON1: address 3E16)
When setting INT0 interrupt, disable INT0 interrupt.
When setting INT1 interrupt, disable INT1 interrupt.
When setting receive bus interrupt, disable receive bus interrupt.
When setting transmit bus interrupt, disable transmit bus interrupt.
When setting timer X interrupt, disable timer X interrupt.
When setting timer Y interrupt, disable timer Y interrupt.
When setting timer 2 interrupt, disable timer 2 interrupt.
When setting timer 3 interrupt, disable timer 3 interrupt.
b7
b0
0 0 0 0 0 0 0
Interrupt control register 2
(ICON2: address 3F16)
When setting INT2 interrupt, disable INT2 interrupt.
When setting CNTR0, serial I/O3 interrupts, disable CNTR0, serial I/O3 interrupts.
When setting CNTR1 interrupt, disable CNTR1 interrupt.
When setting timer 1 interrupt, disable timer 1 interrupt.
When setting INT3, INT4, INT5 interrupts, disable INT3, INT4, INT5 interrupts.
When setting ADT/A-D converter, serial I/O2 interrupts, disable ADT/A-D converter, serial I/O2 interrupts.
When setting key input, serial I/O1 receive, serial I/O1 transmit interrupts, disable key input, serial I/O1 receive,
serial I/O1 transmit interrupts.
Process 3: In “multiple factors/one vector interrupt”, disable the acceptance of interrupt source to be set.
b7
b0
0 0 0 0 0 0 0 0
Interrupt source discrimination control register 1
(ICOND1: address 3916)
When setting INT3 interrupt, disable INT3 interrupt.
When setting INT4 interrupt, disable INT4 interrupt.
When setting INT5 interrupt, disable INT5 interrupt.
When setting serial I/O1 receive interrupt, disable serial I/O1 receive interrupt.
When setting serial I/O1 transmit interrupt, disable serial I/O1 transmit interrupt.
When setting key input interrupt, disable key input interrupt.
When setting serial I/O2 interrupt, disable serial I/O2 interrupt.
When setting ADT/A-D converter interrupt, disable ADT/A-D converter interrupt.
b7
b0
0 0
Interrupt source discrimination control register 2
(ICOND2: address 3716)
When setting CNTR0 interrupt, disable CNTR0 interrupt.
When setting serial I/O3 interrupt, disable serial I/O3 interrupt.
Note 1: When an interrupt for each vector of “multiple factors/one vector interrupt” is disabled,
all interrupts assigned to the same vector are disabled.
Process 4: Perform the setting related to each interrupt (Note 2).
Note 2: Refer the each function clause of the interrupt to be used.