EM6603
7
BUZZER
The EM6603 has one 50% duty cycle output with three different frequencies which can be used to drive a
buzzer. I/O terminal PB0 is used for this function when the buzzer is enabled by setting the BUen bit to 1 .
Table 22 below shows how to select the frequency by writing to the BCF1 and BCF0 control flags in the BEEP
register.
After writing to the buzzer control register BEEP, the
Table 22.Buzzer frequency selection
chosen frequency (or silence) is selected
Tone frequency
silence
1024 Hz
2048 Hz
2667 Hz
BCF1
BCF0
immediately. With the BUen bit set to 1, the selected
frequency is output at PB0. When the BUen is set to
0 PB0 is used as a normal I/O terminal of PortB. The
BUen bit has a higher priority over the I/O control bit
CIOPB0 in the CIOPortB register.
0
0
1
1
0
1
0
1
7.1 Buzzer Register
Table 23.Buzzer control register - BEEP
Bit
Name
TimEn
BUen
BCF1
BCF0
Reset
R/W
R/W
R/W
R/W
R/W
Description
3
0
0
0
0
Timer/counter enable
Buzzer enable
2
1
Buzzer Frequency control
Buzzer Frequency control
0
03/02 REV. G/439
15
www.emmicroelectronic.com
Copyright 2002, EM Microelectronic-Marin SA