




已阅读5页,还剩26页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
学习资料收集于网络,仅供参考*#include#include#define LCD_Data P0#define uchar unsigned charunsigned charsec,min,hour,day,month,year,cen,week,next,aa,bb,cc,dd,mm,temp0,LunarMonth,LunarDay,LunarYear;int temp;uchar tt=1;bit c_moon;bit cenbit=1;bit w;sbit LCD_RS=P20;sbit LCD_RW=P21;sbit LCD_E=P22;sbit PSB=P23;sbit DS1302_CLK=P37;sbit DS1302_IO=P36;sbit DS1302_RST=P35;sbit DS18B20=P25;sbit speak=P27;sbit SetKey=P14; / 按键功能:设置sbit SureKey=P15; / 按键功能:确认sbit PlusKey=P16; / 按键功能:加sbit ReduceKey=P17; / 按键功能:减sbit scl=P11;sbit sda=P10;void DisplayShengXiao(void);void delay(unsigned int a)/ 延时 1MS/ 次unsigned char i;while(-a)for(i=0;i125;i+) ;void delayb(unsigned int count)while(count-);void delays() ; ;void start()sda=1;scl=1;delays();sda=0;delays();void stop()sda=0;scl=1;delays();sda=1;delays();void response()uchar i;while(sda=1)&i255)i+; /给应答信号 sda=0 ; 错误 ( while ( ( sda=0 )|i255 ) i+ ; )程序进入 while 死循环scl=1;delays();scl=0; / 没有这一步出错 , 如果没有 sda 将保持 0 状态,一直处于应答中 。程序停止。delays();void write24c02(uchar date)uchar temp,i;temp=date;for(i=0;i8;i+)scl=0;sda=temp&0x80;delays();scl=1;delays();temp=temp1;scl=0;delays();sda=1;delays();uchar read24c02()uchar k,i;scl=0;delays();sda=1;/ 仅仅是释放数据线,可有可无for(i=0;i8;i+)scl=1;delays();k=k1;if(sda)k+;scl=0;delays();return k;void write_24c02add(ucharaddress,uchar date)start();write24c02(0xa0);response();write24c02(address);response();write24c02(date);response();stop();uchar read_24c02add(uchar address)uchar a;start();write24c02(0xa0);response();write24c02(address);response();start();write24c02(0xa1);response();a=read24c02();stop();return a;unsigned char DS18B20Init() unsigned char x;DS18B20=1;delayb(2);DS18B20=0;delayb(80);DS18B20=1;delayb(5);x=DS18B20;delayb(20);return x;unsigned char TempRead(void)unsigned char i,dat;DS18B20=1;delayb(1);for(i=0;i1;DS18B20=1;if(DS18B20)dat=dat|0x80;delayb(4);return dat;void TempWriteByte(unsigned chardat)unsigned int i;DS18B20=1;delayb(2);for(i=0;i1;delayb(2);int GetTemp()float tt;unsigned char a,b;DS18B20Init();TempWriteByte(0xcc);TempWriteByte(0x44);delayb(100);DS18B20Init();TempWriteByte(0xcc);TempWriteByte(0xbe);delayb(200);a=TempRead();b=TempRead();temp=b;temp0;i-)DS1302_IO=temp&0x01;DS1302_CLK=0;DS1302_CLK=1;temp=1;void WriteDs1302( unsigned charaddress,unsigned char dat )DS1302_RST=0;DS1302_CLK=0;DS1302_RST=1;delay(1);WriteDs1302Byte(address);WriteDs1302Byte(dat);DS1302_RST=0;unsigned char read_byte() unsigned char i;for(i=8;i0;i-)if(DS1302_IO)temp0=temp0|0x80;DS1302_CLK=1;DS1302_CLK=0;temp0=temp01;return temp0;unsigned char ReadDs1302(unsignedchar address)unsigned char temp;DS1302_RST=0;DS1302_CLK=0;DS1302_RST=1;WriteDs1302Byte(address);temp=read_byte();DS1302_RST=0;DS1302_CLK=1;return temp;void InitDS1302()/ unsigned charSecond=ReadDs1302(0x80);/ if(Second&0x80)WriteDs1302(0x8e,0x00);delay(5);WriteDs1302(0x8c,0x10);/ 写入年份 10 年delay(5);WriteDs1302(0x8a,0x06);/ 写入星期 6delay(5);WriteDs1302(0x88,0x11);/ 定入月分 11 月delay(5);WriteDs1302(0x86,0x6);/ 写入日期 6 日delay(5);WriteDs1302(0x84,0x17);/ 写入小时 17 点delay(5);WriteDs1302(0x82,0x43);delay(5);WriteDs1302(0x80,0x00);/ 写入秒 30 秒delay(5);WriteDs1302(0x8e,0x80);/ 控制命令, WP 为 1, 禁止写操作/* 阳历对应的阴历数据,每年三字节 ,格式第一字 节 BIT7- 4 位表示闰月月份 ,为 0, 则无闰月, BIT3-0 对应阴历第 1-4 月的大小,第二字 节 BIT7- 0 对应阴历 第 5-1 2 月大小,第三字节 BIT7 表示阴历第 13 月大小月分对应的位为 1, 表示农历月大( 3 0天)为 0 表示小( 29 天)第三字 节 BIT6- 5 表示春节的公历月份 ,BIT4-0 表示春节公历日期*/code unsigned char YearCode597=0x04,0xAe,0x53, /1901 00x0A,0x57,0x48, /1902 30x55,0x26,0xBd, /1903 60x0d,0x26,0x50, /1904 90x0d,0x95,0x44, /1905 120x46,0xAA,0xB9, /1906 150x05,0x6A,0x4d, /1907 180x09,0xAd,0x42, /1908 210x24,0xAe,0xB6, /19090x04,0xAe,0x4A, /19100x6A,0x4d,0xBe, /19110x0A,0x4d,0x52, /19120x0d,0x25,0x46, /19130x5d,0x52,0xBA, /19140x0B,0x54,0x4e, /19150x0d,0x6A,0x43, /19160x29,0x6d,0x37, /19170x09,0x5B,0x4B, /19180x74,0x9B,0xC1, /19190x04,0x97,0x54, /19200x0A,0x4B,0x48, /19210x5B,0x25,0xBC, /19220x06,0xA5,0x50, /19230x06,0xd4,0x45, /19240x4A,0xdA,0xB8, /19250x02,0xB6,0x4d, /19260x09,0x57,0x42, /19270x24,0x97,0xB7, /19280x04,0x97,0x4A, /19290x66,0x4B,0x3e, /19300x0d,0x4A,0x51, /19310x0e,0xA5,0x46, /19320x56,0xd4,0xBA, /19330x05,0xAd,0x4e, /19340x02,0xB6,0x44, /19350x39,0x37,0x38, /19360x09,0x2e,0x4B, /19370x7C,0x96,0xBf, /19380x0C,0x95,0x53, /19390x0d,0x4A,0x48, /19400x6d,0xA5,0x3B, /19410x0B,0x55,0x4f, /19420x05,0x6A,0x45, /19430x4A,0xAd,0xB9, /19440x02,0x5d,0x4d, /19450x09,0x2d,0x42, /19460x2C,0x95,0xB6, /19470x0A,0x95,0x4A, /19480x7B,0x4A,0xBd, /19490x06,0xCA,0x51, /19500x0B,0x55,0x46, /19510x55,0x5A,0xBB, /19520x04,0xdA,0x4e, /19530x0A,0x5B,0x43, /19540x35,0x2B,0xB8, /19550x05,0x2B,0x4C, /19560x8A,0x95,0x3f, /19570x0e,0x95,0x52, /19580x06,0xAA,0x48, /19590x7A,0xd5,0x3C, /19600x0A,0xB5,0x4f, /19610x04,0xB6,0x45, /19620x4A,0x57,0x39, /19630x0A,0x57,0x4d, /19640x05,0x26,0x42, /19650x3e,0x93,0x35, /19660x0d,0x95,0x49, /19670x75,0xAA,0xBe, /19680x05,0x6A,0x51, /19690x09,0x6d,0x46, /19700x54,0xAe,0xBB, /19710x04,0xAd,0x4f, /19720x0A,0x4d,0x43, /19730x4d,0x26,0xB7, /19740x0d,0x25,0x4B, /19750x8d,0x52,0xBf, /19760x0B,0x54,0x52, /19770x0B,0x6A,0x47, /19780x69,0x6d,0x3C, /19790x09,0x5B,0x50, /19800x04,0x9B,0x45, /19810x4A,0x4B,0xB9, /19820x0A,0x4B,0x4d, /19830xAB,0x25,0xC2, /19840x06,0xA5,0x54, /19850x06,0xd4,0x49, /19860x6A,0xdA,0x3d, /19870x0A,0xB6,0x51, /19880x09,0x37,0x46, /19890x54,0x97,0xBB, /19900x04,0x97,0x4f, /19910x06,0x4B,0x44, /19920x36,0xA5,0x37, /19930x0e,0xA5,0x4A, /19940x86,0xB2,0xBf, /19950x05,0xAC,0x53, /19960x0A,0xB6,0x47, /19970x59,0x36,0xBC, /19980x09,0x2e,0x50, /1999 2940x0C,0x96,0x45, /2000 2970x4d,0x4A,0xB8, /2001 3000x0d,0x4A,0x4C, /2002 3030x0d,0xA5,0x41, /2003 3060x25,0xAA,0xB6, /2004 3090x05,0x6A,0x49, /2005 3120x7A,0xAd,0xBd, /2006 3150x02,0x5d,0x52, /2007 3180x09,0x2d,0x47, /2008 3210x5C,0x95,0xBA, /2009 3240x0A,0x95,0x4e, /2010 3270x0B,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, /20210x0A,0xd5,0x41, /20220x24,0xdA,0xB6, /20230x04,0xB6,0x4A, /20240x69,0x57,0x3d, /20250x0A,0x4e,0x51, /20260x0d,0x26,0x46, /20270x5e,0x93,0x3A, /20280x0d,0x53,0x4d, /20290x05,0xAA,0x43, /20300x36,0xB5,0x37, /20310x09,0x6d,0x4B, /20320xB4,0xAe,0xBf, /20330x04,0xAd,0x53, /20340x0A,0x4d,0x48, /20350x6d,0x25,0xBC, /20360x0d,0x25,0x4f, /20370x0d,0x52,0x44, /20380x5d,0xAA,0x38, /20390x0B,0x5A,0x4C, /20400x05,0x6d,0x41, /20410x24,0xAd,0xB6, /20420x04,0x9B,0x4A, /20430x7A,0x4B,0xBe, /20440x0A,0x4B,0x51, /20450x0A,0xA5,0x46, /20460x5B,0x52,0xBA, /20470x06,0xd2,0x4e, /20480x0A,0xdA,0x42, /20490x35,0x5B,0x37, /20500x09,0x37,0x4B, /20510x84,0x97,0xC1, /20520x04,0x97,0x53, /20530x06,0x4B,0x48, /20540x66,0xA5,0x3C, /20550x0e,0xA5,0x4f, /20560x06,0xB2,0x44, /20570x4A,0xB6,0x38, /20580x0A,0xAe,0x4C, /20590x09,0x2e,0x42, /20600x3C,0x97,0x35, /20610x0C,0x96,0x49, /20620x7d,0x4A,0xBd, /20630x0d,0x4A,0x51, /20640x0d,0xA5,0x45, /20650x55,0xAA,0xBA, /20660x05,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,0xB5, /2099;void WriteDataLCD(unsigned chardat)LCD_RS=1;LCD_RW=0;LCD_E=0;delay(2);LCD_Data=dat;delay(2);LCD_E=1;delay(5);LCD_E=0;delay(5);void WriteCommandLCD(unsigned charudat)LCD_RS=0;LCD_RW=0;LCD_E=0;delay(2);LCD_Data=udat;delay(2);LCD_E=1;delay(5);LCD_E=0;delay(5);void LCDInit(void)WriteCommandLCD(0x30);WriteCommandLCD(0x01);WriteCommandLCD(0x06);WriteCommandLCD(0x0C);void LCDClear(void)WriteCommandLCD(0x01);WriteCommandLCD(0x34);WriteCommandLCD(0x30);void LCDSendWord(unsigned char *pwhile(*p0)WriteDataLCD(*p);p+;void LCDTestWord(bit i,unsignedchar word)if(i=0)WriteCommandLCD(word);elseWriteDataLCD(word);void DisplayYear(void)year=ReadDs1302(0x8d);LCDTestWord(0,0x81);LCDTestWord(1,(year/16)+0x30);LCDTestWord(1,year%16+0x30);LCDTestWord(0,0x82);LCDSendWord( 年 );DisplayShengXiao();void DisplayMonth(void)month=ReadDs1302(0x89);LCDTestWord(0,0x83);if(month/16!=0)LCDTestWord(1,(month/16)+0x30);elseLCDTestWord(1,0x20);LCDTestWord(1,month%16+0x30);LCDTestWord(0,0x84);LCDSendWord( 月 );DisplayShengXiao();void DisplayDay(void)day=ReadDs1302(0x87);LCDTestWord(0,0x85);if(day/16!=0)LCDTestWord(1,(day/16)+0x30); else LCDTestWord(1,0x20);LCDTestWord(1,day%16+0x30);LCDTestWord(0,0x86);LCDSendWord( 日 );DisplayShengXiao();void DisplayHour(void)hour=ReadDs1302(0x85);LCDTestWord(0,0x88);LCDTestWord(1,(hour/16)+0x30);LCDTestWord(1,hour%16+0x30);void DisplayMin(void)min=ReadDs1302(0x83);LCDTestWord(0,0x89);/ LCDTestWord(1,0x3a);LCDSendWord( 点 );LCDTestWord(1,(min/16)+0x30);LCDTestWord(1,min%16+0x30);LCDSendWord( 分 );void DisplaySec(void)unsigned char i=0;unsigned int a=0,b=0,c=0;sec=ReadDs1302(0x81);LCDTestWord(0,0x8c);LCDTestWord(1,(sec/16)+0x30);LCDTestWord(1,sec%16+0x30);void DisplayTemp(void)unsigned int i;unsigned char a,b,c;WriteCommandLCD(0x8c);LCDTestWord(0,0x8d);LCDSendWord( );i=GetTemp();a=i/100;LCDTestWord(1,a+0x30);b=i%100/10;LCDTestWord(1,b+0x30);LCDTestWord(1,0x2e);c=i-a*100-b*10;LCDTestWord(1,c+0x30);LCDSendWord(C);code unsigned charDayCode19=0x00,0x1f,0x3b,0x5a,0x780x97,0xb5,0xd4,0xf3;code unsigned intDayCode23=0x111,0x130,0x14e;/ 计算公历日离当年元旦的天数 , 为了减少运算 , 用了两个表DayCode19,DayCode23/ 如果公历月在九月或前 , 天数会少 于0xff, 用表 DayCode19, 在九月后 , 天数大于 0xff, 用表 DayCode23/ 如输入公历日 为 8 月 1 0 日 , 则公历日离元旦天数为 DayCode18-1+10-1, 如输入公历日为 11 月 10 日 , 则公历日离元旦天数为 DayCode211-10+10-1/* 读取数据表中农历月的大月或小月 ,如果该月为大返回 1, 为小返回 0*/bit GetMoonDay(unsigned charLunarMonth,unsigned int TableAddr)unsigned char temp;switch (LunarMonth)/LunarMonth 指向农历月份case 1:temp=YearCodeTableAddr&0x08/1 月,对应年份表里第一字节的 BIT3 位 ,如果是 1, 则月大,如果是 0, 则月小if (temp=0) return(0);/ 为 0, 月小else return(1);/ 为 1, 月大case 2:temp=YearCodeTableAddr&0x04; / 2月,对应年份表里第一字节的 BIT2 位,如果是 1, 则月大,如果是 0, 则月小if (temp=0) return(0);/ 为 0, 月小else return(1);/ 为 1, 月大case 3:temp=YearCodeTableAddr&0x02; / 3月,对应第一字节的 BIT1 位,如果是 1, 则月大,如果是 0, 则月小if (temp=0) return(0);/ 为 0, 月小else return(1);/ 为 1, 月大case 4:temp=YearCodeTableAddr&0x01; / 1月,对应第一字节的 BIT0 位,如果是 1, 则月大,如果是 0, 则月小if (temp=0) return(0);else return(1);case 5:temp=YearCodeTableAddr+1&0x80; / 5月,对应第二字节的 BIT7 位,如果是 1, 则月大,如果是 0, 则月小if (temp=0) return(0);else return(1);case 6:temp=YearCodeTableAddr+1&0x40; / 6月,对应第二字节的 BIT6 位,如果是 1, 则月大,如果是 0, 则月小if (temp=0) return(0);else return(1);case 7:temp=YearCodeTableAddr+1&0x20; / 7月,对应第二字节的 BIT5 位,如果是 1, 则月大,如果是 0, 则月小if (temp=0) return(0);else return(1);case 8:temp=YearCodeTableAddr+1&0x10; / 8月,对应第二字节的 BIT4 位,如果是 1, 则月大,如果是 0, 则月小if (temp=0) return(0);else return(1);case 9:temp=YearCodeTableAddr+1&0x08; / 9月,对应第二字节的 BIT3 位,如果是 1, 则月大,如果是 0, 则月小if (temp=0) return(0);else return(1);case 10:temp=YearCodeTableAddr+1&0x04;/10 月,对应第二字节的 BIT2 位,如果 是1, 则月大,如果是 0, 则月小if (temp=0) return(0);else return(1);case 11:temp=YearCodeTableAddr+1&0x02;/11 月,对应第二字节的 BIT1 位,如果 是1, 则月大,如果是 0, 则月小if (temp=0) return(0);else return(1);case 12:temp=YearCodeTableAddr+1&0x01;/12 月,对应第二字节的 BIT0 位,如果 是1, 则月大,如果是 0, 则月小if (temp=0) return(0);else return(1);case 13:temp=YearCodeTableAddr+2&0x80;/13 月,对应第三字节的 BIT7 位,如果 是1, 则月大,如果是 0, 则月小if (temp=0) return(0);else return(1);void Conversion(bitcenbit,unsigned char year,unsigned charmonth,unsigned char day)unsigned chartemp1,temp2,temp3,MonthP;/temp3,temp4 分别表示春节距元旦的天数,公历日离元旦的天数unsigned int temp4,TableAddr;bit flag2,flag_y;temp1=year/16;/BCD-hex 先把数据转换为十六进制 高位temp2=year%16; / 低位year=temp1*10+temp2; / 把年 数据 转换成 10 进制temp1=month/16; / 月份 高位temp2=month%16; / 月份 低位month=temp1*10+temp2; / 把月 数据 转换成 10 进制temp1=day/16; / 日期 高位temp2=day%16; / 日期 低位day=temp1*10+temp2; / 把日 数据 转换成 16 进制/ 如果是 21 世纪TableAddr=(year+0x64-1)*0x0/ 定位数据表地址 year 对应的年份表中的地址是 (year+99)*3 如 201 0 年 其地址 是327LCDTestWord(0,0x80);LCDSendWord(20);temp1=YearCodeTableAddr+2&0x60;/ 取当年春节所在的公历月份 年份表中第三字节 BIT6-5 表示春节的公历月份temp1=_cror_(temp1,5);/ 循环右移 5 位,得到 春节所在的公历月份temp2=YearCodeTableAddr+2&0x1f;/ 取当年春节所在的公历日 年份表中第三字节 BIT4-0 表示当年春节所在的公历日if(temp1=0x01)/ 计算当年春年离当年元旦的天数 , 春节只会在公历 1 月或 2 月temp3=temp2-1;/ 假如春节在公历 1 月 , 则元旦离春节的天数为 temp2-1 天elsetemp3=temp2+0x1f-1;/ 假如春节在公历 2 月 , 则无理离春节的天数为 temp2+0x1f-1 天if (month0x02)&(year%0x04=0)/ 如果公历月大 于 2 月并且该年 的 2 月为闰月 , 天数加 1temp4+=1;/ 计算机出公历日距元旦的天数和春节距元旦的天数 , 则是为了比较公历日是在春节前还是春节后/ 如果 temp3temp4 则 公历日在春节之前if (temp4=temp3)/ 公历日在春节后或就是春节当日使用下面代码进行运算temp4-=temp3;/ 公历日离春节的天数 因为公历日在春节后 所以为 temp4-temp3month=0x01;MonthP=0x01;/LunarMonth 为月份指向 , 公历日在春节前或就是春节当日 LunarMonth 指向首月flag2=GetMoonDay(MonthP,TableAddr); /检查该农历月为大小还是小月 , 大月返回 1,小月返回 0flag_y=0;if(flag2=0)/GetMoonDay() 函数返回的是 0temp1=0x1d;/ 小月 29 天else/GetMoonDay() 函数返回的是 1temp1=0x1e;/ 大月 30 天temp2=YearCodeTableAddr&0xf0;/ 年份数据表中第 1 字节 BIT7-4 为闰月,为 0 则这年无闰月,如为 1, 表示有闰月temp2=_cror_(temp2,4);/ 从数据表中取该年的闰月月份 , 如为 0 , 则该年无闰月 BIT3- 0 表示阴 历 1 到 4 月的大小 1 为大 0 为小while(temp4=temp1)temp4-=temp1;MonthP+=1;if(month=temp2)flag_y=flag_y;if(flag_y=0)month+=1;elsemonth+=1;flag2=GetMoonDay(MonthP,TableAddr);if(flag2=0)temp1=0x1d;elsetemp1=0x1e;day=temp4+1;else / 公历日在春节前使用下面代码进行运算temp3-=temp4;/ 公历日离春节的天数 因为公历日在春节前 所以为 temp3-temp4if(year=0x00)year=0x63;cenbit=1;else year-=1;TableAddr-=0x03;month=0x0c;temp2=YearCodeTableAddr&0xf0;格式第一字节 BIT7-4 位表示闰月月份 ,则无闰月, BIT3-0 对应阴历第 1-4 月的小,temp2=_cror_(temp2,4);if (temp2=0)MonthP=0xelse MonthP=0x0d; /* MonthP 为月份指向 , 如当年有闰月 , 一年有十三个月 , 月指向 1闰月指向 12*/flag_y=0;flag2=GetMoonDay(MonthP,TableAddr)if(flag2=0)temp1=0x1delse temp1=0x1e;while(temp3temp1)temp3-=temp1;MonthP-=1;if(flag_y=0)month-=1;if(month=temp2)flag_y=flag_y;flag2=GetMoonDay(MonthP,TableAddr)if(flag2=0)temp1=0x1d;else temp1=0x1e;day=temp1-temp3+1;c_moon=cenbit;temp1=year/10;temp1=_crol_(temp1,4);temp2=year%10;LunarYear=temp1|temp2;temp1=month/10;temp1=_crol_(temp1,4);temp2=month%10;LunarMonth=temp1|temp2;temp1=day/10;temp1=_crol_(temp1,4);temp2=day%10;LunarDay=temp1|temp2;void DisplayShengXiao(void)unsigned char LunarYearD,ReYear;/ 农历年份的十进制数 和取模后的余数if(cen=0x19) cenbit=1;if(cen=0x20) cenbit=0;Conversion(cenbit,year,month,day);/ 将公历日期转换成农历LCDTestWord(0,0x94);/ 显示在 LCD 的 0X94 位置上LCDTestWord(1,LunarYear/16+0x30);/ 农历年十位LCDTestWord(1,LunarYear%
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025党支部与文化单位共建文化活动合作协议书范本
- 2025法院版离婚协议书标准文本与婚姻家庭法律援助手册
- 2025年个人住宅产权转让合同文本
- 2025年度电机产品在线监测与故障诊断服务合同
- 2025补充协议书格式:房地产租赁补充协议范本
- 2025年度户外广告设施维修简易施工合同
- 2025版限购政策下商品房预售合同模板下载
- 2025年度家庭用车租赁合作协议书
- 2025年度网络设备租赁与网络安全保障合同
- 2025年商业地产拆迁赔偿合同范例
- 《如何做好研究生》课件
- 高等数学期末试卷及答案
- 从0开始跨境电商-第三章-阿里巴巴国际站入门-OK
- 新能源电站远程监控系统建设方案
- 《紫藤萝瀑布》《丁香结》《好一朵木槿花》
- 2023柔性棚洞防护结构技术规程
- 河流地貌的发育 - 侵蚀地貌
- 离网光伏发电系统详解
- 广告文案写作(第二版)全套教学课件
- 《国家电网公司电力安全工作规程(配电部分)》
- 金融学黄达ppt课件9.金融市场
评论
0/150
提交评论