Panasonic F77G, MN101C77C user manual Operation X

Models: F77G MN101C77C

1 544
Download 544 pages 59.61 Kb
Page 325
Image 325

Chapter 10 Buzzer

10-3-2 Setup Example

Buzzer outputs the square wave of 2 kHz from P06 pin. It is used 8.38 MHz as the high oscillation clock (fosc).

An example setup procedure, with a description of each step is shown below.

 

 

Setup Procedure

 

Description

 

 

 

 

(1)

Set the buzzer frequency.

(1)

Set the BUZS2-0 flag of the oscillation

 

DLYCTR (x'3F4D')

 

stabilization wait control register (DLYCTR) to

 

bp6-4 : BUZS2-0 = 010

 

"010" to select fosc/212 to the buzzer

 

 

 

 

frequency.

 

 

 

 

When the high oscillation clock fosc is 8.38

 

 

 

 

MHz, the buzzer output frequency is 2.05 kHz.

(2)

Set P06 pin.

(2)

Set the output data P0OUT6 of P06 pin to "0",

 

P0OUT (x'3F10')

 

and set the direction control P0DIR6 of P06 pin

 

bp6

: P0OUT6 = 0

 

to "1" to select output mode.

 

P0DIR (x'3F30')

 

P06 pin outputs low level.

 

bp6

: P0DIR6 = 1

 

 

(3)

Buzzer output ON.

(3)

Set the BUZOE flag of the oscillation

 

DLYCTR (x'3F4D')

 

stabilization wait control register (DLYCTR) to

 

bp7

: BUZOE = 1

 

"1" to output the square wave of the buzzer

 

 

 

 

output frequency set by P06 pin.

(4)

Buzzer output OFF.

(4)

Set the BUZOE flag of the oscillation

 

DLYCTR (x'3F4D')

 

stabilization wait control register (DLYCTR) to

 

bp7

: BUZOE = 0

 

"0" to clear, and P06 pin outputs low level.

 

 

 

 

 

Operation X - 5

Page 325
Image 325
Panasonic F77G, MN101C77C user manual Operation X