Chapter 19 Simple Sound Generator (SSGV1)
S12ZVHY/S12ZVHL Family Reference Manual Rev. 1.05
Freescale Semiconductor
669
19.4.2
SSG Tone Generation
The tone is a low frequency square waveform. Tone generation logic consists of a tone counter triggered
by prescaler signal and the tone period register SSGTONE with its buffer register. The register SSGTONE
contains the coefficient value of half tone period, one tone cycle period = 2 x (S 1) x prescaler
cycle. The tone signal is also used as one of the synchronous reload signal.
Figure 19-22. SSG Tone Generation
19.4.3
SSG Attack and Decay function
In SSG the value hold in the amplitude buffer register can be automatically increased or decreased. The
amplitude increase implements sound volume attack and the amplitude decrease implements sound
volume decay. If ADS is cleared while the ADE is set, attack function will be enabled, if the ADS is set
while ADE is set, decay function will be enabled. If ADE is cleared, attack/decay function will be disabled.
The attack/decay function implements sound volume automatic increase/decrease with a small number of
CPU interventions.
Attack/decay function includes linear operation, gong operation and exponential operation.
SSGTONE
S 1
(x prescaler period)
(x prescaler period)
+ 1
......
0
1
2
0
1
2
2
1
0
RDR
T is value of SSGTONE buffer
where : RDR is the RDR bit of SSGCR
Tcounter is the tone counter
T
T
T
0
1
2
3 ......
......
......
prescaler clock
Tcounter
Tone
Amplitude PWM
......
......
......