万年历阴历星期温度
2024年日历表(含农历 每月一张)
2024年10月
2024年,是公历闰年,共366天、53周。
农历甲辰年(龙年),无闰月,共354天,农历起止日期为2024年2月10日—2025年1月28日。
2024年假日安排
一、元旦:1月1日放假,与周末连休。
二、春节:2月10日至17日放假调休,共8天。
2月4日(星期日)、2月18日(星期日)上班。
鼓励各单位结合带薪年休假等制度落实,安排职工在除夕(2月9日)休息。
三、清明节:4月4日至6日放假调休,共3天。
4月7日(星期日)上班。
四、劳动节:5月1日至5日放假调休,共5天。
4月28日(星期日)、5月11日(星期六)上班。
五、端午节:6月10日放假,与周末连休。
六、中秋节:9月15日至17日放假调休,共3天。
9月14日(星期六)上班。
七、国庆节:10月1日至7日放假调休,共7天。
9月29日(星期日)、10月12日(星期六)上班。
万年历功能介绍及操作说明
基于51单片机的液晶万年历设计
1、本设计基于STC89C52(与AT89S5
2、AT89C52通用,可任选)单片机以及DS1302时钟芯片、DS18B20温度传感器构成的万年历系统。
2、有闹钟和阴历功能,有闰年补偿,可以准确及正确的显示时间等信息。
3、可以显示年、月、日、时、分、秒、星期、温度、农历和闹钟设定。
4、掉电走时,不用重新调时,当按键按下时背光亮,更节能。
使用方法:
一共4个按键:设置、加、减、切换
按下设置的时候秒会闪,这时可以加减调节,然后再按设置是设置分钟,依次设置,最后按一下设置就是推出并保存,主界面按切换的时候是显示阴历(ping是平年,run是闰年),再按下切换是显示闹钟界面,此时可以按设置调整闹钟。
电子万年历
电子万年历设计摘要随着现代生活节奏的不断加快,时间对于我们每个人来说也越来越重要,我们都需要有工具来度量时间。
电子万年历作为一种应用广泛的日常计时工具,由于它具有读取方便、显示直观、价格低廉等诸多优点,在当代社会中的应用也越来越广泛,大大方便了人们的生活和工作。
本设计是基于单片机技术原理,采用AT89S52单片机芯片作为主控制器,并采用时钟芯片DS1302来实现时钟,通过硬件电路的制作及软件程序的编制,利用单片机的控制作用通过共阳极数码管显示时间,实现显示阳历的年、月、日、星期、时、分、秒以及阴历的月、日的功能,还具有掉电继续计时的功能。
本设计主要由按键模块、显示模块、DS1302时钟模块、AT89S52主控制系统组成,其中按键电路采用3个按键构成独立连接式键盘,显示电路采用19个共阳极数码管构成,并利用74LS164译码器将二进制代码转化为对应的高低电平信号,并利用74LS138芯片来实现数码管的动态选择。
时钟模块采用DS1302芯片,它的使用寿命长、误差小,满足电子万年历需要精确计时的要求。
关键词:AT89S52,DS1302,数码管,译码器THE DESIGN OF ELECTRONIC CALENDARABSTRACTAs the pace of modern life continues to increase,time is becoming more and more important for us. We all need the tools to measure time. As a widely used timing tool, Electronic calendar has many advantages, such as easy to read, direct display and low cost. In modern society, it is becoming more and more extensive and makes our life and work easier.This design is based on principles of single-chip computer, using chip AT89S52 as the core controller and clock chip DS1302 as the clock. By combining the hardware circuits and software programs preparation, using common anode LED to display time under the control of single-chip computer. It can display the date of solar calendar and lunar calendar. It can continue to measure time after power lost.This design consists of four main parts, including key module, display module, DS1302 clock module and AT89S52 master control system. Buttons circuit uses three buttons to make up the independent keyboard. Display circuit consists of 19 common anodes LED. It uses 74LS164 to translate binary code into the corresponding high level signal and uses 74ls138 to choose the corresponding digital tube. The clock module uses clock chip DS1302, DS1302 meets the requirement of accurate timekeeping because of its long service life and small error.KEY WORDS:AT89S52,DS1302,Digital tube,Decoder目录前言 (1)第1章系统设计方案的选择 (3)§1.1电子万年历的设计意义 (3)§1.2 国内外同类设计的发展概况 (3)§1.3 设计要求 (4)§1.4 设计方案的选择与论证 (5)§1.4.1 单片机芯片的选择 (5)§1.4.2 时钟芯片的选择 (5)§1.4.3 显示模块的选择 (6)§1.4.4 键盘模块的选择 (6)§1.5 本设计的最终方案 (6)第2章系统的硬件设计与实现 (7)§2.1 电路设计总框图 (7)§2.2 系统的硬件概述 (7)§2.3 主要单元电路的设计 (8)§2.3.1 AT89S52主控制系统设计 (8)§2.3.2 键盘模块设计 (13)§2.3.3 时钟模块设计 (14)§2.3.4 显示模块的设计 (18)第3章系统的软件设计 (23)§3.1 主程序流程图 (23)§3.2 阳历程序设计 (24)§3.2.1 DS1302初始化 (24)§3.2.2 BCD码转化为十进制子程序 (27)§3.3 时间调整程序的设计 (27)§3.4 阴历程序的设计 (29)§3.4.1 计算阳历天数的程序设计 (29)§3.4.2 阳历转阴历程序 (32)结论 (33)参考文献 (34)致谢 (36)附录 (37)前言在当代繁忙的工作与生活中,时间与我们每个人都有非常密切的关系,每个人都受到时间的影响。
农历大小月卦口诀
农历大小月卦口诀闰月指的是阴历中的一种现象,阴历是按照月亮的圆缺即朔望月安排大月和小月,一个朔望月的长度是29.5306日,是月相盈亏的周期,阴历规定,大月30天,小月29天,这样一年12个月共354天,阴历的月份没有季节意义,这样一年就与阳历的一年相差11天,只需经过17年,阴阳历日期就同季节发生倒置,譬如,某年新年是在瑞雪纷飞中度过,17年后,便要摇扇过新年了。
使用这样的历法,自然是无法满足农业生产的需要的,所以我国的阴历自秦汉以来,一直和24节气并行,用24节气来指导农业生产。
二十四节气又可分为“节气”和“中气”二组:古人把从小寒起每隔黄经300为一节气;从冬至起每隔黄经300为一中气,一年有12个节气,12个中气。
12节气把一年分为12个节月,每个节月各有一个节气和一个中气。
节气是节月的起点;中气是节日的中点。
我国传统历法对于日序和月序以及大月、小月、平年和闰年,不象一般历法那样采用长期安排的方法,而是强调逐年逐月的推算,国家设有专门的机构从事历法的推算。
(一)以月相定日序。
它逐一推算日月合朔的日期和时刻,每月的初一就是合朔的日期;根据先后二次合朔包含的日数,确定前月的大小。
如果从这一合朔到下一次合朔的间隔是30天,那么当月便是大月;如果只隔29天,便为小月。
(二)以中气定月序。
首先,以历月中有无中气区分历月和闰月,我们知道一个回归年有12个中气,但却包含365.2422÷29.5306=2.3682个朔望月,经过几番历月轮转之后,必有一个历月没有中气。
《汉书·律历表》载:“朔不不得中,谓之闰月”。
这个没有中气的月份便是闰月。
它前一历日为几月即为闰几月。
例如,1984年的那次闰月出现在旧历十月之后,因而叫它“闰十月”。
闰月是推算出来的,在一年的月序中不固定,除农历十一月、十二月、正月外,闰几月都可能,十九年七闰。
综上所述,闰年是阳历中的一种现象,固定在二月,比平年加一天,29天;闰月是阴历中的一个现象,闰一个月,那一年阴历有13个月,那一年叫闰月年。
2024年全年阴历阳历日历表含农历A4纸一张打印
一二三四五六日
1 廿九 2345678 三十 初一 初二 初三 初四 白露 初六 9 10教 11 12 13 14 15 初七 师节 初九 初十 十一 十二 十三 16 17中 18 19 20 21 22 十四 秋节 十六 十七 十八 十九 秋分 23 24 25 26 27 28 29 廿一 廿二 廿三 廿四 廿五 廿六 廿七 30 廿八
2024年10月
一二三四五六日
1国 2 3 4 5 6 庆节 三十 初一 初二 初三 初四 7 8 9 10 11重 12 13 初五 寒露 初七 初八 阳节 初十 十一 14 15 16 17 18 19 20 十二 十三 十四 十五 十六 十七 十八 21 22 23 24 25 26 27 十九 二十 霜降 廿二 廿三 廿四 廿五 28 29 30 31 廿六 廿七 廿八 廿九
2024年9月
一二三四五六日
1建 2 3男 4 军节 廿八 人节 初一 5 6 7 8 9 10七 11 初二 初三 立秋 初五 初六 夕节 初八 12 13 14 15 16 17 18中 初九 初十 末伏 十二 十三 十四 元节 19 20 21 22 23 24出 25 十六 十七 十八 处暑 二十 伏 廿二 26 27 28 29 30 31 廿三 廿四 廿五 廿六 廿七 廿八
2024年5月
一二三四五六日
123
廿一 廿二 九九
4 5 6 7女 8妇 9 10
廿四 惊蛰 廿六 生节 女节 廿九 初一
11龙 12植 13 14 15 16 17
头节 树节 初四 初五 初六 初七 初八
18 初九 25
19 初十 26
20 春分 27
21 十二 28
单片机万年历带阴历
程序说明:1: 公农历自动转换,星期根据公历日期自动换算。
2: 没有采用时间IC(如DS1302 等),而是直接用单片机内的定时器。
3: 可显示简单的国家法定节假日,如到了农历8 月15,“单片机学徒”五个字会变成“中秋节”。
4: 在农历日期中采用初,廿等符合农历的用字。
5: 公历日期和时间可调,农历与星期是根据公历日期自动换算所得,所以不必调整。
6: 程序最终显示如下图所示。
实际在本人办公桌上使用中。
7: 在实际制作中如有疑问,欢迎大家交流.单片机学徒于2011 年3 月。
#include <reg52.h>#include <intrins.h>#define uchar unsigned char#define uint unsigned int#define port P0#define TT 49962uchar month,day,week,one,two,thr,fou,fiv,key_v,key_t,flagt;uchar year,yyear,ymonth,yday,key;char hour,min,sec;bit flagjr = 0;bit flagturn;bit flagnl = 0;sbit e = P2^3;sbit rw = P2^4;sbit rs = P2^5;sbit cs1 = P2^6;sbit cs2 = P2^7;sbit add = P3^3;sbit ok = P3^4;sbit set = P3^5;sbit dec = P3^6;sbit armn = P3^1;sbit armh = P3^7;void refweek();void key_t0(key_v);void displayday();void lcd_datey(uint x,uchar y,uchar z);uchar monthcode[]={0,31,0,31,30,31,30,31,31,30,31,30,31};uchar code day_code1[9]={0x0,0x1f,0x3b,0x5a,0x78,0x97,0xb5,0xd4,0xf3}; uint code day_code2[3]={0x111,0x130,0x14e};uchar code year_code[]={0x4d,0x4A,0xB8, //20010x0d,0x4A,0x4C, //20020x0d,0xA5,0x41, //20030x25,0xAA,0xB6, //20040x05,0x6A,0x49, //20050x7A,0xAd,0xBd, //20060x02,0x5d,0x52, //20070x09,0x2d,0x47, //20080x5C,0x95,0xBA, //20090x0A,0x95,0x4e, //20100x0B,0x4A,0x43, //20110x4B,0x55,0x37, //20120x0A,0xd5,0x4A, //20130x95,0x5A,0xBf, //20140x04,0xBA,0x53, //20150x0A,0x5B,0x48, //20160x65,0x2B,0xBC, //20170x05,0x2B,0x50, //20180x0A,0x93,0x45, //20190x47,0x4A,0xB9, //20200x06,0xAA,0x4C, //20210x24,0xdA,0xB6, //2023 0x04,0xB6,0x4A, //2024 0x69,0x57,0x3d, //2025 0x0A,0x4e,0x51, //2026 0x0d,0x26,0x46, //2027 0x5e,0x93,0x3A, //2028 0x0d,0x53,0x4d, //2029 0x05,0xAA,0x43, //2030 0x36,0xB5,0x37, //2031 0x09,0x6d,0x4B, //2032 0xB4,0xAe,0xBf, //2033 0x04,0xAd,0x53, //2034 0x0A,0x4d,0x48, //2035 0x6d,0x25,0xBC, //2036 0x0d,0x25,0x4f, //2037 0x0d,0x52,0x44, //2038 0x5d,0xAA,0x38, //2039 0x0B,0x5A,0x4C, //2040 0x05,0x6d,0x41, //2041 0x24,0xAd,0xB6, //2042 0x04,0x9B,0x4A, //2043 0x7A,0x4B,0xBe, //2044 0x0A,0x4B,0x51, //2045 0x0A,0xA5,0x46, //2046 0x5B,0x52,0xBA, //2047 0x06,0xd2,0x4e, //2048 0x0A,0xdA,0x42, //2049 0x35,0x5B,0x37, //2050 0x09,0x37,0x4B, //2051 0x84,0x97,0xC1, //2052 0x04,0x97,0x53, //2053 0x06,0x4B,0x48, //2054 0x66,0xA5,0x3C, //2055 0x0e,0xA5,0x4f, //2056 0x06,0xB2,0x44, //2057 0x4A,0xB6,0x38, //2058 0x0A,0xAe,0x4C, //2059 0x09,0x2e,0x42, //2060 0x3C,0x97,0x35, //2061 0x0C,0x96,0x49, //2062 0x7d,0x4A,0xBd, //2063 0x0d,0x4A,0x51, //2064 0x0d,0xA5,0x45, //20650x05,0x6A,0x4e, //20670x0A,0x6d,0x43, //20680x45,0x2e,0xB7, //20690x05,0x2d,0x4B, //20700x8A,0x95,0xBf, //20710x0A,0x95,0x53, //20720x0B,0x4A,0x47, //20730x6B,0x55,0x3B, //20740x0A,0xd5,0x4f, //20750x05,0x5A,0x45, //20760x4A,0x5d,0x38, //20770x0A,0x5B,0x4C, //20780x05,0x2B,0x42, //20790x3A,0x93,0xB6, //20800x06,0x93,0x49, //20810x77,0x29,0xBd, //20820x06,0xAA,0x51, //20830x0A,0xd5,0x46, //20840x54,0xdA,0xBA, //20850x04,0xB6,0x4e, //20860x0A,0x57,0x43, //20870x45,0x27,0x38, //20880x0d,0x26,0x4A, //20890x8e,0x93,0x3e, //20900x0d,0x52,0x52, //20910x0d,0xAA,0x47, //20920x66,0xB5,0x3B, //20930x05,0x6d,0x4f, //20940x04,0xAe,0x45, //20950x4A,0x4e,0xB9, //20960x0A,0x4d,0x4C, //20970x0d,0x15,0x41, //20980x2d,0x92,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,0xFF},};void Delay(uint a){uchar i;while(a--)for(i=0;i<125;i++);}void Lcd_Display_On(){port=0x3f;rs=0;rw=0;e=1;e=0;}void Lcd_Display_Off(){port=0x3e;rs=0;rw=0;e=1;e=0;}void Lcd_Set_X(uchar x){port=0xb8|x;rs=0;rw=0;e=1;e=0;}void Lcd_Set_Y(uchar y){port=0x40|y;rs=0;rw=0;e=1;e=0;}void Lcd_Set_X_Y(uchar x, uchar y){if( y<64 ){ cs1=1; cs2=0; Lcd_Set_Y( y ); }else{ cs1=0; cs2=1; Lcd_Set_Y( y-64 ); }Lcd_Set_X( x);}void Lcd_Write_Command(uchar temp){port=temp;rs=0;rw=0;e=1;e=0;}void Lcd_Write_Byte(uchar temp){port=temp;rs=1;rw=0;e=1;e=0;}void showword816( bit bit_flag, uchar x, uchar y, uchar code *point ) {uchar i , j,temp;temp=y;if( bit_flag ){for( i=0; i<2; i++ ){x+=i;y=temp;for( j=0;j<8;j++ ){Lcd_Set_X_Y( x, y ); y++;Lcd_Write_Byte( point[ i*8 + j] );}}}else{for( i = 0; i < 2; i++ ){x += i;y = temp;for( j = 0; j < 8; j++ ){Lcd_Set_X_Y( x, y ); y++;Lcd_Write_Byte( ~point[ i * 8 + j ] );}}}}void showword1616( bit bit_flag, uchar x, uchar y, uchar code *point ) {uchar i,j,temp ;temp=y;if( bit_flag ){for( i=0; i<2; i++ ){x+=i;y=temp;for( j=0;j<16;j++ ){Lcd_Set_X_Y( x, y ); y++;Lcd_Write_Byte( point[ i*16 + j] );}}else{for( i = 0; i<2; i++ ){x += i;y = temp;for( j = 0; j < 16; j++ ){Lcd_Set_X_Y( x, y ); y++;Lcd_Write_Byte( ~ point[ i * 16 + j ] );}}}}void Lcd_Clear(){uchar i,j;cs1=1;cs2=1;for(i=0;i<8;i++){Lcd_Set_X( i );Lcd_Set_Y( 0 );for(j=0;j<64;j++)Lcd_Write_Byte(0x00);}}void Lcd_init(){Lcd_Display_Off();Lcd_Write_Command(0xb8);Lcd_Write_Command(0x40);Lcd_Write_Command(0xc0);Lcd_Clear();Lcd_Display_On();}uchar leapyear(uint year){return(year%4==0&&year%100!=0)||(year%400==0); }void refweek(){uint i,d,w = 5;for (i=2000;i<2000+year;i++)d = leapyear(i)? 366:365;w = (w+d)%7;}d = 0;for (i=0;i<month;i++)d += monthcode[i];d += day;week = (w+d+6)%7;}bit get_moon_day(uchar month_p,uint table_addr) {uchar temp;switch (month_p){case 1:{temp=year_code[table_addr]&0x08;if (temp==0)return(0);else return(1);}case 2:{temp=year_code[table_addr]&0x04;if (temp==0)return(0);else return(1);}case 3:{temp=year_code[table_addr]&0x02;if (temp==0)return(0);else return(1);}case 4:{temp=year_code[table_addr]&0x01;if (temp==0)return(0);else return(1);}case 5:{temp=year_code[table_addr+1]&0x80;if (temp==0) return(0);else return(1);}case 6:{temp=year_code[table_addr+1]&0x40;if (temp==0)return(0);else return(1);}case 7:{temp=year_code[table_addr+1]&0x20;if (temp==0)return(0);else return(1);}case 8:{temp=year_code[table_addr+1]&0x10;if (temp==0)return(0);else return(1);}case 9:{temp=year_code[table_addr+1]&0x08;if (temp==0)return(0);else return(1);}case 10:{temp=year_code[table_addr+1]&0x04;if (temp==0)return(0);else return(1);}case 11:{temp=year_code[table_addr+1]&0x02;if (temp==0)return(0);else return(1);}case 12:{temp=year_code[table_addr+1]&0x01;if (temp==0)return(0);else return(1);}case 13:{temp=year_code[table_addr+2]&0x80;if (temp==0)return(0);else return(1);}}}void Conversion(uchar year,uchar month,uchar day)uchar temp1,temp2,temp3,month_p;uint temp4,table_addr;bit flag_y;table_addr=(year-1)*3;temp1=year_code[table_addr+2]&0x60;temp1=_cror_(temp1,5);temp2=year_code[table_addr+2]&0x1f;if(temp1==0x1){temp3=temp2-1;}else{temp3=temp2+0x1f-1;}if (month<10){temp4=day_code1[month-1]+day-1;}else{temp4=day_code2[month-10]+day-1;}if ((month>0x2)&&(year%0x4==0)){temp4+=1;}if (temp4>=temp3){temp4-=temp3;month=0x1;month_p=0x1;flag_y=0;if(get_moon_day(month_p,table_addr)==0)temp1=0x1d; else temp1=0x1e;temp2=year_code[table_addr]/16;while(temp4>=temp1){temp4-=temp1;month_p+=1;if(month==temp2){flag_y=~flag_y;if(flag_y==0)month+=1;}else month+=1;if(get_moon_day(month_p,table_addr)==0)temp1=0x1d; else temp1=0x1e;}day=temp4+1;}else{temp3-=temp4;year-=1;table_addr-=0x3;month=0xc;temp2=year_code[table_addr]/16;if (temp2==0)month_p=0xc;else month_p=0xd;flag_y=0;if(get_moon_day(month_p,table_addr)==0)temp1=0x1d; else temp1=0x1e;while(temp3>temp1){temp3-=temp1;month_p-=1;if(flag_y==0)month-=1;if(month==temp2)flag_y=~flag_y;if(get_moon_day(month_p,table_addr)==0)temp1=0x1d; else temp1=0x1e;}day=temp1-temp3+1;}yyear = year;ymonth = month;yday = day;flagnl = 1;}void mcuinit(){flagt = 0;flagjr = 1;flagnl = 0;year = 11;month = 3;day = 10;hour = 12;min = 0;sec = 0;TMOD = 0X01;TH0 = (65536-TT)/256;TL0 = (65536-TT)%256;EA = 1;ET0 = 1;EX0 = 1;IT0 = 1;TR0 = 1;}void displayday(){if ((ymonth==1 && yday==1)||(ymonth==5 && yday==5)||(ymonth==8 && yday==15)){if (ymonth==1 && yday==1){one = 29;two = 18;thr = 13;fou = 18;fiv = 19;}if (ymonth==5 && yday==5){one = 30;two = 18;thr = 17;fou = 18;fiv = 13;}if (ymonth==8 && yday==15){one = 6;two = 18;thr = 31;fou = 18;fiv = 13;}}else{((month==1&&day==1)||(month==5&&day==1)||(month==6&&day==1)||(month== 4&&day==1)||(month==3&&day==8)||(month==10&&day==1)){if (month==1&&day==1){one = 7;two = 18;thr = 8;fou = 18;fiv = 13;}if (month==3&&day==8){one = 22;two = 18;thr = 23;fou = 18;fiv = 13;}if (month==4&&day==1){one = 24;two = 18;thr = 21;fou = 18;fiv = 13;}if (month==5&&day==1){one = 9;two = 18;thr = 10;fou = 18;fiv = 13;}if (month==6&&day==1){one = 25;two = 18;thr = 26;fou = 18;fiv = 13;if (month==10&&day==1){one = 11;two = 18;thr = 12;fou = 18;fiv = 13;}}else{one = 32;two = 33;thr = 34;fou = 35;fiv = 36;}}flagjr = 0;}void display(){if (flagjr == 1){Conversion(year,month,day); displayday();}refweek();if (flagt == 1){showword816(0,0,32,shuzi[year/10]); showword816(0,0,40,shuzi[year%10]); }else{showword816(1,0,32,shuzi[year/10]); showword816(1,0,40,shuzi[year%10]); }if (flagt == 2){showword816(0,0,64,shuzi[month/10]); showword816(0,0,72,shuzi[month%10]); }else{showword816(1,0,64,shuzi[month/10]); showword816(1,0,72,shuzi[month%10]); }if (flagt == 3){showword816(0,0,96,shuzi[day/10]); showword816(0,0,104,shuzi[day%10]); }else{showword816(1,0,96,shuzi[day/10]); showword816(1,0,104,shuzi[day%10]); }showword816(1,4,32,gonli[yyear/10]); showword816(1,4,40,gonli[yyear%10]); if (ymonth == 1)showword1616(1,4,64,hanzi[27]);elseif (ymonth == 12)showword1616(1,4,64,hanzi[28]);else{showword816(1,4,64,gonli[ymonth/10]); showword816(1,4,72,gonli[ymonth%10]); }if (yday/10==0){showword1616(1,4,96,yinli[10]);}elseif (yday/10==1){if (yday%10==0)showword1616(1,4,96,yinli[10]);elseshowword1616(1,4,96,yinli[0]);}elseif (yday/10==2)showword1616(1,4,96,yinli[11]);elseif (yday/10 == 3)showword1616(1,4,112,yinli[yday%10]); if (flagt == 4){showword816(0,2,32,shisu[hour/10]); showword816(0,2,40,shisu[hour%10]); }else{showword816(1,2,32,shisu[hour/10]); showword816(1,2,40,shisu[hour%10]); }if (flagt == 5){showword816(0,2,64,shisu[min/10]); showword816(0,2,72,shisu[min%10]);}else{showword816(1,2,64,shisu[min/10]); showword816(1,2,72,shisu[min%10]);}if (flagt == 6){showword816(0,2,96,shisu[sec/10]); showword816(0,2,104,shisu[sec%10]); }else{showword816(1,2,96,shisu[sec/10]); showword816(1,2,104,shisu[sec%10]); }showword1616(1,6,16,xinqi[week]); showword1616(1,0,112,hanzi[2]); showword1616(1,4,0,hanzi[16]); showword816(1,4,16,gonli[2]); showword816(1,4,24,gonli[0]); showword1616(1,0,0,hanzi[15]); showword816(1,0,16,shuzi[2]); showword816(1,0,24,shuzi[0]); showword1616(1,0,48,hanzi[0]); showword1616(1,0,80,hanzi[1]); showword1616(1,4,48,hanzi[0]); showword1616(1,4,80,hanzi[1]);showword1616(1,2,16,hanzi[20]); showword1616(1,2,48,hanzi[3]); showword1616(1,2,80,hanzi[4]); showword1616(1,2,112,hanzi[5]); showword1616(1,6,0,hanzi[14]); showword1616(1,6,32,hanzi[18]); showword1616(1,6,48,hanzi[one]); showword1616(1,6,64,hanzi[two]); showword1616(1,6,80,hanzi[thr]); showword1616(1,6,96,hanzi[fou]); showword1616(1,6,112,hanzi[fiv]); }void int0_0() interrupt 0{if (set == 0){EX0 = 0;Delay(10);if (set == 0){while (!set);TR0 = 0;flagt++;if (flagt > 6)flagt = 1;}EX0 = 1;}if (flagt != 0){if (add == 0){EX0 = 0;Delay(10);if (add == 0){while (!add);if (flagt == 1){year++;if (year > 99)year = 1;flagjr = 1;Conversion(year,month,day);}if (flagt == 2){month++;if (month > 12)month = 1;flagjr = 1;Conversion(year,month,day);}if (flagt == 3){day++;if(month==1||month==3||month==5||month==7||month==8||month==10||month== 12){if (day > 31)day = 1;}if (month==4||month==6||month==9||month==11){if (day > 30)day = 1;}if (month==2){if (leapyear(year)){if (day > 29)day = 1;}else{if (day > 28)day = 1;}}flagjr = 1;Conversion(year,month,day);}if (flagt == 4){hour++;if (hour > 23)hour = 0;}if (flagt == 5){min++;if (min > 59)min = 0;}if(flagt == 6){sec++;if (sec > 59)sec = 0;}}EX0 = 1;}if (dec == 0){EX0 = 0;Delay(10);if (dec == 0){while (!dec);if (flagt == 1){year--;if (year < 1)year = 99;flagjr = 1;Conversion(year,month,day); }if (flagt == 2){month--;if (month < 1)month = 12;flagjr = 1;Conversion(year,month,day); }if (flagt == 3){day--;if(month==1||month==3||month==5||month==7||month==8||month==10||month== 12){if (day < 1)day = 31;}if (month==4||month==6||month==9||month==11){if (day < 1)day = 30;}if (month==2){if (leapyear(year)){if (day < 1)day = 29;}else{if (day < 1)day = 28;}}flagjr = 1;Conversion(year,month,day);}if (flagt == 4){hour--;if (hour < 0)hour = 23;}if (flagt == 5){min--;if (min < 0)min = 59;}if (flagt == 6){sec--;if (sec < 0)sec = 59;}}}EX0 = 1;}if (ok == 0){Delay(10);EX0 = 0;if (ok == 0){while (!ok);TR0 = 1;flagt = 0;flagjr = 1;Conversion(year,month,day); }EX0 = 1;}}void main(){Lcd_init();mcuinit();while (1){display();}}void timer0() interrupt 1 {static uchar i;TH0 = (65536-TT)/256;TL0 = (65536-TT)%256;i++;if(i>19){i = 0;sec++;if (sec>59){sec = 0;min++;。
万年历 电子档
SN:1972
最新个人所得税计算表
2011.9月1日执行
1495
将文字"12月"变成文字1212
再把文字12.转换成数字12.12
计算汉字"会计"几个字符2
计算"124元"几个字符4
从身份证号中提取生日
197203021972-3-2
计算日期和时间
显示当年时间 只要年月日2013年3月31日 2013/3/31
显示当年时间 只要星期星期日
显示当年时间 只要时间9时41分11秒
显示当年时间 要年大写一九二○年二○一三
通过TEXT转换成不同的时间格式.但是为文体格式.
1950-12-33
得到一个新的日期1950-8-2
对时间格式的年月日提取,分别用YEAE MOUTH DAY.
计算每月天数
计算2011年2月有多少天.先求月末日期2011-2-28
然后用DAY把日期提取.28
计算星期
计算任意一天是星期几.(星期日为7)
计算2011年5月1日星期几?2
计算2011年2月23日星期几?3
计算今天是星期几7
另一方法计算和显示今天星期几星期日
计算节日
计算每年(2012年)母亲节日期 每年5月2012-5-13
用该年5月1日 + 14天 - 5月1日的星期几。
同样可计算父亲节的日期2012-6-17星期四
两种方法显示当前时间:09:41
星期W11
106333.5
10268.7
37259
4.12827E+17
本年节气节日表
润年否否
月末日期2010-2-28本月天数28
上月天数31
月首星期数星期日。
电子万年历实训报告
2、引言
单片机,亦称单片微电脑或单片微型计算机。它是把中央处理器(CPU)、随机存取存储器(RAM)部件都集成在一块集成电路芯片上的微型计算机。单片机是把主要计算机功能部件都集成在一块芯片上的微型计算机。它是一种集计数和多中接口于一体的微控制器,被广泛应用在智能产品和工业自动化上,而52单片机是个单片机中最为典型和最有代表性的一种。
·P2口:P2口是一个带有内部上拉电阻的8位双向I/O口,P2的输入缓冲极可以驱动(输入或输出电流)4个TTL逻辑门电路。对端口“1”,通过内部的上拉电阻把端口拉到高电平,此时和作为输出口,作输出口时,因为存在内部上拉电阻,某个引脚被外部信号拉低时会输出一个电流。在访问外部存储器或1位地址的外部数据存储器(例如执行MOVX@DPTR指令)时,P2口送出高8位地址数据。在访问8位地址的外部数据存储器(如执行MOVX@RI指令)时,P2口线的内容(也既特殊功能寄存器(SFR)区中R2寄存器的内容),在整个访问期间不改变。Flash编程或校验时,P2亦接收高地址和其他控制信号。
3.2硬件的设计总框图
本次设计的基于单片机控制的电子万年历,其具有年、月、日、星期、时、分、秒的显示功能;具体时间与阴、阳历能够自动关联;可以设置闹铃的功能。其具体实现过程就是由主控制发送信息给DS1302时钟芯片再由时钟芯片反馈给LCD显示信息。并且可以在键盘设置模块输入修改时间,设置闹铃等信息,当键盘设置时间、日期时,单片机主控制根据输入信息,通过串口通信此传送给DS1302时钟芯片,DS1302芯片读取当前新信息产生反馈传送给单片机,然后单片机根据控制最后输送显示信息到LCD模块上显示
电子万年历设计
电子万年历设计摘要单片机在电子万年历的应用已是非常普遍了,本设计是一个基于AT89C58单片机的日历显示系统,本设计能显示公历年、月、日、星期,以及时、分、秒、温度、星期等信息,而且还提供了农历信息,具有调整时间,温湿度采集,闹钟及个性化的闹铃等功能。
系统所用的时钟日历芯片DS1302具有高性能、低功耗、接口简单的特点,使本系统电路简化,编程方便,同时功能也很强。
采用AT89C 58单片机的万年历系统可以很好的改善传统采用模拟电路引起的计时不准确,不可靠,一致性差等问题。
此系统计时精确,可以广泛应用在生活,学习和工作等任何领域,并且起到重要作用。
关键词温湿度传感器;DS1302 ;数码管显示;语音模块The design of electronic calendarABSTRACTThe monolithic integrated circuit in the electronic permanent calendar's applications already was very common ,and this design was based on AT89C58 monolithic integrated circuit's calendar display system, which could display information as previous calendar years, the month, the date ,the hour ,the minute ,the second ,the temperature ,the week and so on ,which also supplied information of the lunar calendar ,which functions contains adjusting the time ,the acquisition of temperature and humidity , alarm clock and personalized alarum and so on. The system uses clock calendar chip DS1302 has the advantages of the high performance, the low power dissipation, the simple connector, simplified this system circuit, and the programming is convenient, meanwhile the function is also very powerful . Adopt AT89C58 monolithic integrated circuit's permanent calendar system instead of traditional to use the analogous circuit which causes to be inaccurate time, unreliable, uniformity bad and so on questions. This system keeping time is precise, may widely applied in the life, the study ,the work and so on, and plays an important role.KEY WORDS Temperature and humidity sensors;DS1302 ;Digital display; V oice module目录摘要 (I)ABSTRACT (II)前言 (1)1. 系统概述 (2)1.1电子万年历的简介 (2)1.2电子万年历的设计要求 (2)1.3整体设计 (2)2. 电子万年历的硬件设计 (4)2.1主控模块设计(MCU) (4)2.2时钟芯片模块的设计 (4)2.3看门狗模块设计 (5)2.4温湿度模块设计 (6)2.5显示、按键模块设计 (7)2.6电源模块设计 (8)2.7语音模块设计 (10)3. 电子万年历软件设计 (14)3.1阴历转换算法 (14)3.2主程序设计 (14)3.3子程序设计 (15)4. 整体系统调试 (17)4.1硬件的调试 (17)4.2设计优缺点 (18)参考文献 (19)附录一原理图 (20)致谢 (22)前言现在是一个知识爆炸的新时代,新产品、新技术层出不穷,电子技术的发展更是日新月异。
多功能电子万年历讲解
兰州理工大学第六届大学生电子设计竞赛题目:多功能电子万年历学院:计算机与通信学院班级:xxxxxxxx12级1班姓名:xxxx、xxxxxx、xxxxxx学号:12xx0xxx、12xx01xx、12xx01xx兰州理工大学目录摘要 (2)1 系统方案 (3)1.1比较与选择 (3)1.1.1 界面显示和语音提示: (3)1.1.2 时间的实现 (3)1.1.3 处理器的选择 (3)1.2方案描述 (4)2 理论分析与计算 (4)2.1日程设定与日期计算 (4)2.1.1 日期计算 (4)3 电路与程序设计 (7)3.1硬件设计 (7)3.1.1 硬件系统分析 (7)3.1.2 硬件描述 (7)3.2软件系统设计 (12)3.2.1 软件流程图 (12)3.2.2 各模块功能主程序设计 (14)4 测试方案与测试结果 (17)4.1各模块调试方案 (17)4.1.1 STC89C52主芯片调试 (17)4.1.2 DS1302时钟芯片调试 (18)4.1.3 蜂鸣器调试 (19)4.1.4 AT24C08数据存储器调试 (20)4.1.5 12864LCD显示模块调试 (20)4.1.6 总体调试 (21)结论 (22)系统功能 (22)操作说明: (23)参赛总结 (23)参考文献 (24)附录 (25)附录一系统原理图 (25)附录二原程序代码 (26)多功能电子万年历摘要电子万年历是一种非常广泛日常计时工具。
它可以对年、月、日、周日、时、分、秒进行精确计时,同时可显示闰年农历温度信息,在日常生活中极为实用,DS1302是常用的时钟芯片,价格低廉,精度高且对于数字电子万年历采用直观的数字显示,还具有时间校准等功能。
该系统以STC89C52单片机作为系统控制处理器,采用具有涓细电流充电能的低功耗实时时钟电路DS1302。
它可以对年、月、日、周日、时、分、秒进行计时。
同时通过蜂鸣器进行半整点报时和闹钟提示,并采用AT24C08数据存储器实现掉电数据存储功能.系统各个界面通过LCD12864显示。
1800年到1900年万年历查询
2月:4日,星期三,阴历农历丙午年十二月初十。
3月:9日,星期五,阴历农历丙午年正月初六,复活节。
4月:13日,星期二,阴历农历丙午年正月十五。
5月:17日,星期六,阴历农历丙午年二月十九。
6月:22日,星期四,阴历农历丙午年三月初四,端午节。
7月:25日,星期日,阴历农历丙午年三月初七。
8月:30日,星期五,阴历农历丙午年四月初二。
9月:3日,星期二,阴历农历丙午年四月初五,中秋节。
10月:7日,星期六,阴历农历丙午年五月初一。
11月:12日,星期四,阴历农历丙午年五月初六,寒衣节。
12月:17日,星期二,阴历农历丙午年六月初一,小雪。
1801年:1月:21日,星期六,阴历农历庚辰年十一月初七,腊八节。
2月:26日,星期四,阴历农历庚辰年十二月十二。
3月:3日,星期四,阴历农历庚辰年正月初九,春节。
4月:7日,星期一,阴历农历庚辰年正月十三。
5月:12日,星期六,阴历农历庚辰年二月十八。
6月:17日,星期四,阴历农历庚辰年三月初三,端午节。
7月:21日,星期一,阴历农历庚辰年三月初七。
8月:26日,星期六,阴历农历庚辰年四月十二。
9月:。
自行车里程表的设计单片机毕业设计
石家庄铁道大学四方学院毕业设计自行车里程表的设计The Design of Bicycle Odometer毕业设计成绩单摘要近年来人们对健康的要求越来越高,自行车作为一种普遍大众的运动器械开始进入人们的视野。
而自行车里程表就是伴随着自行车运动的兴盛而逐渐发展起来的本系统由单片机STC89C52、霍尔传感器、LCD1602液晶显示屏和独立按键组成硬件部分,软件部分包括主程序模块、数据采集模块、显示模块、键盘扫描模块。
霍尔传感器完成数据采集功能并对单片机输入脉冲信号,通过单片机程序的设置可对霍尔传感器输入的脉冲信号进行计数和处理,精确地得到单位时间内检测到的脉冲数,计算自行车速度、加速度、里程,并通过LCD显示出来。
本文先对里程表设计当中所需设备作了详细介绍,对设计中存在的问题进行了说明;而后对硬件和软件部分的设计和实现作了认真的分析。
本里程表的设计具有结构简单,成本低廉,显示清晰,稳定可靠等优点。
关键词:STC89C52单片机LCD1602霍尔传感器AbstractWith the developing of people’s for health,bicycle is becoming a very popular sports equipment in our everyday.While the bicycle odometers are becoming more and more popular with bicycle’s prosperous.The system is composed of SCM ST8C9C52, hall sensors, LCD1602 LCD module and the keyboard control component. The software part includes the main modules, data acquisition module, display module and keyboard scanning module. Hall sensors complete the data acquisition function and single-chip input pulse signal, through the MCU set to hall sensor-based input pulse signal processing, count and that can accurately calculate added to the pins per unit time the number of pulses detected,while can get velocity, acceleration,milestones; Design mileage and speed by LCD module, mileage to display.This paper first needed to milestones design of equipment in detail, on the problems existing in the design, explained. And then to hardware and software design and implementation of the part made earnest analysis; and the simulation results are compared. This milestones design has simple structure, low cost, showed clear, stable and reliable.Key words :STC89C52SCM LCD1602Hall sensor目录第1章绪论 (1)1.1课题研究背景与现状 (1)1.2本课题所做的工作 (1)第2章系统总体设计方案 (1)2.1系统实现的功能 (2)2.2设计思路 (2)2.3总体设计框图 ······································································错误!未定义书签。
基于ATC89C54的多功能电子万年历设计
(. 1长安大学 电控学院 ,西安 7 0 6 ;2奈曼旗东明学 区中心校 ,通辽 0 8 2 ) 10 4 . 2 3 2
摘
要 : 多功能电子万年历的设计是以 A 0 9 5 单片机为核心 ,结合 D 10 时钟芯 片和 D 18 0 T 8C 4 S 2 3 S 2 温 8 度传感器构成 单片机控制 电路 ,实现时间、星期 、公历和农历的日期、温度 、二十四节气、生 肖、公历节日、闹铃等功能 , 部信 息可通过 184 全 6 点阵式液晶直观显示。整机 电路使用 + V 2 5 稳压电源 , 有掉电保护功能,可长时间稳定工作 。 关键词 : 单片机 ;时间 ;L D;多功能 C 中图分类号 :T 2 3 P 7 文献标 识码 :A 文章编 号 :1 0 - 14 2 1) 9 上 ) 0 8 - 3 9 0 ( 0 2 0 ( - 0 2 0 0 3
收稿 日期:2 1— 1 2 0 2 0 —1 l 者简介:高云霞 (9 5 l E 17 一),女 ,陕西人 ,讲 师 ,主要从事微机应用技术的教学与研究工作。
[ 2 第 3 卷 81 4 第9 期 21— ( ) 0 2 9上
l
点 阵 )及 6X26点 阵 显 示 R 4 5 AM ( R GD AM) 可 。
Do :1 . 9 9 . s . 0 -0 4. 0 . (1) 2 i 3 6 /ii n 1 9 1 2 1 9 - . 7 0 s 0 3 2
1 系统设计方案
本设 计 以 A C 9 5 T 8 C 4单 片 机 为 核 心 ,构 成 单
片机 控制 电路 ,结合 DS 3 2时钟 芯 片和 DS 8 2 10 1B 0 温 度传 感器 ,显示 阳历 的年 、 月、 日、星 期 、时 、 分 、秒 、二 十 四 节 气 和 阴 历 的 年 、 月 、 日,还 有
2024年日历表-彩色A4版带周阴历直接打印
周数一二三四五六日周数一二三四五六日周数一二三四五六日周数一二三四五六日12345671234121234567元旦廿一廿二廿三廿四小寒廿六廿二北小年南小年立春廿二廿三愚人节廿四廿五清明廿七廿八廿九89101112131456789101145678910891011121314廿七廿八廿九十二月初二初三初四廿六廿七廿八廿九除夕春节初二廿四惊蛰廿六廿七妇女节廿九二月三十三月初二初三初四初五初六15161718192021121314151617181112131415161715161718192021初五初六初七腊八节初九大寒十一初三初四情人节初六初七初八初九初二初三初四初五初六初七初八初七初八初九初十谷雨十二十三22232425262728192021222324251819202122232422232425262728十二十三十四十五十六十七十八雨水十一十二十三十四元宵节十六初九初十春分十二十三十四十五十四十五十六十七十八十九二十293031123426272829301225262728293031293012345十九二十廿一廿二北小年南小年立春十七十八十九二十廿一廿二廿三十六十七十八十九二十廿一廿二廿一廿二劳动节廿四廿五青年节立夏周数一二三四五六日周数一二三四五六日周数一二三四五六日周数一二三四五六日123451212345671234劳动节廿四廿五青年节立夏儿童节廿六建党节廿七廿八廿九三十小暑初二建军节廿八廿九七月67891011123456789891011121314567891011廿八廿九四月初二初三初四初五廿七廿八芒种五月初二初三初四初三初四初五初六初七初八初九初二初三立秋初五初六七夕节初八13141516171819101112131415161516171819202112131415161718初六初七初八初九初十十一十二端午节初六初七初八初九初十十一初十十一十二十三十四十五十六初九初十十一十二十三十四十五20212223242526171819302122232223242526272819202122232425小满十四十五十六十七十八十九十二十三十四十五夏至十七十八大暑十八十九二十廿一廿二廿三十六十七十八处暑二十廿一廿二2728293031122425262728293029303112342627282930311二十廿一廿二廿三廿四儿童节廿六十九二十廿一廿二廿三廿四廿五廿四廿五廿六建军节廿八廿九七月廿三廿四廿五廿六廿七廿八廿九周数一二三四五六日周数一二三四五六日周数一二三四五六日周数一二三四五六日11234561231廿九国庆节三十九月初二初三初四万圣节初二初三十一月234567878910111213456789102345678三十八月初二初三初四白露初六初五寒露初七初八重阳节初十十一初四初五初六立冬初八初九初十初二初三初四初五大雪初七初八910111213141514151617181920111213141516179101112131415初七教师节初九初十十一十二十三十二十三十四十五十六十七十八十一十二十三十四十五十六十七初九初十十一十二十三十四十五16171819202122212223242526271819202122232416171819202122十四中秋节十六十七十八十九秋分十九二十霜降廿二廿三廿四廿五十八十九二十廿一小雪廿三廿四十六十七十八十九二十冬至廿二2324252627282928293031123252627282930123242526272829廿一廿二廿三廿四廿五廿六廿七廿六廿七廿八廿九万圣节初二初三廿五廿六廿七感恩节廿九三十十一月廿三平安夜圣诞节廿六廿七廿八廿九30123456303112345廿八国庆节三十九月初二初三初四三十初一初二初三初四初五初六3月2024年日历(甲辰年龙)5926101月2月13April4月3711481218月2416177月14222715233337182631AugustSeptember28593438353929JanuaryFebruaryMarch9月32364041OctoberNovemberDecember10月11月223612月404549414650424751434852444953546月JulyJune3025May5月18192021。
中华万年历初级测评-------功能体验 _vcontrol
中华万年历初级测评-------功能体验作者:vcontrol貌似很久没有发帖了,借这次中华万年历征集测评,再来活跃一下。
请各位魅友多多支持,小的感激不尽。
百度介绍:中华万年历,历经三年多的发展,到今天已成为一款在各大平台上广泛使用的应用软件。
目前已开发的版本有Android、iOS、Windows Phone,Android pad、Web(网页)。
开发者为国内知名创业团队随身云(南京)信息技术有限公司。
客观的介绍就不给大家多说了,既然是评测,那下面就以个人观点来解说一下中华万年历。
说起中华万年历,个人的使用的不多也不少,但这款软件绝对是一款值得推荐的软件。
下面我将从安装完软件第一次打开软件说起。
1、安装完成中华万年历之后,我们来打开看一下。
打开软件映入眼帘的是万年历的皮肤设置,佳人红、青草绿、潜水蓝,多美优雅的主题名称,还有如此清新的界面,点击界面切换主题选择,这里的界面切换,非常流畅,也就是交互让人非常舒服,说实话,这样的界面我都不忍心点开下一个界面。
点评:界面清新,交互流畅。
2、下面向左边滑动屏幕,进入全屏日历或者半屏日历设置,这个跟上面主题皮肤设置接壤,都有一个预览图,让用户即时能看到设置后的效果,这个用户可以根据自己的使用习惯、自己的喜好来进行设置。
从这里可以看出,中华万年历是非常的开放灵活,非常的贴心。
点评:贴心设置。
选择好设置哪个之后,下面有两图标,一个是立即使用,一个是开启云服务。
很简单,这个我们大众都能理解,一个是不登录直接打开日历,一个则是登录账号,可以云同步信息。
这个可以用户自己选择,当然建议大家还是开启云服务,开启云服务之后,个人的使用记录都可以同步到云端,以后只要有这个账号,换设备登录也可以立马同步。
3、我们点击上面的开启云服务按钮,就跳转到下面这个登录随身云界面,大家可以看到这个界面,非常的标准,并且有多种方式登录,微信、QQ 、微博、人人、甚至百度账号都可以登录,这样,就为用户的登录账号问题很好的解决了,大家方便了不少。
2024年全年日历表含农历(1月-12月可打印)
2024年10月
2024年节假日安排
2024年元旦、春节、清明节、劳动节、端午节、中秋节和国庆节放假调休日期的具体安排如下:
元旦:1月1日放假,与周末连休。
春节:2月10日至17日放假调休,共8天。
2月4日(星期日)、2月18日(星期日)上班。
鼓励各单位结合带薪年休假等制度落实,安排职工在除夕(2月9日)休息。
清明节:4月4日至6日放假调休,共3天。
4月7日(星期日)上班。
劳动节:5月1日至5日放假调休,共5天。
4月28日(星期日)、5月11日(星期六)上班。
端午节:6月10日放假,与周末连休。
中秋节:9月15日至17日放假调休,共3天。
9月14日(星期六)上班。
国庆节:10月1日至7日放假调休,共7天。
9月29日(星期日)、10月12日(星期六)上班。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
#include <reg52.h>#include <string.h>#include<intrins.h>#define uchar unsigned char#define uint unsigned intsbit CLK=P1^1; //DS1302时钟线sbit SDA=P1^0; // DS1302数据线sbit RST=P1^2; //DS1302复位线sbit RS=P2^0;//数据/指令选择端口sbit RW=P2^1;//读写端口sbit EN=P2^2;//使能端口sbit K1=P3^4; // 选择sbit K2=P3^5; // 加sbit K3=P3^6; // 减sbit K4=P3^7; // 确定uchar tCount=0;//一年中每个月的天数,2月的天数由年份决定uchar MonthsDays[]={0,31,0,31,30,31,30,31,31,30,31,30,31};uchar *WEEK[]={"sun","mon","tus","wen","thu","fri","sat"};//周日,周一到周六uchar LCD_DSY_BUFFER1[]={"Date 00-00-00 "}; //LCD显示缓冲uchar LCD_DSY_BUFFER2[]={"Time 00-00-00 "};uchar DateTime[7]; //所读取的日期时间char Adjust_Index=-1; //当前调节的时间:秒,分,时,日,uchar Change_Flag[]="-MHDM-Y";uchar Read_LCD_State();//读LCD状态void LCD_Busy_Wait();//判忙void Write_LCD_Data(uchar dat);//写数据void Write_LCD_Command(uchar cmd);//写命令void Init_LCD();//LCD初始化void Set_LCD_POS(uchar p);//设置显示位置void Display_LCD_String(uchar p,uchar *s);//写字符串void DelayMS(uint x)//延时{uchar i;while(x--) for(i=0;i<120;i++);}uchar Read_LCD_State()//读LCD状态{uchar state;RS=0;RW=1;EN=1;DelayMS(1);state=P0;EN=0;DelayMS(1);return state;}void LCD_Busy_Wait()//判忙{while((Read_LCD_State()&0x08)==0x80);DelayMS(5);}void Write_LCD_Data(uchar dat) //写数据{LCD_Busy_Wait();RS=1;RW=0;EN=0;P0=dat;EN=1;DelayMS(1);EN=0;}void Write_LCD_Command(uchar cmd)//写命令{LCD_Busy_Wait();RS=0;RW=0;EN=0;P0=cmd;EN=1;DelayMS(1);EN=0;}void Init_LCD() //LCD初始化{Write_LCD_Command(0x38); DelayMS(1);Write_LCD_Command(0x01); DelayMS(1);Write_LCD_Command(0x06); DelayMS(1);Write_LCD_Command(0x0C); DelayMS(1);Display_LCD_String(0x00,"zhongzhoudaxue "); // DelayMS(1000);Display_LCD_String(0x40," dian zi ri li ");DelayMS(2000);}void Set_LCD_POS(uchar p){Write_LCD_Command(p|0x80);}void Display_LCD_String(uchar p,uchar *s) {uchar i;Set_LCD_POS(p);for(i=0;i<16;i++){Write_LCD_Data(s[i]);DelayMS(1);}}/*--------------------------向DS1302写入一字节---------------------------*/void DS1302_Write_Byte(uchar x){uchar i;for(i=0;i<8;i++){SDA=x&1;CLK=1;CLK=0;x>>=1;}}/*-------------------------------从DS1302读取一字节--------------------------------*/uchar DS1302_Read_Byte(){uchar i,b,t;for(i=0;i<8;i++){b>>=1;t=SDA;b|=t<<7;CLK=1;CLK=0;}return b/16*10+b%16;}/*-------------------------------从DS1302指定位置数据--------------------------------*/uchar Read_Data(uchar addr){uchar dat;RST=0;CLK=0;RST=1;DS1302_Write_Byte(addr);dat=DS1302_Read_Byte();CLK=1;RST=0;return dat;}/*-------------------------------向DS1302某地址写入数据--------------------------------*/void Write_DS1302(uchar addr,uchar dat){CLK=0;RST=1;DS1302_Write_Byte(addr);DS1302_Write_Byte(dat);CLK=0;RST=0;}/*------------------------------------设置时间------------------------------------*/void SET_DS1302(){uchar i;Write_DS1302(0x8e,0x00);for(i=0;i<7;i++){Write_DS1302(0x80+2*i,(DateTime[i]/10<<4|(DateTime[i]%10)));}Write_DS1302(0x8e,0x80);}/*------------------------------------读取当前时期时间------------------------------------*/void GetTime(){uchar i;for(i=0;i<7;i++){DateTime[i]=Read_Data(0x81+2*i);}}/*------------------------------------时间和日期转换成数字字符------------------------------------*/void Format_DateTime(uchar d,uchar *a){a[0]=d/10+'0';a[1]=d%10+'0';}/*------------------------------------判断是否为闰年------------------------------------*/uchar isLeapYear(uint y){return (y%4==0&&y%100!=0)||(y%400==0);}/*------------------------------------星期转换------------------------------------*/void RefreshWeekDay(){uint i,d,w=5;for(i=2000;i<2000+DateTime[6];i++){d=isLeapYear(i) ? 366 : 365;w=(w+d)%7;}d=0;for(i=1;i<DateTime[4];i++) d+=MonthsDays[i];d+=DateTime[3];DateTime[5]=(w+d)%7+1;}/*------------------------------------年月日时分秒++/--------------------------------------*/void DateTime_Adjust(char x){switch (Adjust_Index){case 6: //年if(x== 1&&DateTime[6]<99) DateTime[6]++;if(x==-1&&DateTime[6]>0) DateTime[6]--;MonthsDays[2]=isLeapYear(2000+DateTime[6])? 29:28;if(DateTime[3]>MonthsDays[DateTime[4]])DateTime[3]=MonthsDays[DateTime[4]];RefreshWeekDay();break;case 4: //月if(x== 1&&DateTime[4]<12) DateTime[4]++;if(x==-1&&DateTime[4]>1) DateTime[4]--;MonthsDays[2]=isLeapYear(2000+DateTime[6])? 29:28;if(DateTime[3]>MonthsDays[DateTime[4]])DateTime[3]=MonthsDays[DateTime[4]];RefreshWeekDay();break;case 3: //日MonthsDays[2]=isLeapYear(2000+DateTime[6])? 29:28;if(x== 1&&DateTime[3]<MonthsDays[DateTime[4]]) DateTime[3]++;if(x==-1&&DateTime[3]>0) DateTime[3]--;RefreshWeekDay();break;case 2: //时if(x== 1&&DateTime[2]<23) DateTime[2]++;if(x==-1&&DateTime[2]>0) DateTime[2]--;break;case 1: //秒if(x== 1&&DateTime[1]<59) DateTime[1]++;if(x==-1&&DateTime[1]>0) DateTime[1]--;break;}}/*------------------------------------定时器每秒刷新LCD显示------------------------------------*/void T0_INT() interrupt 1{TH0=-50000/256;TL0=-50000%256;if(++tCount!=2) return;tCount=0;Format_DateTime(DateTime[6],LCD_DSY_BUFFER1+5);Format_DateTime(DateTime[4],LCD_DSY_BUFFER1+8);Format_DateTime(DateTime[3],LCD_DSY_BUFFER1+11);strcpy(LCD_DSY_BUFFER1+13,WEEK[DateTime[5]-1]);Format_DateTime(DateTime[2],LCD_DSY_BUFFER2+5);Format_DateTime(DateTime[1],LCD_DSY_BUFFER2+8);Format_DateTime(DateTime[0],LCD_DSY_BUFFER2+11);Display_LCD_String(0x00,LCD_DSY_BUFFER1);Display_LCD_String(0x40,LCD_DSY_BUFFER2);}/*------------------------------------键盘中断------------------------------------*/void EX_INT0() interrupt 0{if(K1==0) //选择调整对象:年,月,日,时,分,秒{while(K1==0);if(Adjust_Index==-1||Adjust_Index==1) Adjust_Index=7;Adjust_Index--;if(Adjust_Index==5) Adjust_Index=4;LCD_DSY_BUFFER2[13]='[';LCD_DSY_BUFFER2[14]=Change_Flag[Adjust_Index];LCD_DSY_BUFFER2[15]=']';}elseif(K2==0) // 加{while (K2==0); DateTime_Adjust(1);}elseif(K3==0) // 减{while (K3==0); DateTime_Adjust(-1);}elseif(K4==0) // 确定{while(K4==0);SET_DS1302(); //调整后的时间写入DS1302LCD_DSY_BUFFER2[13]=' ';LCD_DSY_BUFFER2[14]=' ';LCD_DSY_BUFFER2[15]=' ';Adjust_Index=-1;}}/*------------------------------------主程序------------------------------------*/void main(){Init_LCD(); //CLD初始化IE=0x83; // 允许INT0,T0中断IP=0x01;IT0=0x01;TMOD=0x01;TH0=-50000/256;TL0=-50000%256;TR0=1;while(1){if(Adjust_Index==-1) GetTime();}}。