And One Capture Register (When Ti00N And Cr01N Are Used) - NEC 78K0 User Manual

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

Advertisement

(1) Pulse width measurement with free-running counter and one capture register
When 16-bit timer counter 0n (TM0n) is operated in free-running mode, and the edge specified by prescaler mode
register 0n (PRM0n) is input to the TI00n pin, the value of TM0n is taken into 16-bit timer capture/compare
register 01n (CR01n) and an external interrupt request signal (INTTM01n) is set.
Specify both the rising and falling edges by using bits 4 and 5 (ES0n0 and ES0n1) of PRM0n.
Sampling is performed using the count clock selected by 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.
Figure 7-22. Control Register Settings for Pulse Width Measurement with Free-Running Counter

and One Capture Register (When TI00n and CR01n Are Used)

TMC0n
CRC0n
PRM0n
Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with pulse width measurement.
See the description of the respective control registers for details.
µ
n = 0:
PD780143, 780144
µ
n = 0, 1:
PD780146, 780148, 78F0148
192
CHAPTER 7 16-BIT TIMER/EVENT COUNTERS 00 AND 01
(a) 16-bit timer mode control register 0n (TMC0n)
7
6
5
4
TMC0n3
0
0
0
0
(b) Capture/compare control register 0n (CRC0n)
7
6
5
4
0
0
0
0
(c) Prescaler mode register 0n (PRM0n)
ES1n1
ES1n0
ES0n1
ES0n0
0/1
0/1
1
1
User's Manual U15947EJ2V0UD
TMC0n2
TMC0n1
OVF0n
0
1
0/1
0
Free-running mode
3
CRC0n2
CRC0n1
CRC0n0
0
1
0/1
0
CR00n used as compare register
CR01n used as capture register
*
3
2
PRM0n1
PRM0n0
0
0
0/1
0/1
Selects count clock (setting "11" is prohibited).
Specifies both edges for pulse width detection.
Setting invalid (setting "10" is prohibited.)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

78kf1

Table of Contents