APPENDIX E INITIALIZE ROUTINE
S1C17704 TECHNICAL MANUAL
EPSON
AP-39
; ----- 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
...
(7)
Xld.a %r0, 0x1010 ; SWT, CT interrupt level & trigger mode
ext 0x08
ld [%r7], %r0 ; [0x4308] <= 0x1010
...
(7)
Xld.a %r0, 0x1010 ; T8OSC1, SVD interrupt level & trigger mode
ext 0x0a
ld [%r7], %r0 ; [0x430a] <= 0x1010
...
(7)
Xld.a %r0, 0x1010 ; LCD, T16E interrupt level & trigger mode
ext 0x0c
ld [%r7], %r0 ; [0x430c] <= 0x1010
...
(7)
; ===== Main routine =========================================
...
; ======================================================================
; Interrupt handler
; ======================================================================
; ----- Address unalign --------------------------
unalign_handler:
...
; ----- NMI -------------------------------------
nmi_handler:
...
(1) Declare a
.rodata
section to locate the vector table in the
.vector
section.
(2) Define addresses of the interrupt handler routines as vectors.
The
int
XX
_handler
symbols can be used for software interrupts.
(3) Describe the program code in a
.text
section.
(4) Set the stack pointer.
(5) Set the number of access cycles for the Flash controller.
One-cycle access can be specified only when the system clock frequency is 6 MHz or lower.
(See Chapter 3, “Memory Map, Bus Control.”)
(6) Set the number of access cycles for the SRAM controller.
(See Chapter 3, “Memory Map, Bus Control.”)
(7) Set the interrupt trigger mode for the peripheral modules listed below to level trigger.
P0 port, P1 port, stopwatch timer, clock timer, 8-bit OSC1 timer, SVD, LCD driver, PWM & capture timer
(See Chapter 6, “Interrupt Controller (ITC).”)
Содержание S1C17704
Страница 1: ...TECHNICAL MANUAL S1C17704 CMOS 16 BIT SINGLE CHIP MICROCOMPUTER ...
Страница 22: ...1 OVERVIEW 1 10 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 42: ...3 MEMORY MAP BUS CONTROL 3 12 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 82: ...6 INTERRUPT CONTROLLER ITC 6 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 108: ...8 CLOCK GENERATOR CLG 8 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 112: ...9 PRESCALER PSC 9 4 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 138: ...10 I O PORTS P 10 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 156: ...11 16 BIT TIMERS T16 11 18 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 208: ...14 8 BIT OSC1 TIMER T8OSC1 14 16 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 234: ...16 STOPWATCH TIMER SWT 16 14 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 242: ...17 WATCHDOG TIMER WDT 17 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 264: ...18 UART 18 22 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 300: ...20 I2C 20 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 320: ...21 REMOTE CONTROLLER REMC 21 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 360: ...24 ON CHIP DEBUGGER DBG 24 6 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Страница 362: ...25 BASIC EXTERNAL WIRING DIAGRAM 25 2 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...