
AN07-00200-03E
74
4.2
Understanding and running the program in single-unit operation
This section explains sample programs as programs that practically turn on/of the LED using switch
operations and that control the buzzer using the A/D converter operations
.
Start
Initialize
(Port and interrupt levels)
Initialize AD computer
Infinite loop
Initialize external interrupt
Clear external interrupt request
flag
LED4, LED5, and LED6 ON/
OFF
End external interrupt
processing
Start external interrupt
processing
Start external interrupt
processing
Clear external interrupt request
flag
PPG start/stop
PPG output authorized
End external interrupt
processing
Start AD conversion
interrupt
Clear interrupt request flag
Use volume SW
Cycle setting
false
true
Duty setting
Acquire A/D value
from temperature
sensor
End AD conversion
interrupt
LED temperature
display
Acquire A/D value
from slide volume
Figure 4-11 Single-unit operation flowcharts
Press SW2
Press SW3