Interrupt Request Generation Using External Event Counter; Example Where Input Of No Valid Edge Cannot Be Distinguished From Input Of Only One Valid Edge With External Event Counter - NEC PD78212 User Manual

8-bit single-chip microcomputer sub-series
Table of Contents

Advertisement

µ PD78214 Sub-Series
Fig. 7-138 Interrupt Request Generation Using External Event Counter
ICI
Countable
timing of
TM2
Count clock of
TM2
TM2
(2) When 8-bit timer/counter 2 is used as an external event counter, TM2 alone cannot distinguish between the
state where no valid edge is applied and the state where only one valid edge has been applied. (See Fig. 7-
139.) In either case, the value of TM2 is 0. When the states need to be distinguished from each other, use the
INTP2 interrupt request flag. (The same pin is used as the INTP2 pin as well as the CI pin, so that the functions
can be used at the same time.) Fig. 7-140 shows an example of distinction.
Fig. 7-139 Example Where Input of No Valid Edge Cannot Be Distinguished from Input of
Only One Valid Edge with External Event Counter
220
CI
8 to 12 clocks
16 clocks (Max.)
n-1
Coincidence
TM2 counts up here
between INTP2
or is compared with
and ICI
compare register.
CI
TM2
0
0
Cannot be distinguished
Count starts
n
n+1
ICI: Signal that has gone
through the edge
detector of CI input
1
2

Advertisement

Table of Contents
loading

Table of Contents