NEC 78K0S/KB1+ User Manual page 99

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0S/KB1+:
Table of Contents

Advertisement

The external event counter counts the number of external clock pulses to be input to the TI000 pin with using 16-bit
timer counter 00 (TM00).
TM00 is incremented each time the valid edge specified by prescaler mode register 00 (PRM00) is input.
When the TM00 count value matches the 16-bit timer capture/compare register 000 (CR000) value, TM00 is
cleared to 0 and the interrupt request signal (INTTM000) is generated.
Input a value other than 0000H to CR000. (A count operation with a pulse cannot be carried out.)
The rising edge, the falling edge, or both edges can be selected using bits 4 and 5 (ES000 and ES010) of
prescaler mode register 00 (PRM00).
Because an operation is carried out only when the valid edge of the TI000 pin is detected twice after sampling with
the internal clock (f
), noise with a short pulse width can be removed.
XP
Figure 6-14. Control Register Settings in External Event Counter Mode (with Rising Edge Specified)
7
6
CRC00
0
0
ES110
ES100
ES010
PRM00
0/1
0/1
7
6
TMC00
0
0
Remark 0/1: Setting 0 or 1 allows another function to be used simultaneously with the external event counter.
See the description of the respective control registers for details.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
(a) Capture/compare control register 00 (CRC00)
5
4
3
CRC002
CRC001
0
0
0
0/1
0/1
(b) Prescaler mode register 00 (PRM00)
ES000
3
2
PRM001
0
1
0
0
1
(c) 16-bit timer mode control register 00 (TMC00)
5
4
TMC003
TMC002
TMC001
0
0
1
1
0/1
User's Manual U17446EJ3V1UD
CRC000
0
CR000 used as compare register
PRM000
1
Selects external clock.
Specifies rising edge for pulse width detection.
Setting invalid (setting "10" is prohibited.)
OVF00
0
Clears and starts on match between TM00 and CR000.
99

Advertisement

Table of Contents
loading

Table of Contents