CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Sound Generator)

4.12.4 Setting of buzzer frequency and sound level

The divided signal of the OSC1 oscillation clock (32.768 kHz) is used for the buzzer (BZ, XBZ) signals and it is set up such that 8 types of frequencies can be selected by changing this division ratio. Frequency selection is done by setting the buzzer frequency selection registers BZFQ0–BZFQ2 as shown in Table 4.12.4.1.

Table 4.12.4.1 Buzzer signal frequency setting

BZFQ2

BZFQ1

BZFQ0

Buzzer frequency (Hz)

0

0

0

4096.0

0

0

1

3276.8

0

1

0

2730.7

0

1

1

2340.6

1

0

0

2048.0

1

0

1

1638.4

1

1

0

1365.3

1

1

1

1170.3

The buzzer sound level is changed by controlling the duty ratio of the buzzer signal.

The duty ratio can be selected from among the 8 types shown in Table 4.12.4.2 according to the setting of the buzzer duty selection registers BDTY0–BDTY2.

 

 

Table 4.12.4.2

Duty ratio setting

 

 

 

 

 

 

 

Duty ratio by buzzer frequency (Hz)

Level

BDTY2

BDTY1

BDTY0

 

4096.0

3276.8

2730.7

2340.6

 

 

 

 

 

2048.0

1638.4

1365.3

1170.3

Level 1 (Max.)

0

0

0

 

8/16

8/20

12/24

12/28

Level 2

0

0

1

 

7/16

7/20

11/24

11/28

Level 3

0

1

0

 

6/16

6/20

10/24

10/28

Level 4

0

1

1

 

5/16

5/20

9/24

9/28

Level 5

1

0

0

 

4/16

4/20

8/24

8/28

Level 6

1

0

1

 

3/16

3/20

7/24

7/28

Level 7

1

1

0

 

2/16

2/20

6/24

6/28

Level 8 (Min.)

1

1

1

 

1/16

1/20

5/24

5/28

When the HIGH level output time has been made TH and when the LOW level output time has been made TL due to the ratio of the pulse width to the pulse synchronization, the duty ratio becomes TL/(TH+TL) for negative polarity or TH/(TH+TL) for positive polarity.

When BDTY0–BDTY2 have all been set to "0", the duty ratio becomes maximum and the sound level also becomes maximum. Conversely, when BDTY0–BDTY2 have all been set to "1", the duty ratio becomes minimum and the sound level also becomes minimum.

The duty ratio that can be set is different depending on the frequency that has been set, so see Table 4.12.4.2.

 

TH TL

 

 

 

 

 

 

 

 

 

 

TL TH

 

 

 

 

 

 

 

 

 

Level 1 (Max.)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 1 (Max.)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 2

 

 

 

 

 

 

 

 

 

 

 

 

Level 3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 8 (Min.)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Level 8 (Min.)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(a) Negative polarity

 

 

 

 

 

 

 

 

 

 

(b) Positive polarity

 

 

 

 

 

 

 

 

 

Fig. 4.12.4.1 Duty ratio of the buzzer signal waveform

Note: When a digital envelope has been added to the buzzer signal, the BDTY0–BDTY2 settings will be invalid due to the control of the duty ratio.

102

EPSON

S1C63558 TECHNICAL MANUAL