河南工业职业技术学院
万年历的设计
题目: 万年历的设计
系别: 电子工程系
专业: 电子信息工程
班级: 电子0701
学生姓名: 刘志宝
指导教师: 曹建生
2010年4月
摘要
电子万年历中实现公历农历互换的1种实用算法。用4个字节的数据可以准确地描述任意1年与年历有关的信息,将需要实现公历农历互换的每1年的4个字节的数据有机存放在1起形成1个基本数据表。电子万年历中的计算机通过查询预先存储在计算机存储器里的基本数据表,得到转换需要的数据信息,根据转换要求和本算法提供的互换算法,从而实现公历农历的互换。这种互换算法的优点是存储的数据量少,计算简便,实用性强。
美国DALLAS公司推出的具有涓细电流充电能的低功耗实时时钟芯片DS1302。它可以对年、月、日、周日、时、分、秒进行计时,还具有闰年补偿等多种功能,而且DS1302的使用寿命长,误差小。对于数字电子万年历采用直观的液晶12864数字显示,可以同时显示年、月、日、周日、时、分、秒和温度等信息,还具有时间校准等功能。该电路采用AT89C51单片机作为核心,功耗小,能在3V的低压工作,电压可选用3~5V电压供电。
关键词: 电子万年历单片机AT89C51 公历农历互换算法研究DS1302 液晶12864
Abstract II
Implement electronic calendar Lunar calendar swap one kind of practical algorithms. With 4 bytes of data can accurately describe any one year and calendar-related information, will be required to achieve lunar calendar every 1-year swap 4 bytes of data stored in anic form a basic data from the table. Electronic calendar in puter by querying pre-stored in puter memory in the basic data table, data need to be converted, under conversion requirements and the exchange of algorithms to provide the algorithm to realize the exchange of lunar calendar. This exchange method has the advantage of less data storage, calculation is simple, practical. We use the United States following DALLAS Semiconductor DS1820 improved after the introduction of a smart temperature sensor DS18B20 as the detection element, a temperature range of -55 ~ 125 o C, up to a maximum resolution of o C. DS18B20 can be directly read out the temperature on the north side, and three-wire system with single-chip connected to a decrease of the external hardware circuit, with low-cost and easy use.
The United States launched with Juan DALLAS small current charge to low-power real time clock chip DS1302. It can beplay year, month, day, Sunday, hours, minutes, seconds, and temperature information, but also a time calibration functions. The circuit is AT89C51 microcontroller as a core, low power, low-voltage work in 3V, the voltage can choose 3
泡沫混凝土发泡剂性能的研究 来自淘豆网m.daumloan.com转载请标明出处.