And Two Capture Registers (With Rising Edge Specified) - NEC 78K0 User Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0:
Table of Contents

Advertisement

Figure 7-28. Timing of Pulse Width Measurement Operation with Free-Running Counter
t
Count clock
TM0n count value
0000H
TI00n pin input
CR01n capture value
CR00n capture value
INTTM01n
OVF0n
Note Clear OVF0n by software.
(4) Pulse width measurement by means of restart
When input of a valid edge to the TI00n pin is detected, the count value of 16-bit timer counter 0n (TM0n) is taken
into 16-bit timer capture/compare register 01n (CR01n), and then the pulse width of the signal input to the TI00n
pin is measured by clearing TM0n and restarting the count operation.
Either of two edgesrising or fallingcan be selected using bits 4 and 5 (ES0n0 and ES0n1) of prescaler mode
register 0n (PRM0n).
Sampling is performed using the count clock cycle selected by prescaler mode register 0n (PRM0n) and a
capture operation is only performed when a valid level of the TI00n pin is detected twice, thus eliminating noise
with a short pulse width.
µ
Remark n = 0:
PD780143, 780144
µ
n = 0, 1:
PD780146, 780148, 78F0148
CHAPTER 7 16-BIT TIMER/EVENT COUNTERS 00 AND 01

and Two Capture Registers (with Rising Edge Specified)

0001H
D0
D0 + 1
D0
(D1 − D0) × t
User's Manual U15947EJ2V0UD
D1
D1 + 1
FFFFH
0000H
D1
(10000H − D1 + D2) × t
*
D2
D2 + 1
D3
D2
D3
Note
(D3 − D2) × t
197

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

78kf1

Table of Contents