![Seiko Epson S1C17153 Technical Manual Download Page 76](http://html1.mh-extra.com/html/seiko-epson/s1c17153/s1c17153_technical-manual_1235939076.webp)
10 8-BiT TiMeR (T8)
10-4
Seiko epson Corporation
S1C17153 TeChniCal Manual
(Rev. 1.0)
Count clock
PRESER write
PRUN
Counter
Interrupt request
0
1
n-1
n
n
Count clock
PRESER write
PRUN
Counter
Interrupt request
0
1
n-1
n
n
0
1
n-1
n
n-1
One-shot mode
Repeat mode
Reset by hardware
Set by software
Set by software
Reset by software
6.1 Count Operation
Figure 10.
T8 Output Signals
10.7
The T8 module outputs underflow pulses when the counter underflows.
These pulses are used for timer interrupt requests.
These pulses are also used to generate the serial transfer clock for the internal serial interface.
The clock generated is sent to the SPI module.
Use the following equations to calculate the reload data register value for obtaining the desired transfer rate:
ct_clk
SPI clock
TR = —————— - 1
bps
×
2
ct_clk: Count clock frequency (Hz)
TR:
Reload data (0–255)
bps:
Transfer rate (bits/s)
T8 interrupts
10.8
The T8 module outputs an interrupt request to the interrupt controller (ITC) when the counter underflows.
underflow interrupt
When the counter underflows, the interrupt flag T8IF/T8_INT
x
register, which is provided for the T8 module,
is set to 1. At the same time, an interrupt request is sent to the ITC if T8IE/T8_INT
x
register has been set to 1
(interrupt enabled). An interrupt is generated if the ITC and S1C17 Core interrupt conditions are satisfied.
If T8IE is set to 0 (interrupt disabled, default), no interrupt request will be sent to the ITC.
For specific information on interrupt processing, see the “Interrupt Controller (ITC)” chapter.
notes
: • The T8 module interrupt flag T8IF must be reset in the interrupt handler routine after a T8 in-
terrupt has occurred to prevent recurring interrupts.
• Reset T8IF before enabling T8 interrupts with T8IE to prevent occurrence of unwanted inter-
rupt. T8IF is reset by writing 1.