
13 PROGRAMMABLE TIMER
106
EPSON
S1C38000 TECHNICAL MANUAL
13 Programmable Timer
13.1 Overview
The programmable timer (TIMER) consists of five independent 16-bit counters with three count
down modes: free-running, cyclic, and single. Each counter counts from the load value to zero.
When the counter reaches zero, an interrupt is generated. Each counter has its own interrupt. The
count value is readable by software anytime.
In free-running count down mode, the count goes from 65535 to 0 and loops back. In cyclic count
down mode, the count goes from the programmable initial count value to 0 and loops back to the
initial count value. Single mode is the same as cyclic mode without the loop back.
The clock source to the TIMER is 24 MHz. The TIMER provides prescale divisor selects for the
input clock to control the timer range.
13.2 Timer Registers Access
There are five 16-bit timers, numbered 0 to 4, respectively. However, there are only two sets of timer
control registers, so only two timers may be accessed at a time. The first set of timer control registers
is for timers 0, 2, and 4; the second set is for timers 1 and 3. A Timer Index register selects a pair of
timers to be accessed at a time: 0 and 1, 2 and 3, or 4 only.
13.3 Register Descriptions
The default base address for the TIMER registers is F8000080h. All non-reserved register bits
default to 0 unless specified otherwise.
bits 15–0
Timer 0/2/4 Load Value Bits [15:0]
Counter load value for timers 0, 2, and 4. Use the Timer Index Register, PT[7Ch], to
select one of these timers.
The timer count starts from the value of this register plus 1.
bits 15–0
Timer 0/2/4 Current Count Bits [15:0]
Read-only current count value for timers 0, 2, and 4. Use the Timer Index Register,
PT[7Ch], to select one of these timers.
Timer 0/2/4 Load Register
PT[00h]
Default = 0000 0000h
Read/Write
n/a
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
Timer 0/2/4 Load Value
15
14
13
12
11
10
9876543210
Timer 0/2/4 Count Register
PT[04h]
Default = 0000 0000h
Read Only
n/a
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
Timer 0/2/4 Current Count
15
14
13
12
11
10
9876543210