用户登录  |  用户注册
首 页商业源码原创产品编程论坛
当前位置:PB创新网文章中心解决方案电子通信

单时钟完成多点分别计时的实现和应用

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2009-01-10 23:52:36
MOV       A,51H
                        CJNE      A,#20,DE3                       
                        CLR       2CH.1                       
                        LCALL     OUT01
                        MOV       51H,#00H
                        LJMP      DE3  
 DEAL3:                JNB       2CH.2,DE4
                 INC       52H
                        MOV       A,52H
                        CJNE      A,#20,DE4
                        CLR       2CH.2
                        LCALL     OUT01
                        MOV       52H,#00H
                        LJMP      DE4
DEAL4:                JNB       2CH.3,DE5I
                INC       53H
                        MOV       A,53H
                        CJNE      A,#20,DE5I
                        CLR       2CH.3
                        LCALL     OUT01
                        MOV       53H,#00H
DE5I:                   LJMP      DE5
DEAL5:                 JNB       2CH.4,DE6I
                 INC       54H
                        MOV       A,54H
                        CJNE      A,#20,DE6I
                        CLR       2CH.4
                        MOV       54H,#00H
                        LCALL     OUT01
DE6I:                   LJMP      DE6
DEAL6:                  JNB       2CH.5,DE7I
                  INC       55H
                        MOV       A,55H
                        CJNE      A,#20,DE7I
                        CLR       2CH.5
                        LCALL     OUT01
                        MOV       55H,#00H
DE7I:                   LJMP      DE7
DEAL7:                  JNB       2CH.6,DE8I
                 INC       56H
                        MOV       A,56H
                        CJNE      A,#20,DE8I
                        CLR       2CH.6
                        LCALL     OUT01
                        MOV       56H,#00H
DE8I:                   LJMP      DE8
DEAL8:                 JNB       2CH.7,FINISH
                 INC       57H
                        MOV       A,57H
                        CJNE      A,#20,FINISH
                        CLR       2CH.7
                        LCALL     OUT01
                        MOV       57H,#00H

                           
FINISH:                 MOV       A,2CH
                        CJNE      A,#00H,TUI
                       
                     
                        SETB      TR0;SETB      TR0
                 POP       ACC
                 POP       PSW
                 RETI
 TUI:                SETB      TR0;开定时器   
                 POP       ACC
                 POP       PSW   
                        RETI
OUT01:              MOV      A,2CH
                        MOV      P2,A
                        CLR      G0
                        LCALL    DELAY
                        CLR      CLOCK
                        LCALL    DELAY
                        SETB     CLOCK
                        NOP
                       
                        CLR      CLOCK
                        SETB     G0
                        LCALL    DELAY
                        RET




上一页  [1] [2] 

Tags:

作者:佚名

文章评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
PB创新网ourmis.com】Copyright © 2000-2009 . All Rights Reserved .
页面执行时间:12,796.88000 毫秒
Email:ourmis@126.com QQ:2322888 蜀ICP备05006790号