
AN07-00200-03E
69
4.1.2
Controlling the buzzer using the volume switch
This section introduces processing to change the buzzer sound according to changes in the digital
signal converted from the analog signals input into the microcontroller. By Volume SW operations,
the analog signals input into the microcontroller is converted to digital using an A/D converter and
acquire them as digital signals internally. Further, the A/D converter is a function that separates and
converts analog values to digital values using standards based on certain rules. In addition, this
function is built into the microcontroller, and the conversion process is called “A/D conversion”.
In the starter kit, the voltage values applied to the analog pins for A/D conversion can be controlled
using the volume switch, which is built into the starter kit. Analog signals are input to the
microcontroller using this knob. Analog signals that have been entered are processed by the
microcontroller after being converted to digital signals by the A/D converter.
Figure 4-5 Single-unit operation/Volume SW
An A/D converter with 8-bit resolution (10-bit resolution can also be used) is built into the main
microcontroller in the starter kit.8-bit resolution is the name given to the ability to deblock and
convert analog values to digital values in 2
8
(i.e., 256) steps.1-bit voltage accuracy (at 5V) during
8-bit resolution is described below.
1-bit voltage accuracy (at 5V)
With 8-bit resolution
5V/256 = Approx. 0.01953V
This explanation concerns the volume switch mechanism, but the symbol for a variable resistor is
used in “Figure 4-6 Volume SW (variable resistor)”. In truth, the volume switch is really a variable
resistor.
Figure 4-6 Volume SW (variable resistor)
Volume SW to adjust applied
voltage