2 16-bit timer/event counter functions – NEC uPD78056Y User Manual

Page 177

Advertising
background image

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/f

X

2

16

×

1/f

X

1/f

X

(400 ns)

(13.1 ms)

(200 ns)

2

×

1/f

X

2

2

×

1/f

X

2

16

×

1/f

X

2

17

×

1/f

X

1/f

X

2

×

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

2

×

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)

2

×

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: 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.

Advertising