16-Bit Timer (T16) - Epson S1C31D01 Software Manual

Cmos 32-bit single chip microcontroller peripheral circuit sample software manual
Table of Contents

Advertisement

3.18 16-Bit Timer (T16)

T16 module is a 16-bit timer.
This example programs the T16 channel 0 timer to interrupt periodically and counts the number of interrupts that
occurred within a 5-second interval.
Operations
1. IOSC is selected as timer clock source. Example code does IOSC auto-trimming to provide clock accuracy
for the timer clock.
2. Initializes T16 channel 0.
3. Configures T16 channel 0 interrupts.
4. Enables T16 interrupts.
5. Counts a number of interrupts happened during 5 second interval.
Example of Output
-CPU clock- seCLG_IOSC (20000000)
CLG IOSC Auto-trimming ok
IRQ interrupted: 1695 times during 5 sec
Exit
S1C31D01 Peripheral Circuit
Sample Software Manual (Rev.3.00)
Seiko Epson Corporation
53

Advertisement

Table of Contents
loading

Table of Contents