注意:访问本站需要Cookie和JavaScript支持!请设置您的浏览器! 打开购物车 查看留言付款方式联系我们
初中电子 单片机教材一 单片机教材二
搜索上次看见的商品或文章:
商品名、介绍 文章名、内容
首页 电子入门 学单片机 免费资源 下载中心 商品列表 象棋在线 在线绘图 加盟五一 加入收藏 设为首页
本站推荐:
★无线电遥控七路开关解码程序
文章长度[7918] 加入时间[2006/7/27] 更新时间[2024/11/25 14:36:15] 级别[3] [评论] [收藏]
功能简介:解码2272程序。

org 00h
mov 2eh,#0ffh
mov r6,#0
mov r0,#80h
mov r1,#0h
sta:mov 0e3h,#10h
mov 0e4h,r1
mov 0e7h,#0
orl 0e7h,#10000000b
mov 0e5h,#1
mov 0e6h,#46h
mov 0e6h,#0b9h
nop
mov 0e7h,#0
mov 0e5h,#0
mov 0e6h,#0
mov @r0,0e2h
inc r0
inc r1
cjne r0,#0h, sta
main:
jb p3.7,bgao
djnz 3ah,bdi
call rec
bgao:mov 3ah,#60
bdi:call key
call run
cjne r6,#0,fs2
mov c,70h
mov p1.4,c
mov c,71h
mov p1.5,c
mov c,72h
mov p1.6,c
mov c,73h
mov p1.7,c
fs2:cjne r6,#4,fs3
mov r7,39h
mov c,77h
mov p3.4,c
fs0:cjne r7,#1,san1
mov c,77h
mov p1.4,c
san1:cjne r7,#2,san2
mov c,77h
mov p1.5,c
san2:cjne r7,#3,san3
mov c,77h
mov p1.6,c
san3:cjne r7,#4,fs3
mov c,77h
mov p1.7,c
fs3:cjne r6,#8,fsend
setb 4eh
call clea
fsend:djnz 3ch,main
mov 3ch,#200
djnz 3bh,main
mov 3bh,#60
clr 3dh
clr 4dh
cpl 77h
jmp main
key:mov r7,#0
k0:jb p1.0,k1
;jb p1.0,k1
mov r7,#1
k1:jb p1.1,k2
;jb p1.1,k2
mov r7,#2
k2:jb p1.2,k3
;jb p1.2,k3
mov r7,#3
k3:jb p1.3,k4
;jb p1.3,k4
mov r7,#4
k4:cjne r7,#0,ky
mov 3eh,#20
jb 3dh,rkend
setb 3dh
djnz 3fh,rkend
mov r6,#0
rkend:ret
ky:mov 3dh,r7
mov 39h,r7
mov 3fh,#100
jb 3dh,rkend
setb 3dh
djnz 3eh,rkend
cjne r6,#4,mm1
mov r6,#8
mm1:cjne r6,#0,mm2
mov r6,#4
ret
mm2:mov r6,#8
ret
run:cjne r7,#0,rkend
run0:mov r7,3dh
mov 3dh,#0
cjne r7,#1,run1
cpl 70h
run1:cjne r7,#2,run2
cpl 71h
run2:cjne r7,#3,run3
cpl 72h
run3:cjne r7,#4,rkend
cpl 73h
r35:mov r3,#2
mov r5,#200
ret
rec:mov 20h,#0
mov 21h,#0
mov 22h,#0
call r35
mov r3,#20
rec0s:jb p3.7,rec0n
djnz r5,rec0s
djnz r3,rec0s
ret
rec0n:call r35
rec0x:jnb p3.7,rec1
djnz r5,rec0x
setb 00h
djnz r3,rec0x
ret
rec1:call r35
rec1s:jb p3.7,rec1n
djnz r5,rec1s
djnz r3,rec1s
ret
rec1n:call r35
rec1x:jnb p3.7,rec2
djnz r5,rec1x
setb 01h
djnz r3,rec1x
ret
rec2:call r35
rec2s:jb p3.7,rec2n
djnz r5,rec2s
djnz r3,rec2s
ret
rec2n:call r35
rec2x:jnb p3.7,rec3
djnz r5,rec2x
setb 02h
djnz r3,rec2x
ret
rec3:call r35
rec3s:jb p3.7,rec3n
djnz r5,rec3s
djnz r3,rec3s
ret
rec3n:call r35
rec3x:jnb p3.7,rec4
djnz r5,rec3x
setb 03h
djnz r3,rec3x
ret
rec4:call r35
rec4s:jb p3.7,rec4n
djnz r5,rec4s
djnz r3,rec4s
ret
rec4n:call r35
rec4x:jnb p3.7,rec5
djnz r5,rec4x
setb 04h
djnz r3,rec4x
ret
rec5:call r35
rec5s:jb p3.7,rec5n
djnz r5,rec5s
djnz r3,rec5s
ret
rec5n:call r35
rec5x:jnb p3.7,rec6
djnz r5,rec5x
setb 05h
djnz r3,rec5x
ret
rec6:call r35
rec6s:jb p3.7,rec6n
djnz r5,rec6s
djnz r3,rec6s
ret
rec6n:call r35
rec6x:jnb p3.7,rec7
djnz r5,rec6x
setb 06h
djnz r3,rec6x
ret
rec7:call r35
rec7s:jb p3.7,rec7n
djnz r5,rec7s
djnz r3,rec7s
ret
rec7n:call r35
rec7x:jnb p3.7,rec8
djnz r5,rec7x
setb 07h
djnz r3,rec7x
ret
rec8:call r35
rec8s:jb p3.7,rec8n
djnz r5,rec8s
djnz r3,rec8s
ret
rec8n:call r35
rec8x:jnb p3.7,rec9
djnz r5,rec8x
setb 08h
djnz r3,rec8x
ret
rec9:call r35
rec9s:jb p3.7,rec9n
djnz r5,rec9s
djnz r3,rec9s
ret
rec9n:call r35
rec9x:jnb p3.7,rec10
djnz r5,rec9x
setb 09h
djnz r3,rec9x
ret
rec10:call r35
rec10s:jb p3.7,rec10n
djnz r5,rec10s
djnz r3,rec10s
ret
rec10n:call r35
rec10x:jnb p3.7,rec11
djnz r5,rec10x
setb 0ah
djnz r3,rec10x
ret
rec11:call r35
rec11s:jb p3.7,rec11n
djnz r5,rec11s
djnz r3,rec11s
ret
rec11n:call r35
rec11x:jnb p3.7,rec12
djnz r5,rec11x
setb 0bh
djnz r3,rec11x
ret
rec12:call r35
rec12s:jb p3.7,rec12n
djnz r5,rec12s
djnz r3,rec12s
ret;ret
rec12n:call r35
rec12x:jnb p3.7,rec13
djnz r5,rec12x
setb 0ch
djnz r3,rec12x
ret
rec13:call r35
rec13s:jb p3.7,rec13n
djnz r5,rec13s
djnz r3,rec13s
ret
rec13n:call r35
rec13x:jnb p3.7,rec14
djnz r5,rec13x
setb 0dh
djnz r3,rec13x
ret
rec14:call r35
rec14s:jb p3.7,rec14n
djnz r5,rec14s
djnz r3,rec14s
ret
rec14n:call r35
rec14x:jnb p3.7,rec15
djnz r5,rec14x
setb 0eh
djnz r3,rec14x
ret
rec15:call r35
rec15s:jb p3.7,rec15n
djnz r5,rec15s
djnz r3,rec15s
ret
rec15n:call r35
rec15x:jnb p3.7,rec16
djnz r5,rec15x
setb 0fh
djnz r3,rec15x
ret
rec16:call r35
rec16s:jb p3.7,rec16n
djnz r5,rec16s
djnz r3,rec16s
ret
rec16n:call r35
rec16x:jnb p3.7,rec17
djnz r5,rec16x
setb 10h
djnz r3,rec16x
ret
rec17:call r35
rec17s:jb p3.7,rec17n
djnz r5,rec17s
djnz r3,rec17s
ret
rec17n:call r35
rec17x:jnb p3.7,rec18
djnz r5,rec17x
setb 11h
djnz r3,rec17x
ret
rec18:call r35
rec18s:jb p3.7,rec18n
djnz r5,rec18s
djnz r3,rec18s
ret
rec18n:call r35
rec18x:jnb p3.7,rec19
djnz r5,rec18x
setb 12h
djnz r3,rec18x
ret
rec19:call r35
rec19s:jb p3.7,rec19n
djnz r5,rec19s
djnz r3,rec19s
ret
rec19n:call r35
rec19x:jnb p3.7,rec20
djnz r5,rec19x
setb 13h
djnz r3,rec19x
ret
rec20:call r35
rec20s:jb p3.7,rec20n
djnz r5,rec20s
djnz r3,rec20s
ret
rec20n:call r35
rec20x:jnb p3.7,rec21
djnz r5,rec20x
setb 14h
djnz r3,rec20x
ret
rec21:call r35
rec21s:jb p3.7,rec21n
djnz r5,rec21s
djnz r3,rec21s
ret
rec21n:call r35
rec21x:jnb p3.7,rec22
djnz r5,rec21x
setb 15h
djnz r3,rec21x
ret
rec22:call r35
rec22s:jb p3.7,rec22n
djnz r5,rec22s
djnz r3,rec22s
ret
rec22n:call r35
rec22x:jnb p3.7,rec23
djnz r5,rec22x
setb 16h
djnz r3,rec22x
ret
rec23:call r35
rec23s:jb p3.7,rec23n
djnz r5,rec23s
djnz r3,rec23s
ret
rec23n:call r35
rec23x:jnb p3.7,rec24
djnz r5,rec23x
setb 17h
djnz r3,rec23x
ret
rec24:
mov a,20h
cjne a,24h,bgbd
mov a,21h
cjne a,25h,bgbd
mov a,22h
cjne a,26h,bgbd
jb 4dh,bgbd
setb 4dh
mov r4,#0h
cjne r6,#4,cread
mov r6,#0
call wir
cread:call read
ret
bgbd:mov 24h,20h
mov 25h,21h
mov 26h,22h
jmp rec
read:mov a,r4
rl a
rl a
add a,#80h
mov r0,a
mov a,@r0
mov 3dh,@r0
inc r0
mov a,@r0
cjne a,24h,readend
inc r0
mov a,@r0
cjne a,25h,readend
inc r0
mov a,@r0
cjne a,26h,readend
call run0
readend:inc r4
cjne r4,#32,read
mov 3dh,#0
ret
wir:mov a,r4
rl a
rl a
add a,#80h
mov r0,a
mov a,@r0
wy0:cjne a,#1,wy1
jmp wend
wy1:cjne a,#2,wy2
jmp wend
wy2:cjne a,#3,wy3
jmp wend
wy3:cjne a,#4,wing
jmp wend
wing:
mov @r0,39h
inc r0
mov @r0,24h
inc r0
mov @r0,25h
inc r0
mov @r0,26h
call save
ret
wend:inc r4
cjne r4,#32,wir
mov 2eh,#0
ret
save:
mov 0e3h,#10h
mov 0e4h,#00h
mov 0e7h,#0
orl 0e7h,#10000000b
mov 0e5h,#3
mov 0e6h,#46h
mov 0e6h,#0b9h
nop
mov 0e7h,#0
mov 0e5h,#0
mov 0e6h,#0
mov r0,#80h
mov r1,#0
sav:mov 0e3h,#10h
mov 0e4h,r1
mov 0e2h,@r0
mov 0e7h,#0
orl 0e7h,#10000000b
mov 0e5h,#2
mov 0e6h,#46h
mov 0e6h,#0b9h
nop
mov 0e7h,#0
mov 0e5h,#0
mov 0e6h,#0
inc r0
inc r1
cjne r0,#0h,sav
ret
clea:mov r4,#0
clea0:mov a,r4
rl a
rl a
add a,#80h
mov r0,a
mov a,@r0
cjne a,3dh,cleaend
mov @r0,#0ffh
clr 4eh
cleaend:inc r4
cjne r4,#32,clea0
jb 4eh,clea1
call save
clea1:mov 3dh,#0
mov r6,#0
ret
end
  本程序为商业程序,可以提供给某些付费用户阅读,但是并不表示提供任意使用权!请阅读者不要用来做与本站竟争的事情!另外,本站不负责要本程序的技术服务。需要详细的服务您可能需要支付500元以上的费用!
1、 本站不保证以上观点正确,就算是本站原创作品,本站也不保证内容正确。
2、如果您拥有本文版权,并且不想在本站转载,请书面通知本站立即删除并且向您公开道歉! 以上可能是本站收集或者转载的文章,本站可能没有文章中的元件或产品,如果您需要类似的商品请 点这里查看商品列表!
本站协议 | 版权信息 |  关于我们 |  本站地图 |  营业执照 |  发票说明 |  付款方式 |  联系方式
深圳市宝安区西乡五壹电子商行——粤ICP备16073394号-1;地址:深圳西乡河西四坊183号;邮编:518102
E-mail:51dz$163.com($改为@);Tel:(0755)27947428
工作时间:9:30-12:00和13:30-17:30和18:30-20:30,无人接听时可以再打手机13537585389