English
Language : 

C509-L_97 Datasheet, PDF (106/290 Pages) Siemens Semiconductor Group – 8-Bit CMOS Microcontroller
On-Chip Peripheral Components
C509-L
6.3 The Compare/Capture Unit (CCU)
The compare/capture unit is one of the C509-L’s most powerful peripheral units for use in all kinds
of digital signal generation and event capturing like pulse generation, pulse width modulation, pulse
width measuring etc.
The CCU consists of three 16-bit timer/counters with automatic reload feature and an array of 13
compare or compare/capture registers. A set of six control registers is used for flexible adapting of
the CCU to a wide variety of user’s applications.
The CCU is the ideal peripheral unit for various automotive control applications (ignition/injection
control, anti-lock brakes, etc.) as well as for industrial applications (DC, three-phase AC, and
stepper motor control, frequency generation, digital-to-analog conversion, process control, etc.)
The detailed description in the following sections refers to the CCU’s functional blocks as listed
below:
– Timer 2 with fOSC/6 input clock, 4-bit prescaler, 16-bit reload, counter/gated timer mode and
overflow interrupt request.
– Compare timers with fOSC input clock, 4-bit prescaler, 16-bit reload and overflow interrupt
request.
– Compare/(reload/)capture register array consisting of four different kinds of registers:
one 16-bit compare/reload/capture register,
three 16-bit compare/capture registers,
one 16-bit compare/capture register with additional "concurrent compare" feature,
eight 16-bit compare registers with timer-overflow controlled loading.
In summary, the register array may control up to 29 output lines and can request up to 11
independent interrupts.
In the following text all double-byte compare, compare/capture or compare/reload/capture registers
are called CMx (x = 0 … 7), CCx (x = 0 … 4) or CRC register, respectively.
The block diagram in figure 6-17 shows the general configuration of the CCU. All CC1 to CC4
registers and the CRC register are exclusively assigned to timer 2. Each of the eight compare
registers CM0 through CM7 can either be assigned to timer 2 or to the faster compare timer, e.g. to
provide up to 8 PWM output channels. The assignment of the CMx registers - which can be done
individually for every single register - is combined with an automatic selection of one of the two
possible compare modes. The compare/capture registers CC10 to CC17 and the reload register
CT1REL are assigned to compare timer 1 and are mapped to the corresponding registers of the
compare timer.
Port 4, port 5, port 9 and five lines of port 1 have alternate functions dedicated to the CCU. These
functions are listed in table 6-3. Normally each register controls one dedicated output line at the
ports. Register CC4 is an exception as it can manipulate up to nine output lines (one at port 1.4 and
the other eight at port 5) concurrently. This function is referenced as "concurrent compare".
Note that for an alternate input function the port latch has to be programmed with a ’1’. For bit
latches of port pins that are used as compare outputs, the value to be written to the bit latches
depends on the compare mode established.
A list of all special function registers concerned with the CCU is given in table 6-4.
Semiconductor Group
6-28
1997-10-01