蜂鸣器播放爱你歌曲c语言程序设计,51单片机蜂鸣器播放歌曲汇编源码和仿真

org 0000Hsjmp startorg0040Hstart: mov R3,#-1;loop4:jb p1.0,stopzero ; the first step: see if button1 on. it is 0 jump to stopzero(2us)inc R3;R3=0 at first (1us)sjmp mod1;butoon=1jump to paly...
摘要由CSDN通过智能技术生成

org 0000H

sjmp start

org  0040H

start: mov R3,#-1;

loop4:

jb p1.0,stopzero ; the first step: see if button1 on. it is 0 jump to stopzero  (2us)

inc R3  ;R3=0 at first   (1us)

sjmp mod1;butoon=1  jump to paly the song (2us)

stopzero:  ;(5us)

jb p1.1,stopone         ;see if button2 is on. it's 0 jump to stoptone(2us)

inc R3  ;  R3=0 at first   (1us)

sjmp mod1         ; jump to paly the song (2us)

stopone:; (5us)

jb p1.3,loop4         ;see if button3 is on. it's 0 jump to stoptwo(2us)

inc R3

sjmp mod1         ; jump to paly the song (2us)

mod1:        mov a,R3       ;(1us)

chec1:       jb p1.0,chec2         ;(2us)find which song we are playing (2us)

sjmp b1                ;(2us)

chec2:             jb p1.1,chec3

sjmp b2

chec3:             jb p1.3,che

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值