14 8-BiT OSC1 TiMeR (T8OSC1)
14-6
Seiko epson Corporation
S1C17624/604/622/602/621 TeChniCal Manual
10.2 OSC1 Division Ratio Selection
Table 14.
T8O1CK[2:0]
Division ratio
0x7–0x6
Reserved
0x5
1/32
0x4
1/16
0x3
1/8
0x2
1/4
0x1
1/2
0x0
1/1
(Default: 0x0)
note: Make sure that T8O1CE = 0 before setting the clock division ratio.
D0
T8O1Ce: Clock enable Bit
Enables or disables the count clock supply to the counter.
1 (R/W): Enabled (on)
0 (R/W): Disabled (off) (default)
The T8O1CE default setting is 0, which disables the clock supply. Setting T8O1CE to 1 sends the clock
selected as above to the counter.
T8OSC1 Control Register (T8OSC1_CTl)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
T8OSC1
Control Register
(T8OSC1_CTl)
0x50c0
(8 bits)
D7–5 –
reserved
–
–
–
0 when being read.
D4
T8ORST
Timer reset
1 Reset
0 Ignored
0
W
D3–2 –
reserved
–
–
–
D1
T8ORMD
Count mode select
1 One shot
0 Repeat
0
R/W
D0
T8ORun
Timer run/stop control
1 Run
0 Stop
0
R/W
D[7:5]
Reserved
D4
T8ORST: Timer Reset Bit
Resets the timer.
1 (W):
Reset
0 (W):
Ignored
0 (R):
Always 0 when being read (default)
Writing 1 to this bit resets the counter to 0.
D[3:2]
Reserved
D1
T8ORMD: Count Mode Select Bit
Selects the count mode.
1 (R/W): One-shot mode
0 (R/W): Repeat mode (default)
Setting T8ORMD to 0 sets T8OSC1 to repeat mode. In this mode, once the count starts, the timer con-
tinues to run until stopped by the application. If the counter matches the compare data register value,
the timer resets the counter and continues counting. This means the timer periodically outputs a com-
pare match signal. Set T8OSC1 to this mode to generate periodic interrupts at the desired interval or to
perform PWM output.
Setting T8ORMD to 1 sets T8OSC1 to one-shot mode. In this mode, the timer stops automatically
when the counter matches the compare data register value. This means an interrupt can be generated
only once after the timer has been started. Note that the timer resets the counter and then stops after a
compare match has occurred. Set T8OSC1 to this mode to create a specific wait time.
note: Set the count mode only while T8OSC1 count is stopped.