基于pic16f877的led旋转时钟_单片机设计实验报告(编辑修改稿)内容摘要:

porta,0。 测开关 sw1 按下否。 是,跳过下条指令 goto setW_Hour。 否。 则循环检测 call delay btfsc porta,0。 再次测开关 sw1 按下否。 是,跳过下条指令 goto check。 否。 则循环检测 incf W_Hour,1。 时针加 1 movlw d39。 1239。 subwf W_Hour,0。 看是否等于 12 btfsc status,Z clrf W_Hour movf W_Hour,0 movwf portc check1 btfss porta,0。 测开关 sw1 断开否。 是,跳过下条指令 goto check1。 否。 则循环检测 call delay btfss porta,0。 再次测开关 sw1 断开否。 是,跳过下条指令 goto check1。 否。 则循环检测 goto setW_Hour。 返回 setW_Minute1btfss porta,1。 sw2 松开否 goto setW_Minute1 call delay btfss porta,1 goto setW_Minute1 setW_Minute btfss porta,1。 sw2 是否按下 goto setW_Second1 check2 btfsc porta,0。 测开关 sw1 按下否。 是,跳过下条指令 goto setW_Minute。 否。 则循环检测 call delay btfsc porta,0。 再次测开关 sw1 按下否。 是,跳过下条指令 goto check2。 否。 则循环检测 incf W_Minute,1。 分针加 1 movlw d39。 6039。 subwf W_Minute,0。 看是否等于 60 班 号 单片机设计实验报告 20 btfsc status,Z clrf W_Minute movf W_Minute,0 movwf portc check3 btfss porta,0。 测开关 sw1 断开否。 是,跳过下条指令 goto check3。 否。 则循环检测 call delay btfss porta,0。 再次测开关 sw1 断开否。 是 ,跳过下条指令 goto check3。 否。 则循环检测 goto setW_Minute。 返回 setW_Second1btfss porta,1 goto setW_Second1 call delay btfss porta,1 goto setW_Second1 setW_Second btfss porta,1。 sw2 是否按下 goto begin check4 btfsc porta,0。 测开关 sw1 按下否。 是,跳过下条指令 goto setW_Second。 否。 则循环检测 call delay btfsc porta,0。 再次测开关 sw1 按下否。 是,跳过下条指令 goto check4。 否。 则循环检测 incf W_Second,1。 秒针加 1 movlw d39。 6039。 subwf W_Second,0。 看是否等于 60 btfsc status,Z clrf W_Second movf W_Second,0 movwf portc check5 btfss porta,0。 测开关 sw1 断开否。 是,跳过下条指令 goto check5。 否。 则循环检测 call delay btfss porta,0。 再次测开关 sw1 断开否。 是,跳过下条指令 goto check5。 否。 则循环检测 goto setW_Second。 返 回 begin call tbcd。 显示时间 班 号 单片机设计实验报告 21。 call Set_DS1302 rsrn movlw d39。 2039。 movwf readn。 20 圈读一次时间 show movlw d39。 2039。 subwf readn,0 btfscstatus,Z call Get_DS1302 call bcdt decf readn,1 clrf counter。 指针位置计数器清零 judge call clearc。 清表盘 movlw d39。 11939。 subwf counter,0 btfscstatus,Z goto rsrn。 判断指针位置计数器是否达到 119。 ***************是否显示刻度 *************** movlw d39。 039。 subwf counter,0 btfscstatus,Z call draw2_0 movlw d39。 139。 subwf counter,0 btfscstatus,Z call draw2_1 movlw d39。 239。 subwf counter,0 btfscstatus,Z call draw2_2 movlw d39。 339。 subwf counter,0 btfscstatus,Z call draw2_3 movlw d39。 1039。 subwf counter,0 btfscstatus,Z call drawgra 班 号 单片机设计实验报告 22 movlw d39。 2039。 subwf counter,0 btfscstatus,Z call drawgra movlw d39。 2739。 subwf counter,0 btfscstatus,Z call draw3_0 movlw d39。 2839。 subwf counter,0 btfscstatus,Z call draw3_1 movlw d39。 2939。 subwf counter,0 btfscstatus,Z call draw3_2 movlw d39。 3039。 subwf counter,0 btfscstatus,Z call draw3_3 movlw d39。 3139。 subwf counter,0 btfscstatus,Z call draw3_4 movlw d39。 3239。 subwf counter,0 btfscstatus,Z call draw3_5 movlw d39。 3339。 subwf counter,0 btfscstatus,Z call draw3_6 movlw d39。 4039。 班 号 单片机设计实验报告 23 subwf counter,0 btfscstatus,Z call drawgra movlw d39。 5039。 subwf counter,0 btfscstatus,Z call drawgra movlw d39。 5839。 subwf counter,0 btfscstatus,Z call draw6_0 movlw d39。 5939。 subwf counter,0 btfscstatus,Z call draw6_1 movlw d39。 6039。 subwf counter,0 btfscstatus,Z call draw6_2 movlw d39。 6139。 subwf counter,0 btfscstatus,Z call draw6_3 movlw d39。 6239。 subwf counter,0 btfscstatus,Z call draw6_4 movlw d39。 7039。 subwf counter,0 btfscstatus,Z call drawgra movlw d39。 8039。 subwf counter,0 btfscstatus,Z 班 号 单片机设计实验报告 24 call drawgra movlw d39。 8739。 subwf counter,0 btfscstatus,Z call draw9_0 movlw d39。 8839。 subwf counter,0 btfscstatus,Z call draw9_1 movlw d39。 8939。 subwf counter,0 btfscstatus,Z call draw9_2 movlw d39。 9039。 subwf counter,0 btfscstatus,Z call draw9_3 movlw d39。 9139。 subwf counter,0 btfscstatus,Z call draw9_4 movlw d39。 9239。 subwf counter,0 btfscstatus,Z call draw9_5 movlw d39。 9339。 subwf counter,0 btfscstatus,Z call draw9_6 movlw d39。 10039。 subwf counter,0 btfscstatus,Z call drawgra 班 号 单片机设计实验报告 25 movlw d39。 11039。 subwf counter,0 btfscstatus,Z call drawgra movlw d39。 11639。 subwf counter,0 btfscstatus,Z call draw1_0 movlw d39。 117。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。