S1C88348/317/316/308 TECHNICAL SOFTWARE
EPSON
II-65
12 PROGRAMMABLE TIMER
I/O Map
Specifications
Control of programmable timer
Vector address setting for programmable timer interrupt
(1) timer2ch_init, pt1_intr, pt0_intr: Initialization and interrupt processing for 8-bit reload timer
(two channels)
This is an example of using the programmable timer as an 8-bit x 2 system and performs the
following settings:
Count mode
8-bit x 2
Pulse output channel
Timer 0
Pulse external (TOUT) output
OFF
<Timer 0>
Timer mode
Programmable timer (reload mode)
Count clock
fOSC3 x 1/16
Reload data
200 (= 800 sec, when fOSC3 is 4 MHz)
<Timer 1>
Timer mode
Programmable timer (reload mode)
Count clock
fOSC3 x 1/64
Reload data
250 (= 1 msec, when fOSC3 is 4 MHz)
After setting the above, it enables the timer 1 and timer 0 interrupts, and starts each timer. The
interrupt level has been set at IRQ3 and the respective interrupts are generated in the cycles
according to the reload data.
(Invalid)
Address Bit
Name
SR R/W
Function
Comment
10
00FF21 D7
D6
D5
D4
D3
D2
D1
D0
–
PPT1
PPT0
PK11
PK10
–
Programmable timer interrupt priority register
K10 and K11 interrupt priority register
Constantly "0" when
being read
–
0
R/W
–
PPT1
PK11
1
0
PPT0
PK10
1
0
1
0
Priority
level
Level 3
Level 2
Level 1
Level 0
D7
D6
D5
D4
D3
D2
D1
D0
00FF25 D7
D6
D5
D4
D3
D2
D1
D0
FPT1
FPT0
FK1
FK0H
FK0L
FSERR
FSREC
FSTRA
Programmable timer 1 interrupt factor flag
Programmable timer 0 interrupt factor flag
K10 and K11 interrupt factor flag
K04–K07 interrupt factor flag
K00–K03 interrupt factor flag
Serial I/F (error) interrupt factor flag
Serial I/F (receiving) interrupt factor flag
Serial I/F (transmitting) interrupt factor flag
0
R/W
(R)
Interrupt
factor is
generated
(W)
Reset
(R)
No interrupt
factor is
generated
(W)
No operation
00FF23
EPT1
EPT0
EK1
EK0H
EK0L
ESERR
ESREC
ESTRA
Programmable timer 1 interrupt enable register
Programmable timer 0 interrupt enable register
K10 and K11 interrupt enable register
K04–K07 interrupt enable register
K00–K03 interrupt enable register
Serial I/F (error) interrupt enable register
Serial I/F (receiving) interrupt enable register
Serial I/F (transmitting) interrupt enable register
0
R/W
Interrupt
enable
Interrupt
disable