External Event Counter Function - NEC PD78212 User Manual

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

Advertisement

µ PD78214 Sub-Series
(c) Restart before 0 is set in TM2 cleared

7.3.5 External Event Counter Function

Eight-bit timer/counter 2 can count clock pulses externally applied to the CI pin.
The external event counter operation mode requires no particular selection method. TM2 functions as an external
event counter when external count input is specified for the count clock of TM2 by setting the higher 4 bits of
prescaler mode register 1 (PRM1).
The maximum frequency of an external clock pulse that can be counted by TM2 functioning as an external event
counter is 187.5 kHz when occurrences of both CI input signal edges are counted, and is 250 kHz when occurrences
of only one edge are counted (f
When occurrences of both edges are counted, the external clock pulse signal must have a pulse width of 16 system
clock pulses (2.67 µ s: f
CLK
this value, no edges may be counted. When occurrences of only one edge are counted, the external clock pulse
signal must have a pulse width of 12 system clock pulses (2 µ s: f
the low level. If the pulse width is less than this value, no edges may be counted.
Fig. 7-75 shows the external event count timing of 8-bit timer/counter 2.
170
Count clock
n-1
TM2
CE2
When the CE2 bit is set to 1 before this count clock, Clearing
TM2 by CE2←0 and counting by CE2←1 are performed simultaneously.
= 6 MHz).
CLK
= 6 MHz) or more for both the high level and the low level. If the pulse width is less than
n
0
= 6 MHz) or more for both the high level and
CLK
1
2

Advertisement

Table of Contents
loading

Table of Contents