資源描述:
《一款多用電子時鐘設(shè)計源程序》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。
1、一款多用電子時鐘設(shè)計源程序;本源程序系`一款多用電子鐘芯片'源程序,可有3開3關(guān)定時,且有受雙限觸發(fā)的定時口?;該程序硬件系采用PIC16C55芯片LP振蕩方式外接32768Hz晶振???????????????ORG?????000H??????TOP????????????XORLW???0FFH?????????????????????XORLW???0FFH?????????????????????XORLW???0FFH?????????????????????XORLW???0FFH?????????????????????MOVLW??
2、?08H????????;F12H--1DH依次為K1F--G3S???????????????MOVWF???4?????????QL?????????????CLRF????0????????????????????????INCF????4,1??????????????????????CLRWDT?????????????????MOVFW???4????????????????????????ANDLW???1FH??????????????????????SKPZ???????????????????GOTO????QL?????????
3、??????????????CLRF????4????????????????????????BTFSC???6,2??????????????????????BSF?????0BH,2??????;共陽???????????????GOTO????CSH???????HBCD???????????NOP?????DBCD???????????ANDLW???0FH??????????????????????CLRWDT?????????????????NOP????????????????????ADDWF???2,1???????????????
4、???????RETLW???01H????????;0(共陽)???????????????RETLW???4FH????????;1???????????????RETLW???12H????????;2???????????????RETLW???06H????????;3???????????????RETLW???4CH????????;4???????????????RETLW???24H????????;5???????????????RETLW???20H????????;6???????????????RETLW???0FH????
5、????;7???????????????RETLW???00H????????;8???????????????RETLW???04H????????;9???????????????RETLW???47H????????;A(校時)顯示J???????????????RETLW???71H????????;B(鬧鈴)顯示L???????????????RETLW???31H????????;C???????????????RETLW???63H????????;D(開)???????????????RETLW???6AH????????;E(關(guān))
6、???????????????RETLW???7EH????????;F(杠)CSH????????????CLRW????????????????;初始化???????????????TRIS????5??????????;F5,3--5,0共陽顯示掃描10時--分???????????????BTFSS???0BH,2????????????????????MOVLW???0FH??????????????????????MOVWF???5??????????;關(guān)掃描???????????????MOVLW???0FH??????????????
7、????????TRIS????6????????????????????????CLRF????6??????????;關(guān)閉定時輸出???????????????BSF?????6,4????????;輸出關(guān)脈沖???????????????MOVLW???11H????????;置顯示指針,F11H--時,F10H--分???????????????MOVWF???4????????????????????????MOVLW???05H????????;F1計數(shù)64分頻???????????????OPTION?????????????????M
8、OVLW???01H??????????????????????MOVWF???1?????????????