NEC PD78056F User Manual

Page of 593
173
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 interrupts request 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
×
 TI00 input cycle
2
16
 
×
 TI00 input cycle
TI00 input edge cycle
×
 1/f
X
2
16
 
×
 1/f
X
1/f
X
(400 ns)
(13.1 ms)
(200 ns)
×
 1/f
X
2
2
 
×
 1/f
X
2
16
 
×
 1/f
X
2
17
 
×
 1/f
X
1/f
X
×
 1/f
X
(400 ns)
(800 ns)
(13.1 ms)
(26.2 ms)
(200 ns)
(400 ns)
2
2
 
×
 1/f
X
2
3
 
×
 1/f
X
2
17
 
×
 1/f
X
2
18
 
×
 1/f
X
×
 1/f
X
2
2
 
×
 1/f
X
(800 ns)
(1.6 
µ
s)
(26.2 ms)
(52.4 ms)
(400 ns)
(800 ns)
2
3
 
×
 1/f
X
2
4
 
×
 1/f
X
2
18
 
×
 1/f
X
2
19
 
×
 1/f
X
2
2
 
×
 1/f
X
2
3
 
×
 1/f
X
(1.6 
µ
s)
(3.2 
µ
s)
(52.4 ms)
(104.9 ms)
(800 ns)
(1.6 
µ
s)
×
 watch timer output cycle
2
16
 
×
 watch timer output cycle
Watch timer output edge cycle
Remarks 1. f
X
:  Main system clock oscillation frequency
2. MCS:  Bit 0 of oscillation mode selection register (OSMS)
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.