NEC PD78058 Network Card User Manual


 
177
CHAPTER 8 16-BIT TIMER/EVENT COUNTER
8.2 16-Bit Timer/Event Counter Functions
The 16-bit timer/event counter (TM0) has the following functions.
Interval timer
PWM output
Pulse width measurement
External event counter
Square-wave output
One-shot pulse output
PWM output and pulse width measurement can be used at the same time.
(1) Interval timer
TM0 generates interrupt requests at the preset time interval.
Table 8-2. 16-Bit Timer/Event Counter Interval Times
Minimum Interval Time Maximum Interval Time Resolution
MCS = 1 MCS = 0 MCS = 1 MCS = 0 MCS = 1 MCS = 0
2 × TI00 input cycle 2
16
× TI00 input cycle TI00 input edge cycle
—2 × 1/fX —2
16
× 1/fX 1/fX
(400 ns) (13.1 ms) (200 ns)
2 × 1/fX 2
2
× 1/fX 2
16
× 1/fX 2
17
× 1/fX 1/fX 2 × 1/fX
(400 ns) (800 ns) (13.1 ms) (26.2 ms) (200 ns) (400 ns)
2
2
× 1/fX 2
3
× 1/fX 2
17
× 1/fX 2
18
× 1/fX 2 × 1/fX 2
2
× 1/fX
(800 ns) (1.6
µ
s) (26.2 ms) (52.4 ms) (400 ns) (800 ns)
2
3
× 1/fX 2
4
× 1/fX 2
18
× 1/fX 2
19
× 1/fX 2
2
× 1/fX 2
3
× 1/fX
(1.6
µ
s) (3.2
µ
s) (52.4 ms) (104.9 ms) (800 ns) (1.6
µ
s)
2 × watch timer output cycle 2
16
× watch timer output cycle Watch timer output edge cycle
Remarks 1. fX: Main system clock oscillation frequency
2. MCS: Oscillation mode selection register (OSMS) bit 0
3. Values in parentheses when operated at f
X = 5.0 MHz
(2) PWM output
TM0 can generate 14-bit resolution PWM output.
(3) Pulse width measurement
TM0 can measure the pulse width of an externally input signal.
(4) External event counter
TM0 can measure the number of pulses of an externally input signal.