pic16F877A音乐盒c语言,PIC16F877A完成音乐播放法度模范(《两只老虎》片断)(国外英文资料).doc...

本文介绍如何使用PIC16F877A单片机实现音乐播放功能,通过调整定时器和音调表来控制蜂鸣器播放不同频率的《两只老虎》片段。硬件连接包括RC6模块,并详细说明了如何设置测试板和控制音速。此实践旨在理解单芯片驱动蜂鸣器的基本原理,以及通过改变音符时长实现不同频率声音。
摘要由CSDN通过智能技术生成

PIC16F877A完成音乐播放法度模范(《两只老虎》片断)(国外英文资料)

PIC16F877A实现音乐播放程序(《两只老虎》片段)

; PIC16F877A to implement the music playback program (" two tigers ")

; Function description:

; The music is played by the sound of the buzzer on the driving test board.

; Remove the sound of music from the TABLE (1, 2... 7) by changing the value in the TABLE to play different music.

; Remove the audio from TABLE_YP to play music, which is the duration of the tone.

; Adjust DELAY DELAY to the speed of music.

; The purpose of this practice is to familiarize you with the idea of how a single chip can drive a buzzer. And by changing the length of the duration of the speech, the sound of different frequencies is achieved.

; Hardware connection:

; The buzzer picks up RC6.

; 2, this program USES the buzzer on the test board to make a sound, the 5th position of the dial switch 13 must be set 1, and other code switches can be turned off.

; The original provider of this example: pic16 BBS member ppmy, in which I thank ppmy for sharing this instance.

; The technology department of shenzhen city, the technology department of the technology department of shenzhen, (BBS net name: zhongruntian) is being examined and added to the process of finishing and commenting.

; PIC: PIC single-chip, : BBS: /bbs/

; Copyright all, reproduced please indicate the origin, and cannot remove or change the explanatory text in the document.

; Program file name "SONG. ASM"

; The list of programs is as follows:

; * * * * * * * * * * *

LIST P = PIC16F877, R = DEC

# INCLUDE P16F877. INC

; * * * * * * * * * * *

Errorlevel - 302-302

__CONFIG _debug_debug_off & _cpd_all & _cpd__________________ ________ ________________________________________________ __________________

; * * * * * * * * * * * * * * * * * * * * registers

CBLOCK 0 x20

JP

YP

L1

L2

TA: 2

COUNT1

COUNT2

W_STACK

ST_STACK

ENDC

; * * * * * * * * * * *

ORG 0 x0000

Nop; Place an empty instruction that MCD must be

GOTO MAIN; The main program

ORG 0 x0004

BTFSC PIR1. The interrupt subroutine

GOTO T1; Turn the T1 processing

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值