Internal Peripheral Functions To Be Used; Initial Settings And Operation Overview - 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

3.2

Internal Peripheral Functions to Be Used

The following internal peripheral functions of the microcontroller are used in this sample program.
• Interval timer function:
• V
< V
detection:
DD
LVI
• Switch input:
• LED output:
Note INTP1/P43: 78K0S/KA1+ and 78K0S/KB1+ microcontrollers
INTP1/P32: 78K0S/KY1+ and 78K0S/KU1+ microcontrollers
3.3

Initial Settings and Operation Overview

In this sample program, initial settings including the setting of the low-voltage detection function, selection of the
clock frequency, setting of the I/O ports, setting of 16-bit timer/event counter 00 (interval timer function), and setting of
interrupts are performed.
The LEDs are blinked at fixed cycles by using the generation of a 16-bit timer/event counter 00 interrupt
(INTTM000), after completion of the initial settings.
An INTP1 interrupt is serviced when the falling edge of the INTP1 pin, which is generated by switch input, is
detected. Chattering is identified when INTP1 is at high level (switch is off), after 10 ms have elapsed since a fall of
the INTP1 pin was detected. The blinking cycle of the LEDs is changed in accordance with the number of switch
inputs when INTP1 is at low level (switch is on), after 10 ms have elapsed since an edge was detected.
CHAPTER 3 SOFTWARE
16-bit timer/event counter 00
Low-voltage detector (LVI)
Note
INTP1
(external interrupt)
P20 (output port)
Application Note U18887EJ1V0AN
7

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents