![NEC 78K0S/K 1+ Series Application Note Download Page 3](http://html.mh-extra.com/html/nec/78k0s-k-1-series/78k0s-k-1-series_application-note_249252003.webp)
CHAPTER 1 OVERVIEW
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.
SW1
SW2
ON
78K0S/Kx1+
microcontroller
<Input>
LED1
LED2
LED3
<Output>
Switch Input
LED Output
SW1 SW2 LED1 LED2 LED3
OFF OFF OFF OFF OFF
ON OFF ON OFF OFF
OFF ON OFF ON OFF
ON ON OFF
OFF ON
Caution For cautions when using the device, refer to the user’s manual of each product (
,
).
Application Note U18752EJ2V0AN
3