6 inTeRRuPT COnTROlleR
6-4
Seiko epson Corporation
S1C63003/004/008/016 TeChniCal Manual
(Rev. 1.1)
interrupt Vector
6.4
When an interrupt request is input to the CPU, the CPU begins interrupt processing. After the program being executed
is terminated, the interrupt processing is executed in the following order.
1. The content of the flag register is evacuated, then the I flag is reset.
2. The address data (value of program counter) of the program to be executed next is saved in the stack area
(RAM).
3. The interrupt request causes the value of the interrupt vector (0100H–010FH) to be set in the program counter.
4. The program at the specified address is executed (execution of interrupt handler routine by software).
Table 6.4.1 shows the correspondence of interrupt requests and interrupt vectors.
4.1 Interrupt request and interrupt vectors
Table 6.
Interrupt vector
Interrupt factor
S1C63xxx
Priority
016
008
004
003
0100H
Watchdog timer
High
0101H
R/F converter
↑
0102H
Programmable timer 0
0103H
Programmable timer 1
–
0104H
Programmable timer 2
–
0105H
Programmable timer 3
–
–
–
0106H
Reserved
–
–
–
–
0107H
Reserved
–
–
–
–
0108H
Reserved
–
–
–
–
0109H
Reserved
–
–
–
–
010AH
Serial interface
–
010BH
Key input interrupt <P0>
010CH
Key input interrupt <P1>
–
010DH
Stopwatch timer
010EH
Clock timer (128 Hz, 64 Hz, 32 Hz, 16 Hz)
*
↓
010FH
Clock timer (8 Hz, 4 Hz, 2 Hz, 1 Hz)
*
Low
*
The S1C63003 supports 32 Hz, 8 Hz, 2 Hz, and 1 Hz interrupts only.
The four low-order bits of the program counter are indirectly addressed through the interrupt request.
Note: The interrupt handler routine must be located within the range from "Interrupt vector address
(100H–10FH)" -7FH to +80H. If it is difficult, make a relay point within that range as the destination
of the vector jump and branch the program to the interrupt handler from there.
Example:
;******************************************************************************
;** interrupt vector area **
;******************************************************************************
.org 0x0100
JR
INT_DUMMY
;WATCH DOG TIMER INTERRUPT VECTOR(0x100)
JR
INT_RFC
;RFC INTERRUPT VECTOR(0x101)
JR
INT_DUMMY
;PTIMER0 INTERRUPT VECTOR(0x102)
JR
INT_DUMMY
;PTIMER1 INTERRUPT VECTOR(0x103)
JR
INT_DUMMY
;PTIMER2 INTERRUPT VECTOR(0x104)
JR
INT_DUMMY
;PTIMER3 INTERRUPT VECTOR(0x105)
JR
INT_DUMMY
;Reserved
JR
INT_DUMMY
;Reserved
JR
INT_DUMMY
;Reserved
JR
INT_DUMMY
;Reserved
JR
INT_DUMMY
;SIF INTERRUPT VECTOR(0x10A)
JR
INT_DUMMY
;P0x PORT INTERRUPT VECTOR(0x10B)
JR
INT_DUMMY
;P1x PORT INTERRUPT VECTOR(0x10C)
JR
INT_DUMMY
;STOPWATCH INTERRUPT VECTOR(0x10D)
JR
INT_DUMMY
;CLOCK TIMER1 INTERRUPT VECTOR(0x10E)
JR
INT_DUMMY
;CLOCK TIMER2 INTERRUPT VECTOR(0x10F)
;******************************************************************************
;** subinterrupt vector area **
;******************************************************************************
.org 0x120
INT_RFC: