您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 其它行业文档 > ARM嵌入式课程设计交通灯的设计
CHANGSHAUNIVERSITYOFSCIENCE&TECHNOLOGY课程设计(论文)课程:嵌入式系统A题目:基于ARM的交通灯设计学生姓名:学号:班级:07-01班专业:自动化指导教师:2010年12月长沙理工大学课程设计任务书电气与信息工程院(系)自动化专业自动化07-1,2班级课程名称嵌入式系统A题目基于ARM的交通灯设计一设计要求利用ARM芯片模拟实现交通灯控制二设计作用和目的1、注重培养综合运用所学知识、独立分析和解决实际问题的能力,培养创新意识和创新能力,并获得科学研究的基础训练。2、了解所选择的ARM芯片各个引脚功能,工作方式,计数/定时,I/O口,中断等的相关原理,并巩固学习嵌入式的相关内容知识。3、通过软硬件设计实现利用ARM芯片完成交通灯控制功能。三课程设计应完成的任务1查阅相关文献资料,熟悉所选ARM芯片2总体设计方案规划,设计车辆遇到红灯停绿灯行情况,红绿灯时间均为60s,切换时间为10s,最后5s为黄灯闪烁3系统硬件设计,熟悉IO接口,定时器计数器工作原理4系统软件设计,包括交通信号灯的工作流程软件实现,用C语言编程5设计心得体会及总结工作计划时间:本课程设计安排时间为2010年12月6日至12月19日共2周,即第15,16周,共2周进度安排:第15周熟悉资料,构思结构,第16周分析课题,撰写设计报告指导教师系意见同意按任务书要求设计系主任签字课程设计用纸教师批阅基于ARM嵌入式系统的交通灯设计摘要:随着移动设备的流行和发展,嵌入式系统已经成为一个热点。它并不是最近出现的新技术,只是随着微电子技术和计算机技术的发展,微控制芯片功能越来越大,而嵌入微控制芯片的设备和系统越来越多,从而使得这种技术越来越引人注目。它对软硬件的体积大小、成本、功耗和可靠性都提出了严格的要求。嵌入式系统的功能越来越强大,实现也越来越复杂,随之出现的就是可靠性大大降低。最近的一种趋势是一个功能强大的嵌入式系统通常需要一种操作系统来给予支持,这种操作系统是已经成熟并且稳定的,可以是嵌入式的Linux,WINCE等等。本文所要研究的就是基于ARM嵌入式系统的交通灯系统的设计与实现。本设计采用了飞利浦的32位ARM微处理器LPC2138作为核心处理器【关键词】嵌入式系统ARMLPC2138交通灯UndertheARMembeddedsystem’sthesystemoftrafficlightsAbstract:Withtheprevalenceofmobiledevicesanddevelopmentofembeddedsystemshasbecomeahotspot.Itisnotarecentemergenceofnewtechnology,justasmicro-electronicstechnologyandthedevelopmentofcomputertechnology,micro-chipcontrolfunctionsmoreandmore,andcontrolofmicro-chipsembeddedintheequipmentandsystemsmoreandmore,makingthetechnologymoreReplyPeopleattention.Hardwareandsoftwareofitssize,cost,powerconsumptionandreliabilityhavemadestringentrequirements.Embeddedsystemsfunctionmorepowerful,andmoreandmorecomplicated,thenthereisthereliabilitygreatlyreduced.Arecenttrendisapowerfulembeddedsystemsusuallyneedaoperatingsystemtosupporttheoperatingsystemisalreadymatureandstable,canbeembeddedLinux,WINCE,andsoon.ThispaperistostudyundertheARMembeddedsystem’sthesystemoftrafficlightsdesignandimplementation.ThisdesignusesPhilips's32astheLPC2138ARMmicroprocessorcoreprocessors.【Keywords】EmbeddedSystemsARMLPC2138trafficlights课程设计用纸教师批阅目录一设计的目的与意义················································································-1-二设计的内容··························································································-1-三设计方案·····························································································-1-3.1设计思路····························································································-1-3.2总体设计框图······················································································-2-四硬件设计·····························································································-3-4.1LPC2138芯片介绍及设计·······································································-3-4.2LPC2138芯片最小系统硬件设计······························································-4-4.3系统电源电路设计················································································-4-4.4晶振与复位电路···················································································-5-4.5LED循环显示设计················································································-5-4.6数码管倒计时显示硬件设计····································································-6-4.7蜂鸣器设计·························································································-7-五软件设计·····························································································-8-5.1交通灯控制软件流程图··········································································-8-5.2ARM交通灯模拟控制程序设计································································-9-六设计心得体会及总结············································································-10-七参考文献····························································································-11--1-课程设计用纸教师批阅一设计的目的与意义通过设计,培养自己综合运用所学知识、独立分析和解决实际问题的能力,培养创新意识和创新能力,并获得科学研究的基础训练,加深对ARM芯片的了解;熟悉ARM芯片各个引脚的功能,工作方式,计数/定时,I/O口,中断等相关原理,巩固学习嵌入式的相关内容知识。二设计的内容利用ARM芯片模拟实现交通灯控制。自行选择所需ARM芯片,查阅相关文献资料,熟悉所选ARM芯片,了解所选ARM芯片各个引脚功能,工作方式,计数/定时,I/O口,中断等相关原理,通过软硬件设计实现利用ARM芯片完成交通灯的模拟控制。三设计方案3.1设计思路利用LPC2131ARM芯片实现单路交通灯的控制:a实现红、绿、黄灯的循环控制。使用红、黄、绿三种不同颜色的LED灯实现此功能,由南往北方向红、黄、绿三个灯依次接在P1.18、P1.19、P1.20上,由北往南方向的红、黄、绿三个灯依次接在P1.21、P1.22、P1.23上,人行道用红、绿两个灯控制,依次接在P1.24、P1.25上,用软件控制灯的亮与灭来控制车辆和行人的通行。b用数码管显示倒计时。可以利用动态显示或静态显示,串行并出或者并行并出实现。c南北方向控制车辆的绿灯熄灭的同时,控制蜂鸣器响2秒来作为警报。蜂鸣器接P0.7引脚。-2-课程设计用纸教师批阅交通路口示意图如图3.1车辆遇到红灯停绿灯行的行走情况,红绿灯时间均为60s,切换时间为10s,最后5s为黄灯闪烁。图3.13.2总体设计框图用ARM7系列芯片LPC2138作为系统的主控芯片,控制交通灯的循环点亮并显示灯亮时间(采用倒计时显示),当定时时间到的时候控制蜂鸣器响来提醒人们注意红绿灯的状态。图3.2公共场所公共场所交通等循环蜂鸣器LPC2131最小系统倒计时显示-3-课程设计用纸教师批阅四硬件设计根据设计任务要求,自行选择电子元件,画出电气原理图,并调试。一个完整的系统除了主控芯片以外,还需配上电源系统、时钟电路、复位电路等。独立的芯片是不能工作的。4.1LPC2138芯片介绍及设计LPC2138是基于一个支持实时仿真和嵌入式跟踪的32位ARM7TDMI-STMCPU的微控制器,并带有32kB的嵌入的高速Flash存储器。128位宽度的存储器接口和独特的加速结构,使32位代码能够在最大时钟速率下运行。对代码规模有严格控制的应用可使用16位Thumb.模式将代码规模降低超过30%,而性能的损失却很小。较小的封装和极低的功耗使LPC2131可理想地用于小型系统中,具有以下一些特性:小型LQFP64封装8k的片内静态RAM和32k的片内Flash程序存储器。片内Boot装载软件实现在系统/在应用中编程(ISP/SAP)单扇区或整片擦除时间为400ms。256字节行编程时间为1ms。1个10位D/A转换器两个32位定时器/计数器(带四路捕获和四路比较通道)、PWM单元(6路输出)和看门狗实时时钟具有独立的电源和时钟源,在节电模式下极大地降低了功耗多个串行接口,包括2个16C550工业标准UART、2个高速I2C接口(400kbit/s)、SPITM和具有缓冲作用和数据长度可变功能的SSP。多达47个5V的通用I/O口;向量中断控制器,可配置优先级和向
本文标题:ARM嵌入式课程设计交通灯的设计
链接地址:https://www.777doc.com/doc-3604530 .html