C509-L_97 SIEMENS [Siemens Semiconductor Group], C509-L_97 Datasheet - Page 126

no-image

C509-L_97

Manufacturer Part Number
C509-L_97
Description
8-Bit CMOS Microcontroller
Manufacturer
SIEMENS [Siemens Semiconductor Group]
Datasheet
6.3.3.3
In the compare mode 2 in the CCU can be used for the concurrent compare outputs at port 5. In
this compare mode 2 the port 5 pins are no longer general purpose I/O pins or under control of
compare/capture register CC4, but under control of the compare registers COMSET and COMCLR.
These both 16-bit registers are always associated with timer 2 (same as CRC, CC1 to CC4).
In compare mode 2 the concurrent compare output pins at port 5 are used as shown in figure 6-24.:
Figure 6-24
Compare Function of Compare Mode 2
If compare mode 2 shall be selected, register CC4 must operate in compare mode 1 (with the
corresponding output pin P1.4); Therefore, compare mode 2 is selected by enabling the compare
function for register CC4 (COCAH4=1; COCAL4=0 SFR CC4EN) and by programming bits
COCOEN0 and COCOEN1 in SFR CC4EN. Like in concurrent compare mode associated with
CC4, the number of port pins at P5 which serve the compare output function can be selected by bits
COCON0-COCON2 (in SFR CC4EN). If a set and reset request occurs at the same time (identical
values in COMSET and COMCLR), the set operation takes precedence. It is also possible to use
only the interrupts which are generated by matches in COMSET and COMCLR without affecting
port 5 (“software compare”). For this “interrupt-only” mode it is not necessary that the compare
function at CC4 is selected.
Semiconductor Group
– When a compare match occurs with register COMSET, a high level appears at the pins of port
– When a compare match occurs with register COMCLR, a low level appears at the pins of port
– Additionally, the port 5 pins which are used for compare mode 2 can also be directly written
5 when the corresponding bits in the mask register SETMSK are set.
5 when the corresponding bits in the mask register CLRMSK are set.
using write instructions to SFR P5. Further, the pins can also be read under program control.
TH2
Comparator
Comparator
COMSET
COMCLR
Compare Mode 2
Timer 2
16 Bit
16 Bit
16
16
TL2
Bit
Bit
Compare
Signal
Compare
Signal
SETMSK
CLRMSK
Bits
Bits
6-48
Port Circuit
Internal
Bus
Write to
Latch
On-Chip Peripheral Components
S
D
CLK
R
Latch
Port
Read Latch
Read Pin
Q
Q
V
CC
MCS02663
1997-10-01
C509-L
Port
Pin

Related parts for C509-L_97