- 1、本文档共16页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
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
RETFI
文档评论(0)