PIC单片机音乐播放程序
点击数:7754 次 录入时间:03-04 11:37:22 整理:http://www.55dianzi.com PIC单片机
b BeepForEnd
MOV LW B’00000101’ ;开TMR2 1:4分频
MOV WF T2CON
MOV f BeepMode,w
b BeepModeJmp
psWhisle:
call WhisleTab
b BeepPlay
psOk:
call OkTab
b BeepPlay
psHang:
call HangTab
b BeepPlay
psWelcom:
call WelcomTab
b BeepPlay
BeepPlay:
incf BeepCnt,f
MOV wf TmrBak
MOV f TmrBak,f
btfsc status,z
b BeepOff
MOV lw .1
xorwf TmrBak,w
btfsc status,z
b BeepStop
b BeepForEnd
BeepOff:
clrf BeepCnt
bcf Sflag,FgBeep
bcf BeepOut
bcf T2CON,TMR2ON
b BeepForEnd
BeepStop:
bcf T2CON,TMR2ON ;stop
bcf BeepOut
BeepForEnd:
retlw 0
;**************************************************
END
上一页 [1] [2]
本文关键字:单片机 程序 音乐播放 PIC单片机,单片机-工控设备 - PIC单片机