Application Note
78K0S/Kx1+
Sample Program (Watchdog Timer)
131 ms Interval Runaway Detection
This document describes an operation overview of the sample program, as well as how to use the sample program and
how to set and use the watchdog timer. In the sample program, a reset signal generated by an overflow of the
watchdog timer is generated at a 50% chance of occurrence during a switch input, by setting the runaway detection time
to 131 ms.
CONTENTS
CHAPTER 1 OVERVIEW ...................................................................................3
1.1 Main Contents of Initial Settings ..............................................................4
1.2 Contents
Following the Main Loop...........................................................4
CHAPTER 2 CIRCUIT DIAGRAM ....................................................................6
2.1 Circuit
Diagram ........................................................................................6
2.2 Peripheral
Hardware ................................................................................6
CHAPTER 3 SOFTWARE .................................................................................7
3.1 File
Configuration.....................................................................................7
3.2 Internal
Peripheral
Functions to Be Used ................................................8
3.3 Initial Settings and Operation Overview...................................................8
3.4 Flow
Chart..............................................................................................10
CHAPTER 4 SETTING METHODS ................................................................11
4.1 Watchdog Timer (WDT) Setting.............................................................11
CHAPTER 5 OPERATION CHECK USING THE DEVICE ..........................19
5.1 Building the Sample Program ................................................................19
5.2 Operation
with the Device......................................................................21
CHAPTER 6 RELATED DOCUMENTS..........................................................23
APPENDIX A PROGRAM LIST......................................................................24
APPENDIX B REVISION HISTORY ...............................................................36
Target devices
78K0S/KA1+ microcontroller
78K0S/KB1+ microcontroller
78K0S/KU1+ microcontroller
78K0S/KY1+ microcontroller
Document No. U18847EJ1V0AN00 (1st edition)
Date Published October 2007 N
Printed in Japan
2007