單片機(jī)學(xué)習(xí)知識點全攻略(完結(jié)篇)(三)
db 30h,20h,1ch,20h,20h,20h,20h,80h,26h,20h,30h,10h,30h,10h,30h,20h
db 39h,20h,26h,10h,2bh,10h,2bh,20h,2bh,40h,40h,10h,40h,10h,20h,10h
db 20h,10h,2bh,10h,26h,30h,30h,80h,00H
END
音樂程序匯編代碼代碼2 -------------Voice1.asm--------------------------
;標(biāo)題 ‘八月桂花香’發(fā)聲程序
;摘要 詳見‘無線電’92年3期
;作者 周振安
ORG 0000H
LJMP START
ORG 000BH
INC 20H ;中斷服務(wù),中斷計數(shù)器加1
MOV TH0,#0D8H
MOV TL0,#0EFH ;12M晶振,形成10毫秒中斷
RETI
START:
MOV SP,#50H
MOV TH0,#0D8H
MOV TL0,#0EFH
MOV TMOD,#01H
MOV IE,#82H
MUSIC0:
NOP
評論