Event Counter Mode; Window Mode - Philips CEM2100/00 Service Manual

Mini system
Hide thumbs Also See for CEM2100/00:
Table of Contents

Advertisement

9.3.2 Event counter mode

In this mode, events are counted on the rising edge of the TC2 pin input. The contents of TC2DR are com-
pared with the contents of the up counter. If a match is found, an INTTC2 interrupt is generated, and the
counter is cleared. Counting up is resumed every the rising edge of the TC2 pin input after the up counter is
cleared.
Match detect is executed on the falling edge of the TC2 pin. Therefore, an INTTC2 interrupt is generated at
the falling edge after the match of TC2DR and up counter.
The minimum input pulse width of TC2 pin is shown in Table 9-2. Two or more machine cycles are required
for both the "H" and "L" levels of the pulse width.
Example :Sets the event counter mode and generates an INTTC2 interrupt 640 counts later.
Table 9-2 Timer/Counter 2 External Input Clock Pulse Width
TC2 pin input
Counter
TC2DR
INTTC2 interrupt

9.3.3 Window mode

In this mode, counting up performed on the rising edge of an internal clock during TC2 external pin input
(Window pulse) is "H" level. The contents of TC2DR are compared with the contents of up counter. If a match
found, an INTTC2 interrupt is generated, and the up-counter is cleared.
The maximum applied frequency (TC2 input) must be considerably slower than the selected internal clock
by the TC2CR<TC2CK>.
Note:It is not available window mode in the SLOW/SLEEP mode. Therefore, at the window mode in NORMAL
mode, the timer should be halted by setting TC2CR<TC2S> to "0" before the SLOW/SLEEP mode is entered.
LDW
(TC2DR), 640
DI
SET
(EIRE). 6
EI
LD
(TC2CR), 00011100B
LD
(TC2CR), 00111100B
NORMAL1/2, IDLE1/2 mode
3
"H" width
2
/fc
3
"L" width
2
/fc
Timer start
0
1
2
n
Figure 9-3 Event Counter Mode Timing Chart
; Sets TC2DR
; IMF= "0"
;Enables INTTC2 interrupt
; IMF= "1"
; TC2 source vclock / mode select
; Starts TC2
Minimum Input Pulse Width [s]
SLOW1/2, SLEEP1/2 mode
3
2
/fs
3
2
/fs
3
n
Match detect
Page 97
T5CL8
0
1
2
3
Counter clear

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cem2100Cem2100/98

Table of Contents