HYUNDAI MicroElectronics
13. BUZZER FUNCTION
GMS82512/16/24
The buzzer driver block consists of 6-bit binary counter,
buzzer register, and clock source selector. It generates
square-wave which has very wide range frequency (500Hz
~ 250kHz at fXIN= 8MHz) by user software.
The bit 0 to 5 of BUR determines output frequency for
buzzer driving.
Equation of frequency calculation is shown below.
f
XIN
A 50% duty pulse can be output to R55/BUZ pin to use for
piezo-electric buzzer drive. Pin R55 is assigned for output port
of Buzzer driver by setting the bit 5 of PMR5 (address D1H) to
“1”. At this time, the pin R55 must be defined as output
mode (the bit 5 of R5DD=1).
-------------------------------------------------------------
f
=
BUZ
2 × DivideRatio × BUR
f
f
: Buzzer frequency
BUZ
: Oscillator frequency
XIN
Divide Ratio: Prescaler divide ratio by BUCK[1:0]
BUR: Lower 6-bit value of BUR. Buzzer period value.
Example: 2.4kHz output at 8MHz.
LDM
LDM
R5DD,#XX1X_XXXXB
BUR,#9AH
The frequency of output signal is controlled by the buzzer
control register BUR.The bit 0 to bit 5 of BUR determine
output frequency for buzzer driving.
LDM
PMR5,#XX1X_XXXXB
X means don’t care
R55 port data
6-bit binary
6-BIT COUNTER
÷16
00
÷32
01
0
XIN PIN
÷2
÷64
R55/BUZ PIN
10
1
F/F
÷128
11
Comparator
MUX
2
Compare data
6
Port selection
PMR5
[0D1 ]
BUR
H
[0EC ]
H
Internal bus line
Figure 13-1 Block Diagram of Buzzer Driver
ADDRESS: 0D1
ADDRESS: 0EC
H
H
RESET VALUE: --00 ----
RESET VALUE: Undefined
B
W
W
W
W
W
W
W
W
W
W
BUCK1
BUCK0
-
-
-
-
-
-
PMR5
BUR
R54/WDTO Selection
0: R54
1: WDTO (Output)
BUR[5:0]
Buzzer Period Data
Source clock select
R55/BUZ Selection
00: ÷16
01: ÷ 32
10: ÷ 64
11: ÷128
0: R55 port (Turn off buzzer)
1: BUZ port (Turn on buzzer)
Figure 13-2 PMR5 and Buzzer Register
FEB. 2000 Ver 1.00
45