SAB80C517-M16 SIEMENS [Siemens Semiconductor Group], SAB80C517-M16 Datasheet - Page 101

no-image

SAB80C517-M16

Manufacturer Part Number
SAB80C517-M16
Description
8-Bit CMOS Single-Chip Microcontroller
Manufacturer
SIEMENS [Siemens Semiconductor Group]
Datasheet
Programming the Compare Timer in Auto-Reload Operation
The compare timer is, once started, a free-running 16-bit timer, which upon overflow is
automatically reloaded by the contents of the special function register CTRELL (compare timer
reload register, low byte) and CTRELH (compare timer reload register, high byte). An initial writing
to the reload register CTRELL (the low byte) starts the timer. If the compare timer is already running,
a write-to-CTRELL again triggers an instant reload of the timer, in other words restarts the timer in
the cycle following the write instruction with the count being loaded to the reload registers CTRELH/
CTRELL.
Figure 7-37
Compare Timer Control Register CTCON
Compare timer control register. Contains clock selection bits for the compare timer, the compare
timer overflow flag and the control bit for the timer 2 prescaler.
Bit
CLK2
CLK1
CLK0
CTF
T2PS1
CLK2
0
0
0
0
1
1
1
1
Semiconductor Group
0E1 H
T2PS1
CLK1
0
0
1
1
0
0
1
1
Function
Compare timer input clock selection. See table below.
Compare timer overflow flag. Bit is cleared by hardware. If the compare
timer interrupt is enabled, CTF = 1 will cause an interrupt.
Prescaler select bit for timer 2
T2PS1 must be 0 for the counter operation of timer 2.
CLK0
0
1
0
1
0
1
0
1
102
Compare timer input clock is
Compare timer input clock is
Compare timer input clock is
Compare timer input clock is
Compare timer input clock is
Compare timer input clock is
Compare timer input clock is
Compare timer input clock is
Function
CTF
On-Chip Peripheral Components
CLK2
CLK1
CLK0
f
f
f
f
f
f
f
f
OSC
OSC
OSC
OSC
OSC
OSC
OSC
OSC
/2
/4
/8
/16
/32
/64
/128
/256
CTCON

Related parts for SAB80C517-M16