Program Example For Buzzer Output - Fujitsu F2MC-8L MB89620 Series Hardware Manual

8-bit microcontroller
Table of Contents

Advertisement

5
11.

Program Example for Buzzer Output

This section gives a program example for the buzzer output.
n Example Program for Buzzer Output
l
Processing description
Coding example
l
BZCR
;----------Main program-----------------------------------------------------------------------------------------------------------------------------------
BUZON
BUZOFF
;---------------------------------------------------------------------------------------------------------------------------------------------------------------
230
CHAPTER 11 BUZZER OUTPUT
Outputs a buzzer output of approximately 1.22 kHz to the BZ pin, then turns the
buzzer output "OFF".
For a 10 MHz source oscillation and selecting 2
buzzer output frequency is as follows:
Buzzer output frequency = 10 MHz/2
EQU
000FH
CSEG
:
MOV
BZCR,#00000001B
:
:
:
MOV
BZCR,#00000000B
:
ENDS
END
13
/F
(F
: source oscillation), the
C
C
13
= 10 MHz/8192 = 1220.703 Hz
; Buzzer register
; [CODE SEGMENT]
; Buzzer output "ON"
; Buzzer output "OFF"
MB89620 series

Advertisement

Table of Contents
loading

Table of Contents