专业英语结课报告.doc_第1页
专业英语结课报告.doc_第2页
专业英语结课报告.doc_第3页
专业英语结课报告.doc_第4页
专业英语结课报告.doc_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

专业英语结课报告翻译:基于AT89S51单片机的电子万年历的设计班级:10级电子信息统本01班姓名:席宇康学号:101102010128摘 要本文借助电路仿真软件Protues对基于AT89S51单片机的电子万年历的设计方法及仿真进行了全面的阐述。该电子万年历在硬件方面主要采用AT89C51单片机作为主控核心,由DS1302时钟芯片提供时钟、1602LCM点阵液晶显示屏显示。AT89C51单片机是由Atmel公司推出的,功耗小,电压可选用46V电压供电;DS1302时钟芯片是美国DALLAS公司推出的具有涓细电流充电功能的低功耗实时时钟芯片,它可以对年、月、日、星期、时、分、秒进行计时,还具有闰年补偿等多种功能,而且DS1302的使用寿命长,误差小;数字显示是采用的LED液晶显示屏来显示,可以同时显示年、月、日、星期、时、分、秒等信息。此外,该电子万年历还具有时间校准等功能。在软件方面,主要包括日历程序、时间调整程序,显示程序等。所有程序编写完成后,在Keil软件中进行调试,确定没有问题后,在Proteus软件中嵌入单片机内进行仿真。论文主要研究了液晶显示器LED及时钟芯片DS1302,温度传感器DS18B20与单片机之间的硬件互联及通信,对数种硬件连接方案进行了详尽的比较,在软件方面对日历算法也进行了论述。研究结果表明,由于万年历的应用相当普遍,所以其设计的核心在于硬件成本的节约软件算法的优化,力求做到物美价廉,才能拥有更广阔的市场前景。关键词:单片机;DS1302;LED绪论 随着社会、科技的发展,人类得知时间,从观太阳、摆钟到现在电子钟,不断研究、创新。为了在观测时间的同时,能够了解其它与人类密切相关的信息,比如温度、星期、日期等,电子万年历诞生了,它集时间、日期、星期和温度功能于一身,具有读取方便、显示直观、功能多样、电路简洁等诸多优点,符合电子仪器仪表的发展趋势。伴随着电子技术的迅速发展,特别是随大规模集成电路出现,给人类生活带来了根本性的改变。由其是单片机技术的应用产品已经走进了千家万户。电子万年历的出现给人们的生活带来的诸多方便,作为一种附加功能,现在越来越广泛的被应用于各种电子产品中,具有广阔的市场前景。 通过以往对工业自动化的相关课程学习和理解独立完成制作电子万年历的设计。电子万年历作为电子类小产品不仅是市场上的宠儿,也是是单片机设计培训中一个很实用的题目。因为这个课题有很好的开放性和可发挥性,对制作者的要求比较高,不仅考察了对单片机的掌握能力更加强调了对单片机扩展的应用。而且要求设计的电子万年历在操作上力求简洁,功能上尽量齐全,显示界面也要出色。所以,电子万年历制作无论从实用目的,还是从培养能力的角度来看都是很有价值的毕业设计课题。本电子万年历的设计在硬件方面主要采用AT89S51单片机作为主控核心,由DS1302时钟芯片提供时钟、1602LCM点阵液晶显示屏显示。AT89S51单片机是由Atmel公司推出的,功耗小,电压可选用46V电压供电1;DS1302时钟芯片是美国DALLAS公司推出的具有涓细电流充电功能的低功耗实时时钟芯片,它可以对年、月、日、星期、时、分、秒进行计时,还具有闰年补偿等多种功能,而且DS1302的使用寿命长,误差小;数字显示是采用的LED液晶显示屏来显示,可以同时显示年、月、日、星期、时、分、秒等信息。此外,该电子万年历还具有时间校准等功能。在软件方面,主要包括日历程序、时间调整程序,显示程序等。所有程序编写完成后,在Keil软件中进行调试,确定没有问题后,在Proteus软件中嵌入单片机内进行仿真。最后在老师同学的帮助以及自己的努力下完成了此次电子万年历的设计。1.1 单片机芯片的选择本设计采用AT89S51芯片作为硬件核心,该芯片采用Flash ROM,内部具有4KB ROM存储空间,相对于本设计而言程序空间完全够用。能于3V的超低压工作,而且与MCS-51系列单片机完全兼容,而且运用于电路设计中时具备ISP在线编程技术,当在对电路进行调试时,由于程序的错误修改或对程序的新增功能需要烧入程序时,避免芯片的多次拔插对芯片造成的损坏。1.2 显示模块选择方案和论证方案一: 采用点阵式数码管显示,点阵式数码管是由八行八列的发光二极管组成,对于显示文字比较适合,如采用在显示数字显得太浪费,且价格也相对较高,所以也不用此种作为显示。方案二: 采用LED数码管动态扫描,LED数码管价格虽适中,对于显示数字也最合适,而且采用动态扫描法与单片机连接时,占用的单片机口线少。但是由于数码管动态扫描需要借助74LS164移位寄存器进行移位,该芯片在电路调试时往往会有很多障碍,所以不采用LED数码管作为显示2。方案三: 采用LCD液晶显示屏,液晶显示屏的显示功能强大,可显示大量文字,图形,显示多样,清晰可见3,对于电子万年历而言,一个1602的液晶屏即可,价格也还能接受,需要的接口线较多,但会给调试带来诸多方便,所以此设计中采用LCD1602液晶显示屏作为显示模块。1.3 时钟芯片的选择方案和论证方案一: 直接采用单片机定时计数器提供秒信号,使用程序实现年、月、日、星期、时、分、秒计数。采用此种方案虽然可以减少时钟芯片的使用,节约成本,但是,实现的时间误差较大。所以不采用此方案。方案二:采用DS1302时钟芯片实现时钟,DS130是美国DALLAS公司推出的一种高性能、低功耗、带RAM的实时时钟电路,它可以对年、月、日、周日、时、分、秒进行计时,具有闰年补偿功能,工作电压为2.5V5.5V。采用三线接口与CPU进行同步通信,并可采用突发方式一次传送多个字节的时钟信号或RAM数据。DS1302内部有一个318的用于临时性存放数据的RAM寄存器。DS1302是DS1202的升级产品,与DS1202兼容,但增加了主电源/后背电源双电源引脚,同时提供了对后背电源进行涓细电流充电的能力。主要特点是采用串行数据传输,可为掉电保护电源提供可编程的充电功能,并且可以关闭充电功能。采用普通32.768kHz晶振4。因此,本设计中采用DS1302提供时钟。.4 温度传感器的选择方案与论证方案一: 使用热敏电阻作为传感器,用热敏电阻与一个相应阻值电阻相串联分压,利用热敏电阻阻值随温度变化而变化的特性,采集这两个电阻变化的分压值,并进行A/D转换。此设计方案需用A/D转换电路,增加硬件成本而且热敏电阻的感温特性曲线并不是严格线性的,会产生较大的测量误差5。方案二: 采用数字式温度传感器DS18B20,此类传感器为数字式传感器而且仅需要一条数据线进行数据传输,易于与单片机连接,可以避免A/D模数转换模块,降低硬件成本,简化系统电路6。另外,数字式温度传感器还具有测量精度高、测量范围广等优点。因此,本设计DS18B20温度传感器作为温度采集模块。Abstract This paper mainly discuss the design and simulation of electronic calender based on AT89S51 with the help of Protues.On the hardware side, the electronic calendar using AT89C51 microcontroller as the main control center, clock provided by the DS1302 clock chip , 1602LED dot matrix LCD display.Atmel Corporation AT89C51 microcontroller is producted by Atmel Corporation, low power consumption, voltage can be selected 4V 6V voltage power supply; DS1302 clock chip, launched in the United States with DALLAS small current charging function real time clock chip, low power consumption, it can be years , month, date, day, hour, minute, seconds time, also has a leap year compensation and other functions, and DS1302 long life, small error; LED digital display is used in LCD displays that can display in , month, day, week, hours, minutes, seconds and other information.In addition, the electronic calendar is also a time calibration functions. In terms of software, including calendar program, time to adjust procedures, display procedures. All programming is complete, the Keil software debugging, make sure there is no problem, in the Proteus software embedded within the simulated MCU.This article focus on liquid crystal screen LCM1602 and clock chip DS1302,temperature sensor DS18B20 which connected and communicated with Microcontroller.Several solutions will also compared with each other.On software side,calender calculation will be discussed as well.The results are as follows:as electronic calender are widely used in our daily life.It shouldbe chip and convenient so as to win more profit. Keywords:Microcontroller,DS1302;DS18B20;LCD1602IntroductionWith the development of society, science and technology, human that time,from the view of the sun, the electronic clock pendulum clock to now,continuous research, innovation. Observation time in the same time, to be able to understand other information related to human, such as temperature,week, date, the birth of the electronic calendar, it set the time, date, week and temperature functions in one, with easy to read, intuitive display, functional diversity, simple circuit and many other advantages, in line with the development trend of electronic instrumentation. With the rapid development of electronic technology, especially with the emergence of large-scale integrated circuits, has brought the fundamental change to human life. By the application of single-chip computer technology product have already walked into thousands of households. The emergence of electronic calendar bringsconvenience to peoples life, as an additional function, now more and more widely used in various electronic products, and has broad market prospects.Through the industrial automation courses related to learning and understanding independently complete the design of electronic calendar.Electronic calendar as a small electronics products is not only a market darling, also is a very practical problem in chip design training. Because of this subject has good openness and can play, the producers of relatively high requirements, not only the ability to master SCM emphasizes the application of MCU expansion. But also for the design of electronic calendar in the operationis concise, function to complete, but also excellent display interface. So,electronic calendar produced both from a practical purpose, or from the training capacity point of view is the graduation design topic is very valuable.The design of the electronic calendar in hardware using AT89S51 microcontroller as the main control center, provided by the DS1302 clock chip clock, 1602LCM dot matrix liquid crystal display. AT89S51 MCU is launched by Atmel company, small power consumption, voltage can choose 4 6V voltage power supply ; DS1302 clock chip is America DALLAS company has low power consumption real-time clock chip small trickle current charging function,it can be years, months, days, week, when, minutes and seconds for the time,also with a leap year compensation and other functions, and the DS1302s long life, small error; digital display is used to display the LED LCD display,can display year, month, day, week, time, minutes and seconds, and other information. In addition, the electronic calendar is also a time calibration functions. In the software aspect, mainly includes calendar program, time to adjust the program, display program. All programming is complete, the Keil software debugging, make sure there is no problem, microcontroller embedded in the simulation in Proteus software. Finally in the help of teachers and classmates as well as their own efforts to complete the design of the electronic calendar.The 1.1 single chip selectionThis design uses AT89S51 chip as the core hardware, the chip uses the FlashROM, with 4KB ROM internal storage space, relative to the design space is fully used. Ultra low voltage can work on the 3V, and is fully compatible with the MCS-51 series microcontroller, and used in circuit design with ISPprogramming technology, when the circuit debugging, the error in the programto modify or to program new functions need to be burned in the program,many times to avoid damage to the chip chip plugging caused by.The 1.2 display module options and argumentsPlan a:The dot matrix digital tube display, dot matrix, digital tube is composed of light emitting diode eight rows and eight columns, to display text for, such as the use of the digital display is too wasteful, and the price is relatively high, so nosuch as show.Scheme two:The use of LED digital tube dynamic scanning, LED digital tube, although the price is moderate, the most suitable for digital display, and using dynamicscanning method is connected with the SCM, SCM line less occupied. But due to the digital tube dynamic scanning by 74LS164 shift register is shifted, the chip in the circuit debugging often there will be many obstacles, so do not use LED digital tube as display .Scheme three:Using LCD LCD screen, LCD screen display function, can display text,graphics, display of diverse, visible , the electronic calendar, a 1602 LCD screen can be, the price can accept, need more interface line, but will bringmuch convenience to debugging, this design adopts LCD1602 liquid crystaldisplay screen as a display module.The 1.3 Selection scheme and demonstrates the clock chipPlan a:The chip timing counter provides a second signal, use the program to achieve the year, month, day, week, time, minutes, seconds count. Using this schemecan reduce the use of the clock chip, save the cost, however, the time error.So dont use this program.Scheme two:To achieve the clock by clock chip DS1302, DS130 is a real-time clock circuit is a high performance, low power consumption, with RAM American produced by DALLAS company, it can on the year, month, day, Sunday, when, minutes and seconds for the time, has a leap year compensation function, the working voltage is 2.5V 5.5V. The three line interface synchronization with CPUcommunications, and can use burst mode a transmission of multiple byte clock signal or RAM data. DS1302 has an internal 31 * 8 for temporary storage of data to the RAM register. DS1302 DS1202 upgrade product, compatible with DS1202, but the increase of the main power / back power dual power supply pin, and provides the ability to small trickle charge current on the back power.The main feature is a serial data transmission, can provide the charging function programmable power down protection

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论