CHAPTER 3 SOFTWARE
Application Note U18752EJ2V0AN
7
3.4 Flow
Chart
A flow chart for the sample program is shown below.
Start
Stopping watchdog timer
operation
Stack pointer setting
Setting the CPU clock
frequency and peripheral
hardware clock frequency
to 2 MHz
Stopping the oscillation of the
low-speed internal oscillator
Reading the switch input from
the input port (P4)
I/O port setting
Extracting the LED output
corresponding to the read
input value
Initial settings
Option byte setting
LED outputs (LED1 to LED3)
from the output port (P2)