APPENDIX D INITIALIZATION ROUTINE
336
EPSON
S1C17001 TECHNICAL MANUAL
; ----- ITC (interrupt controller) ------
Xld.a %r7, 0x4300 ; ITC register base address
Xld.a %r0, 0x1010 ; P0, P1 interrupt level & trigger mode
ext 0x06
ld [%r7], %r0 ; [0x4306] <= 0x1010
. . .
(6)
Xld.a %r0, 0x1010 ; SWT, CT interrupt level & trigger mode
ext 0x08
ld [%r7], %r0 ; [0x4308] <= 0x1010
. . .
(6)
Xld.a %r0, 0x0010 ; T8OSC1 interrupt level & trigger mode
ext 0x0a
ld [%r7], %r0 ; [0x430a] <= 0x0010
. . .
(6)
Xld.a %r0, 0x1000 ; T16E interrupt level & trigger mode
ext 0x0c
ld [%r7], %r0 ; [0x430c] <= 0x1000
. . .
(6)
; ===== Main routine =========================================
...
; ======================================================================
; Interrupt handler
; ======================================================================
; ----- Address unalign --------------------------
unalign_handler:
...
; ----- NMI -------------------------------------
nmi_handler:
...
(1)
.rodata
section is declared to position vector table in
.vector
section.
(2) Interrupt processing routine address is defined as vector.
Int
XX
_handler
can be used as software interrupt.
(3) Program code is written in
.text
section.
(4) Sets stack pointer.
(5) Sets ROM read access cycles.
(See “3 Memory Map and Bus Control.”)
(6) Sets interrupt trigger mode to level trigger for the following peripheral circuits.
P0 port, P1 port, stopwatch timer, clock timer, 8-bit OSC1 timer, PWM & capture timer
(See “6 Interrupt Controller (ITC).”)
Summary of Contents for S1C17001
Page 1: ...Technical Manual S1C17001 CMOS 16 BIT SINGLE CHIP MICROCONTROLLER ...
Page 33: ...4 POWER SUPPLY VOLTAGE 24 EPSON S1C17001 TECHNICAL MANUAL This page intentionally left blank ...
Page 63: ...6 INITERRUPT CONTROLLER 54 EPSON S1C17001 TECHNICAL MANUAL This page intentionally left blank ...
Page 87: ...8 CLOCK GENERATOR CLG 78 EPSON S1C17001 TECHNICAL MANUAL This page intentionally left blank ...
Page 91: ...9 PRESCALER PSC 82 EPSON S1C17001 TECHNICAL MANUAL This page intentionally left blank ...
Page 133: ...11 16 BIT TIMER T16 124 EPSON S1C17001 TECHNICAL MANUAL This page intentionally left blank ...
Page 211: ...16 STOPWATCH TIMER SWT 202 EPSON S1C17001 TECHNICAL MANUAL This page intentionally left blank ...
Page 219: ...17 WATCHDOG TIMER WDT 210 EPSON S1C17001 TECHNICAL MANUAL This page intentionally left blank ...
Page 241: ...18 UART 232 EPSON S1C17001 TECHNICAL MANUAL This page intentionally left blank ...
Page 277: ...20 I2 C 268 EPSON S1C17001 TECHNICAL MANUAL This page intentionally left blank ...
Page 313: ...25 PACKAGE 304 EPSON S1C17001 TECHNICAL MANUAL This page intentionally left blank ...