English
Language : 

GMS81C7216 Datasheet, PDF (61/121 Pages) List of Unclassifed Manufacturers – 8-BIT SINGLE-CHIP MICROCONTROLLERS
GMS81C7208/7216
16. BUZZER FUNCTION
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=
4MHz) by user software.
A 50% duty pulse can be output to R30/BUZ pin to use for piezo-
electric buzzer drive. Pin R30 is assigned for output port of Buzz-
er driver by setting the bit 5 of PMR (address D9H) to “1”. At this
time, the pin R30 must be defined as output mode (the bit 0 of
R3DD=1).
Example: 2.4kHz output at 4MHz.
LDM R3DD,#XXXX_XXX1B
LDM BUR,#0111_0011B
SET1 PMR.5
CLR1 PMR.5
;BUZ ON
;BUZ OFF
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[5:0] + 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 BUR[5:0] determine output frequency for
buzzer driving.
SCMR[1:0]
fXIN
0X
reserved
1X
BUR[7:6]
÷8
00
÷16
01
÷32
10
÷64 11
MUX
R30 port data
6-bit Binary Counter
÷2
F/F
Comparator
6-bit Compare Data
BUR[5:0]
[0FDH]
0
1
PMR.5
R30/BUZ PIN
Figure 16-1 Block Diagram of Buzzer Driver
PMR
ADDRESS: 0D9H
RESET VALUE: 00H
R/W R/W R/W R/W R/W R/W R/W R/W
-
- BUZ EC2 EC0 INT2 INT1 INT0
BUR
W WW
BUCK1 BUCK0
ADDRESS: 0FDH
RESET VALUE: Undefined
W W WW W
R30/BUZ selection
0: R30 port (Turn off buzzer)
1: BUZ port (Turn on buzzer)
Figure 16-2 PMR and Buzzer Register
BUR[5:0]
Define frequency of buzzer signal
Source clock select
00: ÷ 8
01: ÷ 16
10: ÷ 32
11: ÷ 64
FEB. 2005 Ver 1.04
57