
II-68
EPSON
S1C88348/317/316/308 TECHNICAL SOFTWARE
12 PROGRAMMABLE TIMER
Flowchart
(1) Initialization for 8-bit reload timer (two channels)
(1) Interrupt processing for 8-bit reload timer (two channels)
pt1_intr
Register evacuation
(BR setting)
Programmable timer 1
interrupt processing routine
Clears timer 1 interrupt
factor flag
Register return
rete
pt0_intr
Register evacuation
(BR setting)
Programmable timer 0
interrupt processing routine
Clears timer 0 interrupt
factor flag
Register return
rete
timer2ch_init
Switches to OSC3
(Has not clock been switched to OSC3 ?)
8-bit count x 2
Pulse output off
Prescaler input clock = fOSC3 (timer 1 & 0)
200 = 800 sec (fOSC3 = 4 MHz, x1/16)
250 = 1 msec (fOSC3 = 4 MHz, x1/64)
Normal timer, Reload mode
Clock = fOSC3 x 1/16, Presets reload data
Reload mode
Clock = fOSC3 x 1/64, Presets reload data
Enables IRQ3 interrupt
Switches to OSC1
N
Y
(BR setting)
osc1toosc3
VDD NG
Programmable timer
mode setting
Sets timer 0 reload data
Sets timer 1 reload data
Timer 0 mode setting
Timer 1 mode setting
Sets interrupt priority
level to IRQ3
Enables timer 1 and timer 0 interrupts
Starts timer 0
Starts timer 1
Cleares I0 flag
(Timer processing)
Stops timer 0
Stops timer 1
osc3toosc1
ret