English
Language : 

C517A Datasheet, PDF (34/72 Pages) Siemens Semiconductor Group – 8-Bit CMOS Microcontroller
C517A
Timer 2 Operation
Timer Mode : In timer function, the count rate is derived from the oscillator frequency. A prescaler
offers the possibility of selecting a count rate of 1/12 or 1/24 of the oscillator frequency.
Gated Timer Mode : In gated timer function, the external input pin P1.7/T2 operates as a gate to the
input of timer 2. lf T2 is high, the internal clock input is gated to the timer. T2 = 0 stops the counting
procedure. The external gate signal is sampled once every machine cycle.
Event Counter Mode : In the event counter function. the timer 2 is incremented in response to a 1-
to-0 transition at its corresponding external input pin P1.7/T2. In this function, the external input is
sampled every machine cycle. The maximum count rate is 1/24 of the oscillator frequency.Reload
of Timer 2 : Two reload modes are selectable:
In mode 0, when timer 2 rolls over from all 1’s to all 0’s, it not only sets TF2 but also causes the timer
2 registers to be loaded with the 16-bit value in the CRC register, which is preset by software.
In mode 1, a 16-bit reload from the CRC register is caused by a negative transition at the correspon-
ding input pin P1.5/T2EX.
Programmable
OSC
Prescaler
T2PS T2PS1
P1.7/T2
T2I1 T2I0 SFR T2CON
00
01
10
11
No input selected
Timer stop
Timer function
Counter function
via ext. input P1.7/T2
Gated timer function
by ext. input P1.7/T2
Timer 2
Input Clock
P1.5/T2EX
TL2
TH2
(8 Bits) (8 Bits)
TF2
Sync
EXF2
EXEN2
Figure 12
Block Diagram of Timer 2
Semiconductor Group
32
1
Interrupt
1
Reload
MCB03328