![NEC 78K0S/K 1+ Series Скачать руководство пользователя страница 1](http://html.mh-extra.com/html/nec/78k0s-k-1-series/78k0s-k-1-series_application-note_249252001.webp)
Printed in Japan
Document No. U18752EJ2V0AN00 (2nd edition)
Date Published September 2008 NS
78K0S/Kx1+
Sample Program (Initial Settings)
LED Lighting Switch Control
Application Note
2007
Target devices
78K0S/KA1+ microcontroller
78K0S/KB1+ microcontroller
78K0S/KU1+ microcontroller
78K0S/KY1+ microcontroller
This document summarizes the initial settings for the sample program and describes basic initial settings for
the microcontroller. In the sample program, the two switch inputs and lighting of the three LEDs are
controlled, after the basic initial settings for the microcontroller, such as selecting the clock frequency or I/O
port, have been performed.
CONTENTS
CHAPTER 1 OVERVIEW ....................................................................................3
CHAPTER 2 CIRCUIT DIAGRAM ......................................................................4
2.1 Circuit
Diagram ........................................................................................4
2.2 Peripheral
Hardware ................................................................................4
CHAPTER 3 SOFTWARE ...................................................................................5
3.1 File
Configuration.....................................................................................5
3.2 Internal
Peripheral
Functions to Be Used ................................................6
3.3
Initial Settings and Operation Overview...................................................6
3.4 Flow
Chart ...............................................................................................7
CHAPTER 4 SETTING METHODS .....................................................................8
4.1
Option Byte Setting ..................................................................................8
4.2
Vector Table Setting ..............................................................................12
4.3 Stack
Pointer Setting .............................................................................13
4.4 Watchdog
Timer Setting ........................................................................14
4.5 Clock
Setting..........................................................................................17
4.6 Port
Setting ............................................................................................23
4.7 Main
Processing ....................................................................................27
CHAPTER 5 OPERATION CHECK USING SYSTEM SIMULATOR SM+ ........29
5.1
Building the Sample Program ................................................................29
5.2
Operation with SM+ ...............................................................................31
CHAPTER 6 RELATED DOCUMENTS.............................................................35
APPENDIX A PROGRAM LIST.........................................................................36
APPENDIX B REVISION HISTORY ..................................................................43