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

Sample program (16-bit timer/event counter 00) interval timer
Hide thumbs Also See for 78K0S/K 1+ Series:
Table of Contents

Advertisement

This chapter describes the interval timer 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 Interval Timer Function of 16-bit Timer/Event Counter 00

The following eight types of registers are set when using 16-bit timer/event counter 00 as an interval timer.
A square wave can be output by using the interval timer function when the timer output (TO00 pin output) is
enabled by using the TOC00 register.
• Capture/compare control register 00 (CRC00)
• 16-bit timer capture/compare register 000 (CR000)
• Prescaler mode register 00 (PRM00)
• 16-bit timer output control register 00 (TOC00)
• 16-bit timer mode control register 00 (TMC00)
• Port mode register x (PMx)
• Port register x (Px)
Note
• Port mode control register x (PMCx)
Note To use the TO00 pin as the timer output (outputting square wave with the TO00 pin), set it as follows.
This setting is not required when not using the TO00 pin as the timer output.
78K0S/KA1+ and 78K0S/KB1+ microcontrollers
78K0S/KY1+ and 78K0S/KU1+ microcontrollers
10

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
P31 = 0
P21 = 0
Application Note U18887EJ1V0AN
Manual.
Px Register
PMx Register
PM31 = 0
PM21 = 0
78K0S/Kx1+ Sample
Note.
PMCx Register
Setting not required
PMC21 = 0

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents