SAB-C509-LM SIEMENS [Siemens Semiconductor Group], SAB-C509-LM Datasheet - Page 46

no-image

SAB-C509-LM

Manufacturer Part Number
SAB-C509-LM
Description
8-Bit CMOS Microcontroller
Manufacturer
SIEMENS [Siemens Semiconductor Group]
Datasheet
C509-L
Compare Modes
The compare function of a timer/register combination operates as follows. the 16-bit value stored in
a compare or compare/capture register is compared with the contents of the timer register. lf the
count value in the timer register matches the stored value, an appropriate output signal is generated
at a corresponding port pin. Several timer/compare register combinations are selectable (see table
7). In these configurations three cdifferent ompare modes are selectable.
Compare Mode 0
In compare mode 0, upon matching the timer and compare register contents, the output signal
changes from low to high. lt goes back to a low level on timer overflow. As long as compare mode
0 is enabled, the appropriate output pin is controlled by the timer circuit only and writing to the port
will have no effect. Figure 21 shows a functional diagram of a port circuit when used in compare
mode 0. The port latch is directly controlled by the timer overflow and compare match signals. The
input line from the internal bus and the write-to-latch line of the port latch are disconnected when
compare mode 0 is enabled.
Figure 21
Port Latch in Compare Mode 0
Compare Mode 1
Ilf compare mode 1 is enabled (can only be selected for compare registers assigned to timer 2) and
the software writes to the appropriate output latch at the port, the new value will not appear at the
output pin until the next compare match occurs. Thus, it can be choosen whether the output signal
has to make a new transition (1-to-0 or 0-to-1, depending on the actual pin-level) or should keep its
old value at the time when the timer value matches the stored compare value.
In compare mode 1 (see figure 22) the port circuit consists of two separate latches. One latch
(which acts as a "shadow latch") can be written under software control, but its value will only be
transferred to the port latch (and thus to the port pin) when a compare match occurs.
Semiconductor Group
45
09.96

Related parts for SAB-C509-LM