S3F84B8_UM_REV 1.00
17 PROGRAMMABLE BUZZER
17-1
17
PROGRAMMABLE BUZZER
17.1 OVERVIEW OF PROGRAMMABLE BUZZER
The S3F84B8 microcontroller has a built-in programmable buzzer, whose operation is controlled by a single
control register, BUZCON.
17.2 FUNCTIONAL DESCRIPTION OF PROGRAMMABLE BUZZER
The buzzer’s output in S3F84B8 is a square wave with wide frequency range.
0.488kHz – 125kHz @ f
OSC
= 4MHz
17.2.1 BUZ CONTROL REGISTERS (BUZCON)
You can use the BUZ control register, BUZCON, for the following purposes:
Enable
BUZ
Select input clock clock frequency
Program output frequency
Buzzer Control Register (BUZCON)
F7H, Set1, Bank0, R/W
LSB
MSB
.7
.6
.5
.4
.3
.2
.1
.0
Reset Value: 00h
BUZ clock selection bits
00 = fosc/16
01 = fosc/32
10 = fosc/64
11 = fosc/128
BUZ frequency bits
BUZ enable bit
0 = Disable BUZ
1 = Enable BUZ
BUZ Frequency = fBUZ/[(BUZCON.4-0)+1]x 2
Figure 17-1 Buzzer Control Register (BUZCON)