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

F2mc-8l 8-bit microcontroller
Hide thumbs Also See for F2MC-8L F202RA:
Table of Contents

Advertisement

15.5

Program Example for Buzzer Output

This section shows an program example for buzzer output.
Program Example for Buzzer Output
● Processing specification
Suppose that the buzzer output of 3.052 kHz is output to the BZ pin and then the buzzer output is cut off.
12
If 2
/F
CH
follows:
Buzzer output frequency: 12.5 MHz/2
● Coding example
BZCR
;-------------------Main program-----------------------------------------------------------------
; ----------------------------------------------------------------------------------------------------------
is selected when the oscillation (F
EQU
0018H
CSEG
:
MOV
BZCR,#00000010 ; Buzzer output on (3.052 kHz / Oscillation of 12.5 MHz)
:
:
:
MOV
BZCR,#00000000 ; Buzzer output off (I/O port or PPG output)
:
:
ENDS
END
) is 12.5 MHz, the buzzer output frequency is calculated as
CH
12
= 12.5 MHz/4096 = 3.052 kHz
; Address of the buzzer register
; [CODE SEGMENT]
CHAPTER 15 BUZZER OUTPUT
345

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-8l mb89202Mb89202/f202ra series

Table of Contents