![](http://datasheet.mmic.net.cn/380000/-PD78196Y_datasheet_16744919/-PD78196Y_145.png)
CHAPTER 9 16-BIT TIMER COUNTER
145
9.4.5 Buzzer output operation
Set a buzzer frequency by using the count clock set by TCL901 and TCL900 of TMC90 as the source clock and
by using the buzzer output control register 90 (BZC90), and output the square wave of the set buzzer frequency.
Table 9-5 shows the buzzer frequency.
Set the 16-bit timer counter as follows to use it for buzzer output:
Set the port mode register (PM33) to output mode.
Set a count clock by using TCL901 and TCL900.
Set BZC90 as shown in Figure 9-12.
Clear TOE82 of 8-bit timer mode control register 82 (TMC82) to 0 and disable the output of 8-bit timer counter
82.
Figure 9-12. Setting of Buzzer Output Control Register 90 for Buzzer Output Operation
Caution
When using pin BZO90/P33/INTP3/TO82 for buzzer output, clear the port mode register (PM33)
and output latch (P33) to 0.
Table 9-5. Buzzer Frequency of 16-Bit Timer Counter (Main System Clock: Ceramic/Crystal Oscillation)
Buzzer Frequency
BCS902
BCS901
BCS900
fcl = f
X
/2
2
fcl = f
X
/2
6
fcl = f
X
/2
7
fcl = f
XT
0
0
0
fcl/2
4
(78.1 kHz)
fcl/2
4
(4.88 kHz)
fcl/2
4
(2.44 kHz)
fcl/2
4
(2.05 kHz)
0
0
1
fcl/2
5
(39.1 kHz)
fcl/2
5
(2.44 kHz)
fcl/2
5
(1.22 kHz)
fcl/2
5
(1.02 kHz)
0
1
0
fcl/2
8
(4.88 kHz)
fcl/2
8
(305 Hz)
fcl/2
8
(153 Hz)
fcl/2
8
(128 Hz)
0
1
1
fcl/2
9
(2.44 kHz)
fcl/2
9
(153 Hz)
fcl/2
9
(76 Hz)
fcl/2
9
(64 Hz)
1
0
0
fcl/2
10
(1.22 kHz)
fcl/2
10
(76 Hz)
fcl/2
10
(38 Hz)
fcl/2
10
(32 Hz)
1
0
1
fcl/2
11
(610 Hz)
fcl/2
11
(38 Hz)
fcl/2
11
(19 Hz)
fcl/2
11
(16 Hz)
1
1
0
fcl/2
12
(305 Hz)
fcl/2
12
(19 Hz)
fcl/2
12
(10 Hz)
fcl/2
12
(8 Hz)
1
1
1
fcl/2
13
(153 Hz)
fcl/2
13
(10 Hz)
fcl/2
13
(5 Hz)
fcl/2
13
(4 Hz)
Remarks 1.
f
X
: Main system clock oscillation frequency (ceramic/crystal oscillation)
2.
f
XT
: Subsystem clock oscillation frequency
3.
The parenthesized values apply to operation at f
X
= 5.0 MHz or f
XT
= 32.768 kHz.
0
0
0
0
0/1
0/1
0/1
1
BCS902 BCS901 BCS900 BZOE90
BZC90
Setting of buzzer frequency (see
Table 9-5
)
Enables buzzer output