NEC 78K0 User Manual page 141

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 00 (TM00) is operated in free-running mode, and the edge specified by prescaler mode
register 00 (PRM00) is input to the TI000 pin, the value of TM00 is taken into 16-bit timer capture/compare
register 010 (CR010) and an external interrupt request signal (INTTM010) is set.
Specify both the rising and falling edges by using bits 4 and 5 (ES000 and ES001) of PRM00.
Sampling is performed using the count clock selected by PRM00, and a capture operation is only performed
when a valid level of the TI000 pin is detected twice, thus eliminating noise with a short pulse width.
Figure 6-17. Control Register Settings for Pulse Width Measurement with Free-Running Counter
and One Capture Register (When TI000 and CR010 Are Used)
TMC00
CRC00
PRM00
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.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
(a) 16-bit timer mode control register 00 (TMC00)
7
6
5
4
TMC003
0
0
0
0
(b) Capture/compare control register 00 (CRC00)
7
6
5
4
0
0
0
0
(c) Prescaler mode register 00 (PRM00)
ES101
ES100
ES001
ES000
0/1
0/1
1
1
User's Manual U16227EJ2V0UD
TMC002
TMC001
OVF00
0
1
0/1
0
Free-running mode
3
CRC002
CRC001
CRC000
0
1
0/1
0
CR000 used as compare register
CR010 used as capture register
3
2
PRM001
PRM000
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.)
141

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

78kc1

Table of Contents