209
CHAPTER 17 SOUND GENERATOR
The maximum and minimum values of the buzzer output frequency are as follows.
SGCL2
SGCL1
SGCL0
Maximum and Minimum Values of Buzzer Output
f
SG2
f
X
= 8 MHz
f
X
= 8.38 MHz
Max. (kHz)
Min. (kHz)
Max. (kHz)
Min. (kHz)
0
0
0
f
SG1
/2
6
3.677
1.953
3.851
2.046
0
0
1
f
SG1
/2
5
7.354
3.906
7.702
4.092
0
1
0
f
SG1
/2
7
1.838
0.976
1.926
1.024
0
1
1
f
SG1
/2
6
3.677
1.953
0.481
2.046
1
0
0
f
SG1
/2
8
0.919
0.488
0.963
0.512
1
0
1
f
SG1
/2
7
1.838
0.976
1.926
1.024
1
1
0
f
SG1
/2
9
0.460
0.244
0.481
0.256
1
1
1
f
SG1
/2
8
0.919
0.488
0.963
0.512
The sound generator output frequency f
SG
can be calculated by the following expression.
f
SG
= 2
(SGCL0 – SGCL1 – 2
×
SGCL2 – 7)
×
{f
X
/(SGBR + 17)}
Substitute set 0 or 1 to SGCL0 to SGCL2 in the above expression. Substitute a decimal value to SGBR.
Where f
X
= 8 MHz, SGCL0 to SGCL2 is (1, 0, 0), and SGBR0 to SGBR3 is (1, 1, 1, 1), SGBR = 15.
Therefore,
f
SG
= 2
(1 – 0 – 2
×
0 – 7)
×
{f
X
/(15 + 17)}
= 3.906 kHz
(2) Sound generator buzzer control register (SGBR)
SGBR is a register that sets the basic frequency of the sound generator output signal.
SGBR is set with a 1-bit or 8-bit memory manipulation instruction.
RESET input clears SGBR to 00H.
Figure 17-4 shows the SGBR format.
Содержание mPD780973 Series
Страница 2: ...2 MEMO ...
Страница 66: ...66 MEMO ...
Страница 98: ...98 MEMO ...
Страница 138: ...138 MEMO ...
Страница 164: ...164 MEMO ...
Страница 182: ...182 MEMO ...
Страница 204: ...204 MEMO ...
Страница 244: ...244 MEMO ...
Страница 262: ...262 MEMO ...
Страница 278: ...278 MEMO ...
Страница 290: ...290 MEMO ...