万年历单片机课程设计报告Word文档格式.docx
- 文档编号:19354572
- 上传时间:2023-01-05
- 格式:DOCX
- 页数:28
- 大小:1.44MB
万年历单片机课程设计报告Word文档格式.docx
《万年历单片机课程设计报告Word文档格式.docx》由会员分享,可在线阅读,更多相关《万年历单片机课程设计报告Word文档格式.docx(28页珍藏版)》请在冰豆网上搜索。
SETBTR0
MOVR4,#19
START1:
CALLDISP
JNBAA,SETMM1
JMPSTART1
SETMM1:
CALLSETMM
SETMM:
JBAA,SETMM0
SETMM2:
JNBAA,SETMM3
CLRET0
CLRTR0
MOVTIMES,#01H
MOVR0,#MINUTE
SETMM4:
NOP
INC22:
CALLOFFL
CALLINC11
JBAA,INC22
MOVA,TIMES
RLA
MOVTIMES,A
JNBTIMES.5,SETMM4
SETMM12:
JNBAA,SETMM11
SETMM0:
RET
SETMM11:
JMPSETMM12
SETMM3:
JMPSETMM2
INC11:
MOVR3,#40
INC111:
MOVA,@R0
JBBB,INC17
ADDA,#1
DAA
CALLINC000
INC13:
JNBBB,INC14
INC17:
MOV@R0,A
DJNZR3,INC111
INC14:
JMPINC13
OFFL:
MOV22H,@R0
MOVR6,#10
OFF1:
MOVR7,#10
OFF2:
MOV@R0,#0AAH
DJNZR7,OFF2
DJNZR6,OFF1
MOV@R0,22H
INC000:
JBTIMES.0,INC001
JBTIMES.1,INC002
JBTIMES.2,INC003
JBTIMES.3,INC004
JBTIMES.4,INC005
JMPINCOUT
INC005:
CJNEA,#99H,INCOUT
MOVA,#00H
INC004:
CJNEA,#13H,INCOUT
MOVA,#01H
INC003:
CJNEA,#32H,INCOUT
INC002:
CJNEA,#24H,INCOUT
INC001:
CJNEA,#60H,INCOUT
INCOUT:
INTT0:
PUSHACC
PUSHPSW
ORLTL0,#0C0H
DJNZR4,CLKE111
JMPLOOP11
CLKE111:
JMPCLKE
LOOP11:
MOVR4,#19H
MOVA,SEC
MOVSEC,A
CJNEA,#60H,CLKE99
MOVA,MINUTE
MOVMINUTE,A
CLK0:
CJNEA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B
MOVCONVERT_YEAR,B
MOVB,#10
MULAB
ADDA,CONVERT_YEAR
MOVCONVERT_YEAR,A
MOVA,TIME_MONTH
JNBACC.4,CON_02
CLRACC.4
ADDA,#10
CON_02:
MOVCONVERT_MONTH,A
MOVA,TIME_DATA
MOVCONVERT_DATE,B
ADDA,CONVERT_DATE
MOVCONVERT_DATE,A
MOVDPTR,#MONTH_DATA
MOVA,CONVERT_YEAR
CON_06:
SUBBA,#START_YEAR
MOVB,#3
ADDA,DPL
MOVDPL,A
MOVA,B
ADDCA,DPH
MOVDPH,A
MOVA,#2
MOVCA,@A+DPTR
CLRACC.7
MOVB,#32
MOVTEMP_BYTE1,A
MOVTEMP_BYTE2,B
MOVTEMP_BYTE3,#0
MOVA,CONVERT_MONTH
CJNEA,#10,CON_08
CON_08:
JCCON_09
MOVTEMP_BYTE3,#1
CON_09:
ANLA,#03H
JNZCON_10
LCALLGET_RUN_DAYS_LOW
SJMPCON_12
CON_10:
LCALLGET_DAYS_LOW
CON_12:
MOVB,CONVERT_DATE
DECB
ADDA,B
MOVTEMP_BYTE4,A
JNCCON_14
INCTEMP_BYTE3
CON_14:
MOVA,TEMP_BYTE1
DECA
ADDA,TEMP_BYTE2
MOVTEMP_BYTE5,A
CJNEA,TEMP_BYTE1,CON_20
MOVA,CONVERT_DATE
CJNEA,TEMP_BYTE2,CON_20
CON_20:
JCCON_22
LJMPCON_60
CON_22:
JNZCON_24
MOVA,#100
CON_24:
MOVA,DPL
SUBBA,#3
JNCCON_26
DECDPH
CON_26:
MOVA,TEMP_BYTE5
SUBBA,TEMP_BYTE4
MOVTEMP_BYTE3,A
MOVCONVERT_MONTH,#12
CLRF0
CLRA
ANLA,#0F0H
SWAPA;
JZCON_30
MOVCA,@A+DPTR
MOVC,ACC.7
MOVA,#1
RLCA
SJMPCON_34
CON_30:
CON_34:
MOVTEMP_BYTE5,A
CON_40:
MOVA,TEMP_BYTE5
RRCA
JCCON_42
MOVB,#29
SJMPCON_44
CON_42:
MOVB,#30
CON_44:
MOVA,TEMP_BYTE3
SUBBA,B
JZCON_46
JNCCON_50
CPLA
CON_46:
INCA
MOVB,#10
ORLA,B
MOVCONVERT_DATE,A
MOVA,CONVERT_MONTH
MOVCONVERT_MONTH,A
MOVA,CONVERT_YEAR
MOVCONVERT_YEAR,A
CALLWEEK
CON_50:
MOVTEMP_BYTE3,A
JBF0,CON_52
DECCONVERT_MONTH
CON_52:
CJNEA,TEMP_BYTE4,CON_54
CPLF0
CON_54:
SJMPCON_40
CON_60:
MOVA,TEMP_BYTE4
SUBBA,TEMP_BYTE5
MOVTEMP_BYTE4,A
JNCCON_62
DECTEMP_BYTE3
CON_62:
MOVCONVERT_MONTH,#1
ANLA,#0F0H
XCHA,TEMP_BYTE5
ANLA,#0FH
MOVTEMP_BYTE1,A
MOVTEMP_BYTE2,A
ORLA,TEMP_BYTE1
MOVA,TEMP_BYTE2
ANLA,#0FH
MOVACC.3,C
CON_70:
MOVA,TEMP_BYTE1
JCCON_72
SJMPCON_74
CON_72:
CON_74:
SUBBA,B
JNCCON_78
MOVB,A
JZCON_76
MOVTEMP_BYTE4,B
SJMPCON_80
CON_76:
LJMPCON_46
CON_78:
MOVTEMP_BYTE4,A
CON_80:
CJNEA,TEMP_BYTE5,CON_82
JNBF0,CON_82
SJMPCON_70
CON_82:
INCCONVERT_MONTH
GET_DAYS_LOW:
MOVCA,@A+PC
DB0,31,59,90,120,151,181,212,243,17,48,78
GET_RUN_DAYS_LOW:
DB0,31,60,91,121,152,182,213,244,18,49,79
MONTH_DATA:
DB04DH,04AH,0B8H;
2001
DB00DH,04AH,04CH;
2002
DB00DH,0A5H,041H;
2003
DB025H,0AAH,0B6H;
2004
DB005H,06AH,049H;
2005
DB07AH,0ADH,0BDH;
2006
DB002H,05DH,052H;
2007
DB009H,02DH,047H;
2008
DB05CH,095H,0BAH;
2009
DB00AH,095H,04EH;
2010
DB00BH,04AH,043H;
2011
DB04BH,055H,037H;
2012
DB00AH,0D5H,04AH;
2013
DB095H,05AH,0BFH;
2014
DB004H,0BAH,053H;
2015
DB00AH,05BH,048H;
2016
DB065H,02BH,0BCH;
2017
DB005H,02BH,050H;
2018
DB00AH,093H,045H;
2019
DB047H,04AH,0B9H;
2020
DB006H,0AAH,04CH;
2021
DB00AH,0D5H,041H;
2022
DB024H,0DAH,0B6H;
2023
DB004H,0B6H,04AH;
2024
DB069H,057H,03DH;
2025
DB00AH,04EH,051H;
2026
DB00DH,026H,046H;
2027
DB05EH,093H,03AH;
2028
DB00DH,053H,04DH;
2029
DB005H,0AAH,043H;
2030
DB036H,0B5H,037H;
2031
DB009H,06DH,04BH;
2032
DB0B4H,0AEH,0BFH;
2033
DB004H,0ADH,053H;
2034
DB00AH,04DH,048H;
2035
DB06DH,025H,0BCH;
2036
DB00DH,025H,04FH;
2037
DB00DH,052H,044H;
2038
DB05DH,0AAH,038H;
2039
DB00BH,05AH,04CH;
2040
DB005H,06DH,041H;
2041
DB024H,0ADH,0B6H;
2042
DB004H,09BH,04AH;
2043
DB07AH,04BH,0BEH;
2044
DB00AH,04BH,051H;
2045
DB00AH,0A5H,046H;
2046
DB05BH,052H,0BAH;
2047
DB006H,0D2H,04EH;
2048
DB00AH,0DAH,042H;
2049
DB035H,05BH,037H;
2050
DB009H,037H,04BH;
2051
DB084H,097H,0C1H;
2052
DB004H,097H,053H;
2053
DB006H,04BH,048H;
2054
DB066H,0A5H,03CH;
2055
DB00EH,0A5H,04FH;
2056
DB006H,0B2H,044H;
2057
DB04AH,0B6H,038H;
2058
DB00AH,0AEH,04CH;
2059
DB009H,02EH,042H;
2060
DB03CH,097H,035H;
2061
DB00CH,096H,049H;
2062
DB07DH,04AH,0BDH;
2063
DB00DH,04AH,051H;
2064
DB00DH,0A5H,045H;
2065
DB055H,0AAH,0BAH;
2066
DB005H,06AH,04EH;
2067
DB00AH,06DH,043H;
2068
DB045H,02EH,0B7H;
2069
DB005H,02DH,04BH;
2070
DB08AH,095H,0BFH;
2071
DB00AH,095H,053H;
2072
DB00BH,04AH,047H;
2073
DB06BH,055H,03BH;
2074
DB00AH,0D5H,04FH;
2075
DB005H,05AH,045H;
2076
DB04AH,05DH,038H;
2077
DB00AH,05BH,04CH;
2078
DB005H,02BH,042H;
2079
DB03AH,093H,0B6H;
2080
DB006H,093H,049H;
2081
DB077H,029H,0BDH;
2082
DB006H,0AAH,051H;
2083
DB00AH,0D5H,046H;
2084
DB054H,0DAH,0BAH;
2085
DB004H,0B6H,04EH;
2086
DB00AH,057H,043H;
2087
DB045H,027H,038H;
2088
DB00DH,026H,04AH;
2089
DB08EH,093H,03EH;
2090
DB00DH,052H,052H;
2091
DB00DH,0AAH,047H;
2092
DB066H,0B5H,03BH;
2093
DB005H,06DH,04FH;
2094
DB004H,0AEH,045H;
2095
DB04AH,04EH,0B9H;
2096
DB00AH,04DH,04CH;
2097
DB00DH,015H,041H;
2098
DB02DH,092H,0B5H;
DB00DH,053H,049H;
2100
TIME_WEEK1DATA52H
WEEK:
MOVA,TIME_YEAR
MOVB,#16
MOVTEMP_BYTE1,B
ADDA,TEMP_BYTE1
MOVA,TIME_MONTH
JBACC.7,GETW02
MOVA,#100
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 万年历 单片机 课程设计 报告
![提示](https://static.bdocx.com/images/bang_tan.gif)