English
Language : 

HMS81C2012A Datasheet, PDF (70/107 Pages) List of Unclassifed Manufacturers – CMOS Single-Chip 8-Bit Microcontroller with A/D Converter & VFD Driver
HMS81C2012A/2020A
15. BUZZER FUNCTION
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.
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).
Example: 5kHz output at 4MHz.
LDM R0IO,#XXXX_1XXXB
LDM BUR,#0011_0010B
LDM R0FUNC,#XXXX_1XXXB
X means don’t care
The bit 0 to 5 of BUR determines output frequency for
buzzer driving.
Equation of frequency calculation is shown below.
fBUZ
=
---------------------------------f--X----I--N----------------------------------
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.
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.
XIN PIN
÷8
00
÷16
01
÷32
10
÷64 11
MUX
2
R03 port data
6-bit binary
6-BIT COUNTER
÷2
F/F
Comparator
Compare data
[0DEH]
6
BUR
Internal bus line
0
1
R03/BUZO PIN
3
R0FUNC Port selection
[0F4H]
Figure 15-1 Block Diagram of Buzzer Driver
R0FUNC - -
ADDRESS : 0F4H
RESET VALUE : ---- 0000B
WW WW
-
- BUZO EC0 INT1 INT0
BUR
W WW
BUCK1 BUCK0
ADDRESS: 0DEH
RESET VALUE: Undefined
W W WW W
R03/BUZO Selection
0: R03 port (Turn off buzzer)
1: BUZO port (Turn on buzzer)
Figure 15-2 R0FUNC and Buzzer Register
BUR[5:0]
Buzzer Period Data
Source clock select
00: ÷ 8
01: ÷ 16
10: ÷ 32
11: ÷ 64
66
SEP. 2004 Ver 2.00