English
Language : 

C517A_99 Datasheet, PDF (99/218 Pages) Siemens Semiconductor Group – 8-Bit CMOS Microcontroller
On-Chip Peripheral Components
C517A
6.3.2 Operation of the Compare Timer
The compare timer operates as a fast 16-bit time base for the compare registers CM0 to CM7. The
compare timer combined with the CMx registers and can be used for high-speed output puposes or
as a fast 16-bit pulse-width modulation unit.
Prior to the description of the compare timer operating modes and functions, the compare timer
related special function registers are described.
6.3.2.1 Compare Timer Registers
Each of the two compare timers has a 8-bit control control register and a 16-bit reload register.
These 6 special function registers are described in this section.
Special Function Register CTCON (Address E1H)
Reset Value : 0X000000B
MSB
Bit No. 7
6
E1H T2PS1 –
LSB
5
4
3
2
1
0
ICR ICS CTF CLK2 CLK1 CLK0 CTCON
The shaded bits are not used for compare timer control.
Bit
Function
ICR
Interrupt request flag for compare register COMCLR
ICR is set when a compare match occured. ICR is cleared ba hardware
when the processor vectors to interrupt routine.
ICS
Interrupt request flag for compare register COMSET
ICS is set when a compare match occured. ICS is cleared by hardware
when the processor vectors to interrupt routine.
CTF
Compare timer overflow flag
CTF is set when the compare timer 1 count rolls over from all ones to the
reload value. When CTF is set, a compare timer interrupt can be
generated (if enabled). CTF is cleared by hardware (RETI instruction)
when the compare timer value is no more equal to the reload value.
Semiconductor Group
6-33