17.1 Sound Generator Function
The sound generator has the function to sound the buzzer from an external speaker, and the following two signals
are output.
(1) Basic cycle output signal (with/without amplitude)
The signal is a buzzer signal with a variable frequency. By setting bits 0 to 2 (SGCL0 to SGCL2) of the sound
generator control register (SGCR), the signal in a range of 0.25 to 7.7 kHz can be output (when f
The amplitude of the basic cycle output signal can be varied by ANDing the basic cycle output signal with the
7-bit-resolution PWM signal, to enable control of the buzzer sound volume.
(2) Amplitude output signal
A PWM signal with a 7-bit resolution for variable amplitude can be independently output.
Figure 17-1 shows the sound generator block diagram and Figure 17-2 shows the concept of each signal.
SGCL0
f
1/2
X
f
SG1
PWM amplitude
Comparator
4
SGBR3 SGBR2 SGBR1 SGBR0
Sound generator buzzer
control register (SGBR)
CHAPTER 17 SOUND GENERATOR
Figure 17-1. Sound Generator Block Diagram
Internal bus
Sound generator control register (SGCR)
TCE SGOB SGCL2 SGCL1 SGCL0
2
f
SG2
5-bit counter
Clear
Comparator
1/2
S
Q
R
SGOB
7
SGAM6 SGAM5 SGAM4 SGAM3 SGAM2 SGAM1 SGAM0
Sound generator amplitude
register (SGAM)
Internal bus
P60 output
Clock output
PM60
latch
control circuit (PCL)
= 8.38 MHz).
X
SGO/SGOF/P61
PCL/SGOA/P60
Port mode
register 6 (PM6)
205