Chapter 1 Overview - NEC 78K0S/K 1+ Series Application Note

Led lighting switch control sample program (initial settings)
Hide thumbs Also See for 78K0S/K 1+ Series:
Table of Contents

Advertisement

In this sample program, the basic initial settings for the 78K0S/Kx1+ microcontroller, such as setting the option byte,
selecting the clock frequency, and setting I/O ports are performed. In the main processing operation after completion
of the initial settings, the lighting of the three LEDs is controlled by using the two switch inputs.
(1) Main contents of initial settings
• Selecting the high-speed internal oscillator as the system clock source
• Stopping watchdog timer operation
• Setting the CPU clock frequency and peripheral hardware clock frequency to 2 MHz
• Setting I/O ports
(2) Contents of main processing operation
Lighting of the LEDs (LED1, LED2, LED3) is controlled by detecting switch inputs (SW1, SW2) with the
78K0S/Kx1+ microcontroller.
<Input>
ON
SW1
Switch Input
SW1
OFF
ON
OFF
ON
Caution For cautions when using the device, refer to the user's manual of each product (78K0S/KU1+,
78K0S/KY1+, 78K0S/KA1+, 78K0S/KB1+).

CHAPTER 1 OVERVIEW

SW2
microcontroller
SW2
OFF
OFF
ON
ON
Application Note U18752EJ2V0AN
78K0S/Kx1+
LED Output
LED1
LED2
OFF
OFF
ON
OFF
OFF
ON
OFF
OFF
<Output>
LED1
LED2
LED3
LED3
OFF
OFF
OFF
ON
3

Advertisement

Table of Contents
loading

This manual is also suitable for:

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

Table of Contents