129
CHAPTER 9 BUZZER OUTPUT CONTROLLER
User’s Manual U15104EJ2V0UD
9.3.2 BUZ
BUZ is controlled by the following register.
• Clock output select register (CKS)
(1) Clock output select register (CKS)
This register enables/disables buzzer output and sets the clock of the buzzer output.
CKS is set with a 1-bit or 8-bit memory manipulation instruction.
Reset input clears this register to 00H.
Figure 9-4. Format of Clock Output Select Register (CKS)
BZOE
Enables/disables output of BUZ
0
Low-level output
1
Enables buzzer output
BCS1
BCS0
Selects output clock of BUZ
0
0
f
X
/2
10
(4.39 kHz)
0
1
f
X
/2
11
(2.20 kHz)
1
0
f
X
/2
12
(1.10 kHz)
1
1
f
X
/2
13
(549 Hz)
Remarks 1. f
X
: System clock frequency
2. ( ): f
X
= 4.5 MHz
9.4 Operation of Buzzer Output Controllers
The buzzer frequency is output by the following procedure.
(1) BEEP0
<1> Select a buzzer output frequency using bits 0 to 2 (BEEPCL00 to BEEPCL02) of BEEP clock select
register 0 (BEEPCL0).
<2> Set the output latch of P36 to 0.
<3> Set bit 6 (PM36) of the port mode register 3 to 0 (set the output mode).
(2) BUZ
<1> Select a buzzer output frequency by using bits 5 and 6 (BCS0 and BCS1) of the clock output select
register (CKS) (disable buzzer output).
<2> Set bit 7 (BZOE) of CKS to 1 and enable buzzer output.
<3> Set the output latch of P37 to 0.
<4> Set bit 7 (PM37) of the port mode register 3 to 0 (set output mode).
<7>
6
5
4
3
BZOE BCS1 BCS0
0
0
2
0
1
0
0
0
Symbol
CKS
Address
FF40H
After reset
00H
R/W
R/W
Содержание mPD178053
Страница 2: ...2 User s Manual U15104EJ2V0UD MEMO ...