欢迎来到三一文库! | 帮助中心 三一文库31doc.com 一个上传文档投稿赚钱的网站
三一文库
全部分类
  • 研究报告>
  • 工作总结>
  • 合同范本>
  • 心得体会>
  • 工作报告>
  • 党团相关>
  • 幼儿/小学教育>
  • 高等教育>
  • 经济/贸易/财会>
  • 建筑/环境>
  • 金融/证券>
  • 医学/心理学>
  • ImageVerifierCode 换一换
    首页 三一文库 > 资源分类 > DOC文档下载  

    毕业论文-基于AT89S52单片机控制的模拟汽车转向灯设计.doc

    • 资源ID:3939771       资源大小:348.50KB        全文页数:18页
    • 资源格式: DOC        下载积分:4
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录   微博登录  
    二维码
    微信扫一扫登录
    下载资源需要4
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    毕业论文-基于AT89S52单片机控制的模拟汽车转向灯设计.doc

    课 程 设 计 说 明 书课程名称: 单片机技术 设计题目: 基于AT89S52单片机控制的模拟汽车转向灯设计 学 院: 电子信息与电气工程学院 学生姓名: 学 号: 专业班级: 14级自动化专升本 指导教师: 2015年4月30日基于AT89S52单片机控制的模拟汽车转向灯设计摘 要:随着单片机的日益发展,其应用也越来越广泛,通过对“汽车转弯灯单片机控制系统”设计,可以对单片机的知识得到巩固和扩张。本设计是设计一个单片机控制系统。在汽车进行左转弯、右转弯、刹车、合紧急开关、停靠等操作时,实现对各种信号指示灯的控制。本设计是一个基于AT89S52单片机控制模拟汽车在进行左转弯、右转弯、刹车、合紧急开关、停靠等操作,实现对各种信号指示灯的控制:当按下左转按钮时,左头灯、左转向灯和左尾灯同时亮且闪烁;当按下右转按钮时,右头灯、右转向灯、右尾灯同时亮且闪烁;当按下刹车按钮时,左、右尾灯同时亮;当按下停靠按钮时,左、右头尾灯同时亮且闪烁;当按下紧急按钮时,所有灯同时亮且闪烁。本设计用P1口作为输入,连接按钮,用P2口作为输出,连接LED灯。程序中通过对P1口的采样,和预设值进行对比后,跳转入相应的子程序。经过单片机对P2口输出低电平点亮共阳极LED灯。关键词:AT89S52 转向灯目录1. 设计背景52.设计方案62.1硬件设计方案62.2 软件设计方案63. 方案实施63.1时钟电路63.2电源电路73.3 复位电路73.4 LED电路设计8 3.5 按键电路设计83.6程序设计84. 结果与结论114.1 结果114.2结论115. 收获与致谢126. 参考文献137.附件141. 设计背景 随着单片机的日益发展,其应用也越来越广泛,通过对“汽车转弯灯单片机控制系统”设计,可以对单片机的知识得到巩固和扩张。本设计是设计一个单片机控制系统。在汽车进行左转弯、右转弯、刹车、合紧急开关、停靠等操作时,实现对各种信号指示灯的控制。本设计主要是对单片机的并行输入/输出口电路的应用,通过I/O口控制发光二极管的亮灭闪烁,加上一些复位电路按键电路驱动电路来模拟汽车尾灯的功能。 汽车在驾驶时有左转弯、右转弯、刹车、合紧急开关、停靠等操作。在左转弯或右转弯时,通过转弯操作杆应使左转开关或右转开关合上,从而使左头灯、仪表板左转弯灯、左尾灯或右头灯、仪表板右转弯灯、右尾灯闪烁;合紧急开关时要求前面所述的6个信号灯全部闪烁;汽车刹车时,两个尾灯点亮;如正当转弯时刹车,则转弯时原应闪烁的信号灯仍应闪烁。以上闪烁,都是频率为1Hz的低频闪烁;在汽车停靠而停靠开关合上时,左头灯、右头灯、左尾灯、右尾灯按频率为30Hz的高频闪烁。通过做实物,编写程序,完成了设计的要求。通过该设计,对单片机的认识有了更进一步的了解,对单片机的各个口的功能作用了解加深,对Protel的应用更加熟练,对设计系统有了了解,掌握了一些设计方法,受益不浅- 1 -2.设计方案2.1 硬件设计方案用P1口作为输入,连接5个按钮分别作转向灯的左转、右转、紧急、停靠和刹车开关。用P2口作为输出,连接7个LED灯作为转向灯的信号灯。用USB输入电源,再加上一个单片机的最小系统,即可作为转向灯设计的硬件电路。电源 按钮P1 单片机 P2 输入 LED灯 复位电路 输出图2.1硬件连接图2.2 软件设计方案读取P1口的输入状态(P1口低5位数据),与预设值对比,对比之后转入相应的子程序。转入相应子程序后由P2口输出点亮LED灯。3. 方案实施3.1时钟电路AT89S52内部有一个用于构成振荡器的高增益反相放大器,此放大器的输入和输出端分别是引脚XTAL1和XTAL2,在XTAL1和XTAL2上外接是时钟电源可构成时钟电路。单片机的生产工艺不同,时钟的产生方式也不同,有内部和外部两种时钟产生方式,根据该设计需要,采取内部方式。系统时钟电路如图3.2所示: 图3.1 时钟电路3.2电源电路这个电源电路主要是由变压器、桥式整流、电容、稳压器、电阻、发光二极管构成的和USB双电源。交流电压220V通过变压器变压以后,经过桥式整流变成直流电压,然后经过电容滤波和7805稳压,最后输出+5V的电源,然后在电源电路中加上一个发光二极管,当电源接通后发光二极管会亮。系统电源电路如图3.3所示: 图3.2电源3.3 复位电路在振荡器运行时,有两个机器周期(24个振荡周期)以上的高电平出现在此引脚时,将使单片机复位,只要这个引脚保持高电平,51芯片便循环复位。复位后P0P3口均在1引脚表现为高电平,程序计数器和特殊功能寄存器SFR全部清零。当复位引脚由高电平变为低电平时,芯片为ROM的00H处开始运行程序。复位是由外部的复位电路来实现的。片内复位电路是复位引脚RST通过一个斯密特触发器与复位电路相连,斯密特触发器用来抑制噪声,它的输出在每个机器周期的S5P2,由复位电路采样一次。复位电路通常采用上电自动复位和按钮复位两种方式,此电路系统采用的是上电与按钮复位电路。复位操作不会对内部RAM有所影响。 图3.3复位按键3.4 LED电路设计7个LED灯采用共阳极接法,用P2口驱动,前面加100电阻。如图图3.4 LED灯电路3.5按键电路设计用到5个按钮作为转向灯的控制开关,按钮一端接低电平一端接单片机的P1口低5位。如图图3.5 按键电路3.6程序设计采用汇编语言对本设计进行编程大量用到比较指令和跳转指令。编程思想:对P1口的采样,和预设值进行对比后,跳转入相应的子程序。经过单片机对P2口输出低电平点亮共阳极LED灯。流程图如下图3.6转向灯程序流程图输入量的读取程序节选SHIY1:CJNEA,SAME,START1CJNEA,#17H,NEXT1;P1.3=0时进入左转分支AJMPLEFTNEXT1:CJNEA,#0FH,NEXT2;P1.4=0时进入右转分支AJMPRIGHTNEXT2:CJNEA,#1DH,NEXT3;P1.1=0时进入紧急分支AJMPEARGENEXT3:CJNEA,#1EH,NEXT4;P1.0=0时进入刹车分支AJMPBRAKE输出量的程序节选LEFT:MOVP2,#0D5H;左转分支LCALLY1sMOVP2,#0FFHLCALLY1sAJMPSTARTRIGHT:MOVP2,#0ABH;右转分支LCALLY1sMOVP2,#0FFHLCALLY1sAJMPSTARTEARGE:MOVP2,#80H;紧急分支LCALLY1sMOVP2,#0FFHLCALLY1sAJMPSTARTBRAKE:MOVP2,#9FH;刹车分支AJMPSTART4. 结果与结论4.1 结果(1)按S1刹车键,D5、D6相应信号灯亮; (2)按S2紧急键,D1、D2、D3、D4、D5、D6相应信号灯以1Hz频率闪烁; (3)按S3停靠键,D1、D2、 D5、D6相应信号灯以30Hz高频率闪烁; (4)按S4左转弯键,D1、D3、D5相应信号以1Hz频率灯亮; (5)按S5右转弯键,D2、D4、D6相应信号灯以1Hz频率闪烁; (6)按S1刹车、S2紧急键,D1、D2、D3、D4相应信号灯以1Hz频率闪烁;D5、D6信号灯亮; (7)按S4左转弯、S1刹车键,D1、D3相应信号灯以1Hz频率闪烁;D5、D6信号灯亮; (8)按S5右转弯、S1刹车键,D2、D4相应信号灯以1Hz频率闪烁;D5、D6信号灯亮; (9)按S4左转弯、S1刹车、S2紧急键,D1、D2、D3、D4相应信号灯以1Hz频率闪烁;D5、D6信号灯亮; (10)按S5右转弯、S1刹车、S2紧急键,D1、D2、D3、D4相应信号灯以1Hz频率闪烁,D5、D6信号灯亮。4.2结论此次课程设计,我们使用的是AT89S52的单片机,它是一种低功耗,高性能的CMOS8位微控制器,有40个引脚。通过单片机的不同I/O端口与外设连接,能够控制外设的工作情况,从而实现不同的符合各种需求功能的电路板,强调P0口在作为通用I/O口时一定要加上拉电阻。LED灯是单片机控制系统中最常见的外部连接,一般用来显示处理结果或输入输出信号的状态。经过我们两周的努力完成了基于单片机的转向灯控制的课程设计。5收获与致谢 通过这次课程设计我们对于单片机应用有了更深的了解,单片机应用技术发展迅速,有着广阔的应用前景,涉及面广,内容丰富,它用软件的方法设计硬件;用软件方式设计的系统到硬件系统的转换是由有关的开发软件自动完成的;在设计过程中可用有关软件进行各种仿真;系统可现场编程,在线升级;整个系统可集成在一个芯片上,体积小,功率低,可靠性高。其技术以大规模可编程逻辑器件为设计载体,以硬件描述语言为系统逻辑描述的主要表达方法,以计算机、大规模可编程逻辑器件的开发软件及实验开发系统为设计工具,通过有关的开发软件,自动完成用软件方式设计的电子系统到硬件系统的逻辑编译,逻辑化简,逻辑分割,逻辑综合及优化,逻辑布局布线,逻辑仿真,直至特定目标芯片的适配便宜,逻辑映射,编程下载等工作,最终形成集成电子系统或专用集成芯片的一门新技术。 此次电子课程设计不但提高了我们实践的能力和理论水平,而且对于我们认识掌握各种操作技巧具有重大意义,使我们的综合素质得到了很大的提高! 在我们的日常生活中有很多与单片机电子电路相关的,很普通很简单的设备,比如说:电子计算机、饮水机、可调亮度的台灯、电子手表等等。这些简单的设备,都有一个不简单的设计。在以后的生活中我们应该留心这些设备,多学习,多思考才能让自己更加理解理论知识,强化理论知识,才能逐渐提高自己的设计能力。在此很感谢丁老师的耐心指导与我们小组的其他成员,辛苦你们了!6. 参考文献1 张毅刚,彭喜元,董继成.单片机原理及应用.高等教育出版社,20102 柴钰. 单片机原理应用(M). 西安:西安电子科技大学出版社,2009.3 徐晨,陈继红,王春明,徐慧.微机原理及应用.高等教育出版社,20044 余发山 单片机原理及应用技术,徐州:中国矿业大学出版社,20037. 附件附件1:元器件清单元器件名称型号规格数量备注单片机AT89C521晶振12MHZ1瓷片电容30pf2电解电容22uF1电阻10k11008发光二极管2V , 100mA81红,7黄按钮66脚开关1电源开关USB接口1电源接口附件2:原理图图7.1转向灯原理图附件3:实物图图7.2转向灯实物图指导教师评语:课程设计报告成绩: ,占总成绩比例: 30% 课程设计其它环节成绩:环节名称: 考勤 ,成绩: ,占总成绩比例: 20% 环节名称: 综合 ,成绩: ,占总成绩比例: 50% 总 成 绩: 指导教师签字:年 月 日本次课程设计负责人意见:负责人签字:年 月 日课 程 设 计 任 务 书设计题目转向灯学生姓名所在学院电子信息及电气工程学院专业、年级、班14级自动化专升本设计要求:(1)具有电源按钮及指示灯,有复位按键;(2)按下电源开关电源指示灯亮,开始执行程序,初始态为所有灯都灭,当按下左转按钮时,左头灯、左转向灯和左尾灯同时亮且闪烁;当按下右转按钮时,右头灯、右转向灯、右尾灯同时亮且闪烁;当按下刹车按钮时,左、右尾灯同时亮;当按下停靠按钮时,左、右头尾灯同时亮且闪烁;当按下紧急按钮时,所有灯同时亮且闪烁。学生应完成的工作: 本课题是基于AT89S52单片机的转向灯设计,应用汇编语言编写程序,可以通过查阅手册和文献资料来选择合适的元器件,设计合理的电路来实现符合要求的电路板事物。主要任务应包括:(1) 原理图的设计与仿真。(2) 学会对不同方案进行比较分析,并通过整体优点与缺点的比较,确定合理的方案。(3) 硬件电路的焊接及调试。(4) 用汇编语言进行软件的编写与调试。(5) 撰写课程设计说明书。(6) 该生在此次课程设计中主要任务是完善电路原理图的设计和实物正常工作与软件的调试与修改。参考文献阅读:1 张毅刚 . 单片机原理及应用M .北京:高等教育出版社,2004.2何立民. 单片机应用技术选编M 北京:北京海空航天大学出版社,1994. 3林志琦. 基Proteus的单片机可视化软硬件仿真M.北京:北京航空航天大学出版社,2006.工作计划: 4月20日4月22日查资料,画出设计原理图 4月23日4月24日编写设计程序 4月25日4月26日仿真 4月274月30日按照原理图焊接电路、烧程序, 4 月30日写课程设计报告任务下达日期:2015 年4月 20日 任务完成日期:2015 年4月 30 日指导教师(签名): 学生(签名): 您好,为你提供优秀的毕业论文参考资料,请您删除以下内容,O(_)O谢谢!A national survey was recently launched to evaluate the eye health of Chinese children andteenagers.On June 6, China's annual National Day for Eye Care, the China Youth Development ServiceCenter and Zhejiang Medicine, a leading listed Chinese pharmaceutical company, jointlyannounced the kickoff of the survey.In about one month, a questionnaire compiled by top eye care medical experts in China willbe distributed through multiple online partners, including Health.sohu.com, as well asthrough offline survey events held in universities, middle schools and primary schools acrossthe country.A report will be released based on the survey statistics and analysis, and most importantly,guidelines for parents and youth on how to care for the eyes and prevent myopia  agrowing problem in China's digitized society, will also be attached on the report."Myopia is not only a disease that makes people see things blurrily, but also leads to severecomplications, such as glaucoma (increased pressure within the eyeball), and can causeblindness," said Zhou Yuehua, an established eye care specialist with Beijing TongrenHospital."It is very important for parents and children to know about the risk and care for their eyes."There are about 450 million myopia patients in China. Among Chinese myopia patients,30million are severe patients, according to ZhouThe prevalence of myopia among high school and college students is more than 70 percent,and the situation is continuously worsening, he added.Sun Zhu, director with the China Youth Development Service Center, said long hours ofstudy, lack of exercise, especially outdoor activities, and attachment to electronic screen aresome of the top reasons behind the widespread myopia problems, and the increase ofyounger patients, although China has made great progress in improving the hardwarefacilities and lighting conditions in schools.He said he hopes the survey will alert people on the threatening situation, and also helpmedical experts to better guideline parents and children's behaviors to care for eyes, basedon the timely and factual statistics the survey collected.A series of follow-up events will also be held in six cities, including Jinan in Shandongprovince, and Changsha in Hunan province, to educate people on how to care for eyes afterthe survey started. More and more Chinese are jogging to get and stay fit. Most joggers will run alone, but some will jog with friends or even coaches. The Beijing Olympic Forest Park is one of the most popular spots. It is packed with runners in the afternoon, usually after work, and at weekends. Jogging after a whole day's work can be a way to unwind. It is true for He Wenjun, whose workplace is right near the forest park. She discovered her athletic aptitude at the age of seven, when she began playing tennis. Then she turned to jogging, and she has persevered with it for 10 years. "I come to jog almost every day after work, whenever I have time. I think jogging is good for my health. And for me, a girl, it helps me to achieve to eternal goal, to keep slim," He said. He says she prefers jogging alone, so she can focus better. She loves jogging, even during Beijing's smoggy days. "If the smog is severe, I'll hold off jogging for a while. But if I really want to get away from work, I'll wear a mask, or just ignore the smog and go on jogging," she said. For those who are not so athletic, jogging also has its attractions. Wu Houbin started roughly two years ago, when he was severely obese. Within two months, his weight dropped from 82 kilograms to 64 kilograms. The success helped him recover health, and he has made friends. "Jogging does not require speed, but stamina. If you want to stick to the game, you need to take it as a mission, a habit, and then eventually a hobby," Wu said. But persevering with jogging is not always easy. Jogging is beneficial for heart-lung function, and the skeletal system, but doctors say improper technique damages the joints, especially the knees and ankles. "Excessive jogging wears down the body, and harms one's health. Poor technique harms the muscles and skeleton, and can cause secondary injures. And, jogging in a bad environment can cause circulation problems," said Lu Zhiyong, attending doctor, Sports Hospital, General Admin. of Sports.Dr. Lu has some tips for joggers, and those who are thinking of taking it up.He says people should first evaluate their physical condition, to decide the amount and type of exercise, and jogging in the open air is better running on a treadmill. Conrad Macao will run special programs for the entire month of October this year to support the Hong Kong Cancer Fund's Pink Revolution, an annual campaign that seeks to raise awareness and funds for breast cancer research, the hotel recently announced. A major sponsor of the campaign for three years in a row, Conrad Macao has pledged to donate a portion of its proceeds to the fund, including those collected from selling its popular bear and rubber duck merchandise, in limited pink editions. Pink is the theme for floral arrangements and decorations in the hotel in October. In addition, on Fridays that month, members of the management and staff will add something pink to their uniforms, regular e-mails and handwritten guest cards. "Breast cancer is the most prevalent type of cancer among women in Hong Kong and is also of significant concern in Macao and around the world, regardless of age," general manager Bede Barry said in a statement. The hotel has enlisted the support of a number of international and local celebrities to help drive the cause, including South Korean actor Jung Suk Won. This year, a lucky guest who stays at the hotel during the campaign and also donates money for the cause will win a necklace specially designed by Arte Madrid, a Spanish jewelry brand. Women should strive to balance quality of work and life, and have children at a young age. As a doctor I see much suffering because of this imbalance. Xiao Ying, 36, works for a large law firm. Her job means lots of travel, a heavy caseload and a large number of meetings, so her schedule is hectic. She has been pregnant twice, but had abortions on both occasions because she felt her busy, high-pressure career wasn't conducive to raising a child. She planned to have children once she had achieved career success so she could provide a stable environment for her baby. After 10 years, Xiao felt the time was right, and she tried to conceive for about six months, but was unable to become pregnant. I conducted comprehensive physical checkups. The results suggested that Xiao's ovarian function has declined and a bilateral oviduct blockage has occurred, meaning that in vitro fertilization is her only option. So, after reducing her workload, Xiao underwent IVF treatment. Luckily, she got pregnant after just one treatment cycle, but later experienced vaginal bleeding, and rushed to the hospital. I told her to rest and carry on with the treatment (to prevent a miscarriage). As Zubin Zarthoshtimanesh, a yoga guru, demonstrated postures at a high school stadium in Dujiangyan city, Sichuan province, some 200 students sat on colorful mats watching him closely. It was part of the first India-China international yoga festival in the provincial capital, Chengdu, in Southwest China, where more than 1,000 fans from home and abroad gathered for lessons from 20 leading practitioners of the ancient Indian regimen, from June 17-21. Yoga is to India what perhaps tai chi is to China. Many countries other than India and China, also held the first World Yoga Day on June 21, after the United Nations last year agreed to Indian Prime Minister Narendra Modi's suggestion that a special day be marked in the year for the global practice of the stress-busting regimen, which is already a multibillion dollar industry in the United States. Modi said in the speech: "Yoga is an invaluable gift of India's ancient tradition. . It is not about exercise but to discover the sense of oneness with yourself, the world and nature."Zarthoshtimanesh, who runs his own yoga center, Iyengar Yogabhyasa, in the Indian financial capital of Mumbai, says: "Chinese students are very respectful. For me, all students are the same no matter what their race is and where they come from. The most important thing is to remove mental walls." Zarthoshtimanesh learned yoga from the late Yogacharya Iyengar and traveled with the master to different countries. Consulate General of India in southern China's Guangzhou city organized the Chengdu festival. A terrifying wooden bridge in China has just been replaced by a glass one. This,

    注意事项

    本文(毕业论文-基于AT89S52单片机控制的模拟汽车转向灯设计.doc)为本站会员(韩长文)主动上传,三一文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    经营许可证编号:宁ICP备18001539号-1

    三一文库
    收起
    展开