Chapter 4 Setting Methods; Setting The External Event Counter Function Of 16-Bit Timer/Event Counter 00 - NEC 78K0S/K 1+ Series Application Note

External event counter
Hide thumbs Also See for 78K0S/K 1+ Series:
Table of Contents

Advertisement

This chapter describes the external event counter function of 16-bit timer/event counter 00.
For other initial settings, refer to the
Control Application
Note. For interrupt, refer to the
Generated by Switch Input Application
Program (Low-Voltage Detection) Reset Generation During Detection at Less than 2.7 V Application
For how to set registers, refer to the user's manual of each product (78K0S/KU1+, 78K0S/KY1+, 78K0S/KA1+,
78K0S/KB1+).
For assembler instructions, refer to the

4.1 Setting the External Event Counter Function of 16-bit Timer/Event Counter 00

When using 16-bit timer/event counter 00 as an external event counter, the valid edge of the external event input
(input from the TI000 pin) is counted and an interrupt signal (INTTM000) is generated upon a match between the
TM00 counter and CR000 register.
The INTTM000 signal is generated at the following timings.
• INTTM000 signal generation timing (only first time)
= The number of times the valid edge of the external event input is detected × (CR000 setting value + 2)
• INTTM000 signal generation timing (second and following times)
= The number of times the valid edge of the external event input is detected × (CR000 setting value + 1)
The valid edge is detected for the first time, when the TI000 pin input signal is sampled at the f
the valid edge level is detected for two consecutive times. Therefore, noise with a short pulse width can be eliminated.
The following six types of registers are set when using 16-bit timer/event counter 00 as an external event counter.
• Capture/compare control register 00 (CRC00)
• 16-bit timer capture/compare register 000 (CR000)
• Prescaler mode register 00 (PRM00)
• 16-bit timer mode control register 00 (TMC00)
• Port mode register x (PMx)
• Port mode control register x (PMCx)

CHAPTER 4 SETTING METHODS

78K0S/Kx1+ Sample Program (Initial Settings) LED Lighting Switch
78K0S/Kx1+ Sample Program (Interrupt) External Interrupt
Note. For low-voltage detection (LVI), refer to the
78K/0S Series Instructions User's
Note
Note
Application Note U18888EJ1V0AN
78K0S/Kx1+ Sample
Manual.
clock cycle and
XP
Note.
9

Advertisement

Table of Contents
loading

This manual is also suitable for:

78k0s/ka1+78k0s/kb1+78k0s/ku1+78k0s/ky1+

Table of Contents