CHAPTER 6 16-BIT TIMER 90
User’s Manual U15075EJ2V1UD
132
6.4.5 Buzzer output operation
The buzzer frequency is set using buzzer output control register 90 (BZC90) based on the count clock selected
with TCL901 and TCL900 of TMC90 (source clock). A square wave of the set buzzer frequency is output.
Table 6-4 shows the buzzer frequency.
Set 16-bit timer 90 as follows to use it for buzzer output:
•
Set P21 to output mode (PM21 = 0).
•
Reset output latch of P21 to 0.
•
Set a count clock using TCL901 and TCL900.
•
Set BZC90 as shown in Figure 6-12.
Figure 6-12. Settings of Buzzer Output Control Register 90 for Buzzer Output Operation
0
0
0
0
0/1
0/1
0/1
1
BCS902 BCS901 BCS900 BZOE90
BZC90
Setting of buzzer frequency (see
Table 6-4
)
Enables buzzer output
Table 6-4. Buzzer Frequency of 16-Bit Timer 90
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
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.