打印

大家帮看看我这个程序有没什么问题

[复制链接]
1236|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
chenczy|  楼主 | 2008-9-4 16:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
ov, TI
  按键是2(P2.2,P2.4)*3(P2.5,P2.6,P2.7),为什么我的按键有些没问题,有些不行,不知道是不是这个程序的问题,有错的话是在那里
  LK:
        MOV       25H,#0
        MOV       P2,#1FH
        NOP
        NOP
        NOP
        NOP
        JNB       P2.2,LK1
        JNB       P2.4,LK1
        JMP       LK0
LK1:
        CALL      TIME3
        CALL      TIME3
        CALL      TIME3
        MOV       P2,#1FH
        NOP
        NOP
        NOP
        NOP
        NOP
        JNB       P2.2,LK2
        JNB       P2.4,LK2
        JMP       LK0
LK2:
        MOV       P2,#0DFH
        NOP
        NOP
        NOP
        NOP
        JNB       P2.2,LK3
        JNB       P2.4,LK4
        JMP       LK5
LK3:
        MOV       25H,#03H
        JMP       LK0
LK4:
        MOV       25H,#06H
        JMP       LK0
LK5:
        MOV       P2,#0BFH
        NOP
        NOP
        NOP
        NOP
        JNB       P2.2,LK6
        JNB       P2.4,LK7
        JMP       LK8
LK6:
        MOV       P2,#0BFH
        NOP
        NOP
        NOP
        NOP
        JB        P2.4,LK06
        MOV       25H,#08H
        JMP       LK0
LK06:
        MOV       P2,#7FH
        NOP
        NOP
        NOP
        NOP
        JB        P2.4,LK006
        MOV       25H,#09H
        JMP       LK0
LK006:
        MOV       25H,#02H
        JMP       LK0
LK7:
        MOV       P2,#0BFH
        NOP
        NOP
        NOP
        NOP
        JB        P2.2,LK07
        MOV       25H,#08H
        JMP       LK0
LK07:
        MOV       25H,#05H
        JMP       LK0
LK8:
        MOV       P2,#7FH
        NOP
        NOP
        NOP
        NOP
        JNB       P2.2,LK9
        JNB       P2.4,LK10
        JMP       LK0
LK9:
        MOV       25H,#01H
        JMP       LK0
LK10:
        MOV       P2,#0BFH
        NOP
        NOP
        NOP
        NOP
        JB        P2.2,LK11
        MOV       25H,#09H
        JMP       LK0
LK11:
        MOV       25H,#04H
LK0:
        MOV       P2,#0FFH
        RET

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

141

主题

791

帖子

0

粉丝