S1C88348/317/316/308 TECHNICAL HARDWARE
EPSON
I-131
5 PERIPHERAL CIRCUITS AND THEIR OPERATION (Sound Generator)
Table 5.13.3.2 Duty ratio settings
By selecting the duty ratio of the BZ signal from
among 8 types, the buzzer sound level can be adjusted.
This selection is made in the duty ratio selection
register DUTY0–DUTY2. The setting value and duty
ratio correspondence is shown in Table 5.13.3.2.
5.13.3 Setting of buzzer frequency
and sound level
The BZ signal is a divided signal using the OSC1
oscillation circuit (32.768 kHz) as the clock source
and 8 frequencies can be selected. This selection is
done by the buzzer frequency selection register
BZFQ0–BZFQ2. The setting value and buzzer
frequency correspondence is shown in Table 5.13.3.1.
Table 5.13.3.1 Buzzer signal frequency settings
BZFQ2
Buzzer frequency (Hz)
0
1
4096.0
3276.8
2730.7
2340.6
2048.0
1638.4
1365.3
1170.3
BZFQ1
0
1
0
1
BZFQ0
0
1
0
1
0
1
0
1
5.13.4 Digital envelope
A digital envelope with duty control can be added
to the BZ signal.
The envelope can be realized by staged changing of
the same duty ratio as detailed in Table 5.13.3.2 in
the preceding section from level 1 (maximum) to
level 8 (minimum).
The addition of an envelope to the buzzer signal
can be done by writing "1" to the envelope control
register ENON. When "0" is written, the duty ratio
is set at the level selected in DUTY0–DUTY2.
By writing "1" to ENON to turn the buzzer output
ON (writing "1" to BZON), a BZ signal with a level
1 duty ratio is output, and then the duty ratio can
be attenuated in stages to level 8. The attenuated
envelope can be returned to level 1 by writing "1" to
the envelope reset bit ENRST. When attenuated to
level 8, the duty level remains at level 8 until the
buzzer output is turned OFF (writing "0" to BZON)
or writing "1" to ENRST.
The stage changing time for the envelope level can
be selected either 125 msec or 62.5 msec by the
envelope attenuation time selection register ENRTM.
Figure 5.13.4.1 shows the timing chart of the digital
envelope.
Duty ratio refers to the ratio of pulse width to the
pulse cycle; given that HIGH level output time is
TH, and low level output time is TL the BZ signal
becomes TH/(TH+TL).
When DUTY0–DUTY2 have all been set to "0", the
duty ratio becomes maximum and the sound level
also becomes maximum. Conversely, when
DUTY0–DUTY2 have all been set to "1", the duty
ratio becomes minimum and the sound level also
becomes minimum.
Note that the duty ratio setting differ depending on
frequency. See Table 5.13.3.2.
Level 1 (MAX)
Level 2
Level 3
Level 4
Level 5
Level 6
Level 7
Level 8 (MIN)
TL TH
Fig. 5.13.3.1 Duty ratio of buzzer signal waveform
Note: When using the digital envelope, the
DUTY0–DUTY2 setting becomes invalid.
Level
Level 1 (Max)
Level 2
Level 3
Level 4
Level 5
Level 6
Level 7
Level 8 (Min)
12/28
11/28
10/28
9/28
8/28
7/28
6/28
5/28
4096.0
2048.0
3276.8
1638.4
2730.7
1365.3
2340.6
1170.3
DUTY0
DUTY2
DUTY1
8/20
7/20
6/20
5/20
4/20
3/20
2/20
1/20
0
1
0
1
0
1
0
1
0
1
8/16
7/16
6/16
5/16
4/16
3/16
2/16
1/16
12/24
11/24
10/24
9/24
8/24
7/24
6/24
5/24
0
1
0
1
Duty ratio by buzzer frequencies (Hz)