C501G-1E SIEMENS [Siemens Semiconductor Group], C501G-1E Datasheet - Page 56

no-image

C501G-1E

Manufacturer Part Number
C501G-1E
Description
8-Bit Single-Chip Microcontroller
Manufacturer
SIEMENS [Siemens Semiconductor Group]
Datasheet
6.2.2
Timer 2 is a 16-bit timer / counter which can operate as timer or counter. It has three operating
modes:
The modes are selected by bits in the SFR T2CON (C8 H ) as shown in table 6-6:
Table 6-6
Timer/Counter 2 - Operating Modes
RXCLK + TXCLK
0
0
1
X
Timer 2 consists of two 8-bit registers, TH2 and TL2. In the timer function, the TL2 register is
incremented every machine cycle. Since a machine cycle consists of 12 oscillator periods, the count
rate is 1/12 of the oscillator frequency.
In the counter function, the register is incremented in response to a 1-to-0 transition at its
corresponding external input pin, T2 (P1.0). In this function, the external input is sampled during
S5P2 of every machine cycle. When the samples show a high in one cycle and a low in the next
cycle, the count is incremented. The new value appears in the register during S3P1 of the cycle
following the one in which the transition was detected. Since it takes two machine cycles to
recognize a 1-to-0 transition, the maximum count rate is 1/24 of the oscilllator frequency. To ensure
that a given level is sampled at least once before it changes, it should be held for at least one full
machine cycle.
Semiconductor Group
– 16-bit auto-reload mode (up or down counting)
– 16-bit capture mode
– Baudrate generator for the serial interface
Timer/Counter 2
CP/RL2
0
1
X
X
6-22
TR2
1
1
1
0
On-Chip Peripheral Components
Mode
16-bit auto-reload
16-bit capture
Baud rate generator
(OFF)
C501

Related parts for C501G-1E