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

8-bit microcontroller
Hide thumbs Also See for F2MC-8L Series:
Table of Contents

Advertisement

9.5

Program Example for Buzzer Output

This section gives a program example for the buzzer output.
Example Program for Buzzer Output
Processing description
Outputs a buzzer output of approximately 1.025 kHz to the BZ pin, then turns the buzzer
output "OFF".
For a 4.2 MHz main clock source oscillation and selecting 2
oscillation), the buzzer output frequency is as follows:
Buzzer output frequency = 4.2 MHz/2
Coding example
BZCR
EQU
;----------Main program----------------------------------------------------------------------------------------------------------------------------------
CSEG
:
BUZON
MOV
:
:
:
BUZOFF
MOV
:
ENDS
;---------------------------------------------------------------------------------------------------------------------------------------------------------------
END
000FH
BZCR,#00000001B
BZCR,#00000000B
9.5 Program Example for Buzzer Output
12
= 4.2 MHz/4096 = 1.025kHz
; Address of buzzer register
; [CODE SEGMENT]
; Buzzer output "ON"
(About 1.025 kHz at a main clock frequency of 4.2 MHz)
; Buzzer output "OFF"
12
/F
(F
: main clock source
CH
CH
227

Advertisement

Table of Contents
loading

Table of Contents