355
User’s Manual U12697EJ3V0UM
CHAPTER 20 BUZZER OUTPUT FUNCTIONS
20.1 Function
This function outputs a square wave at the frequencies of 1.5 kHz, 3.1 kHz, 6.1 kHz, and 12.2 kHz. The buzzer
frequency selected by the clock output control register (CKS) is output from the BUZ/P24 pin.
The following procedure outputs the buzzer frequency.
<1> Select the buzzer output frequency by using bits 5 to 7 (BCS0, BCS1, BZOE) of CKS. (In a state where
the buzzer is prohibited from sounding.)
<2> Set the P24 output latch to 0.
<3> Set bit 4 (PM24) of the port 2 mode register (PM2) to 0 (set the output mode).
Caution When the output latch of P24 is set to one, the buzzer output cannot be used.
20.2 Configuration
The buzzer output function includes the following hardware.
Table 20-1. Configuration of Buzzer Output Function
Item
Configuration
Control register
Clock output control register (CKS)
Port 2 mode register (PM2)
Figure 20-1. Block Diagram of Buzzer Output Function
f
XX
/2
10
f
XX
/2
11
3
BUZ/P24
BZOE BCS1 BCS0
P24 output latch
PM24
Selector
Port 2 mode register (PM2)
Internal bus
f
XX
/2
12
f
XX
/2
13
Clock output control register (CKS)