HYUNDAI MicroElectronics
15. BUZZER FUNCTION
GMS81C2012/GMS81C2020
The buzzer driver block consists of 6-bit binary counter,
buzzer register BUR, and clock source selector. It gener-
ates square-wave which has very wide range frequency
(480Hz ~ 250kHz at fXIN= 4MHz) 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 R03/BUZO pin to use
for piezo-electric buzzer drive. Pin R03 is assigned for output
port of Buzzer driver by setting the bit 3 of R0FUNC(address
0F4H) to “1”. At this time, the pin R03 must be defined as
output mode (the bit 3 of R0IO=1).
---------------------------------------------------------------------------
f
=
BUZ
2 × DivideRatio × (BUR + 1)
fBUZ: Buzzer frequency
fXIN: Oscillator frequency
Divide Ratio: Prescaler divide ratio by BUCK[1:0]
BUR: Lower 6-bit value of BUR. Buzzer period value.
Example: 5kHz output at 4MHz.
LDM
LDM
R0IO,#XXXX_1XXXB
BUR,#0011_0010B
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
R0FUNC,#XXXX_1XXXB
X means don’t care
R03 port data
6-bit binary
8
÷
00
01
10
11
6-BIT COUNTER
16
32
64
÷
÷
÷
0
XIN PIN
2
÷
R03/BUZO PIN
1
F/F
Comparator
MUX
2
Compare data
3
6
Port selection
R0FUNC
[0F4H]
BUR
[0DEH]
Internal bus line
Figure 15-1 Block Diagram of Buzzer Driver
ADDRESS : 0F4H
RESET VALUE : ---- 0000B
ADDRESS: 0DEH
RESET VALUE: Undefined
W
W
W
W
W
W
W
W
W
W
W
W
BUCK1
BUCK0
BUZO EC0 INT1 INT0
-
-
R0FUNC
-
-
BUR
BUR[5:0]
Buzzer Period Data
Source clock select
R03/BUZO Selection
0: R03 port (Turn off buzzer)
1: BUZO port (Turn on buzzer)
00:
8
÷
01: 16
÷
10: 32
÷
11: 64
÷
Figure 15-2 R0FUNC and Buzzer Register
MAR. 2000 Ver 1.00
69