




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
外文翻译基于ATC单片机的LED显示控制系统单片机(完整版)(文档可以直接使用,也可根据实际需要修改使用,可编辑欢迎下载)
基于AT89C51单片机的LED显示控制系统外文翻译基于ATC单片机的LED显示控制系统单片机(完整版)(文档可以直接使用,也可根据实际需要修改使用,可编辑欢迎下载)摘要本次设计完成基于AT89C52单片机的LED显示控制系统软硬件的设计。我们用一个简单的外部电路控制尺寸为32*192的显示屏,通过一个动态显示模块,这个显示屏也能显示六个32*32的汉字,也能分成两个小的显示屏,能够显示24个16*16的汉字。我们能通过修改程序来改变显示内容。字幕可以实现滚动功能且滚动速度可以根据要求调节,屏幕也具有暂停功能。汉字代码储存在数据存储器中,储存器的容量可以根据显示汉字的需要扩展。该显示屏具有低电压,硬件电路简单等优点。关键字LED/汉字/AT89C521简介LED显示屏已成为一个重要的标志,在城市照明、现代化、信息社会不断的改善和美化人们的生活环境。LED灯可以应用于大型购物商场、车站、码头、地下车站,各种管理窗口等等。LED产业已成为一个快速增长的新兴产业,具有巨大的市场空间和前景。一些元器件的显示装置的模构通常是由显示模块、控制系统和电力系统。显示模块构成的网格结构由领导,并负责发光显示;屏幕上可以显示文本,图片、视频等,在相应的区域控制系统操控LED光亮或黑暗;电力系统是一个负责屏幕上转换输入电压和电流流进的电压和电流。LED点阵显示提取显示字符的字体通过PC,通过单片机,然后显示在点阵屏,主要用于室内和室外的显示。LED点阵显示可分为图形显示,图像显示和视频显示器显示。相比提高了图像显示的特点图形,无论它是在这两种颜色单色或彩色显示。因此,图形显示不仅反映丰富的颜色,而且录像显示清晰、彩色图像,也表现在电视和电脑的信号。虽然三者之间有一些差异,但是最基本的原则是类似。2系统整体结构设计单片机(SCM)模型选择相应的目标、功能、可靠性、成本,精度和速度控制系统。根据这个主题的实际情况,选择不同的配置管理模型主要考虑从以下两个方面:第一,供应链管理具有较强的抗干扰能力;第二,单片机具有较高的性价比。mcs51汇编语言是由于广泛应用在中国,有更多的需求,还可以配合外围芯片。ATMEL公司,引进了一种新的一代单片机,即89系列,并通过对典型的产品测试具有较高的性能和较低的成本。AT89C52是一种低电压、高性能CMOS8位单片机,包括了8k只读芯片程序内存(PEROM)可以重复删除,256字节随机的存取数据存储器(RAM),装置采用高密度非易失性存储器存储技术。8052年产品,而芯片内置的通用8位元中央处理器(CPU)、Flash存储单元,可以应用到更复杂的控制系统中。该系统实现要求的电路是由AT89C52芯片、时钟电路、复位电路,列扫描驱动电路、行线驱动电路和6个32×32LED点阵。显示单位由两个74HC154输入点阵数据。串行数据信号分为两个部分,分别给两个8255,8255的数据来自AT89C52主控制器。扫描信号的每个字是由这两个74HC154,分为6组来输入。信号是由74HC154,AT89C52的P1.0~P1.3,外部数据存储器6264与AT89C52共同来控制数据输入。3系统的硬件电路设计3.1核心控制系统电路的设计汉字的大小是16×16,但是单片机I/O端口不能满足设计的要求,因此I/O端口必须扩展。数据端口实现扩展是两个8255来实现的。通过74HC373的低八个地址来给6264提供的信号,但高八个地址所提供的信号P2.0~P2.7,74HC139是2-4解码器,其输入信号由P2.6控制,单片机提供了控制外部的I/O设备,因为这个系统有超过一个的外部的装置,确保他们不应该是干扰的,因此保证他们的地址是唯一的,不重复。时钟电路由AT89C52的18、19脚从时钟侧(XTALI和XTAL2),和12兆赫晶体,电容C1和C2。3.2显示存储单元设计汉字显示设计大小为32×32显示屏,每个字符包括四个部分,每一个包括四个矩阵大小是8×8的小点阵块。显示一个字符需要两个74HC154列扫描信号来提供。电路是通过动态扫描信号来显示,单片机把要求显示的数据传给了两个8255。这样人类的眼睛会看到一个稳定的图像。因为人类的眼睛视觉停留的现象。此外,因为汉字每一个显示需要128字节的存储空间,但AT89C52单片机芯片只有256字节数据存储器,它是远低于设计要求,所以我们扩大了存储空间采用8×8K外部数据存储器6264来实现的。3.3数据输入单元设计8255Inte1是一种通用可编程并行输入/输出接口芯片。它的功能可通过设定软件程序,具有很强的通用性。它可以直接通过数据总线连接到中央处理器外部设备,使用方便、灵活。Inte18255A有三个8位并行接口芯片的输入和输出端口、编程方法可以被用于设置三个端口作为输入端口或输出端口。当这些数据通过数据总线上的CPU,采用无条件转让、查询传输或中断传输。当端口C作为一个数据端口,它不仅可作为8位数据端口,但也分别的作为两个4比特数据端口,可以设置一个特定的一些输入或输出,就这样提供了便利的条件控制。在显示单元电路的设计,这些线条数据送给两个8255。这个设计使用动态显示方式。显示中文可以控制行或列扫描,系统采用的方法列扫描控制屏幕。列扫描电路由12块74HC154。两块提供74HC154传送显示一个字符。74HC154输入信号是P1.0~P1.3提供通过AT89C52来控制的。3.4串行通信接口设计PC和单片机通过串行通信联系方式。为了实现串行通讯单片机与PC机采用串口通信方式,接口是标准RS-232。在PC机的输出电压的RS-232C端口±12V。考虑到单片机和PC短距离通信,单片机主要负责接收的命令和数据。从信号PC机的TXD-side都变成一个电流信号通过交流电路,红外光-发光二极管的电流有一个信号发生,灯发出的信号二极管投射到了phototransistor,并转换为电信号,然后输入到单片机RXD身边,所以光电转换已经实现,并且电气完全隔离以避免反馈干扰的输出端所产生。4软件设计整个软件设计的主要构成由显示程序和通讯程序。汉字显示的数据传输控制显示函数采用动态扫描。主机软件实施视觉显示效果。在标准串行通信,可以设置的串行通讯数据发送和接收,便于单片机与PC机间通信。为了保证可靠的通讯,确保双方都相同的数据格式和波特率,该设计采用RS-232通讯,10位数据格式,9600位/秒波特率。软件程序由一开始,初始化,显示程序。字符编码储存在静态的6264,配置管理工具将等待信号给出。当P3.0是低电平时,显示程序开始运行。首先,控制到8255年控制字写端口,8255工作采用模式0的方式。在控制完成后,将会把显示的数据转移到8255上,一排一排的数据输入,每个第一排的信号控制下一排的开启信号。在单片机是封闭的数据传输后,这样的第一列显示数据,然后叫延迟程序显示内容的稳定。第二列数据读取程序延迟后结束了,下一个行是封闭的,所以第二栏里的数据也是如此显示,等等。因为屏幕尺寸是32×192,192行显示,显示屏可以构成一幅稳定而且完整的图像。总结LED显示系统的设计采用了主机和从属结构、主机电脑,供给从属电脑显示器上系统通过串行通信接口,它可以实现字符串修改、展示模式设置,时间设置和其他功能;单片机控制从属结构为主结构显示LED点阵显示屏。汉字显示是32×32点阵模型,实现实时显示屏幕显示的变化,显示当前日期和时间。LED点阵的设计显示控制系统具有电路简单、稳定、低功率消耗、寿命长、易于显示等特点。只要通过扩展单片机的I/O,同时增加不同的LED点阵和相关驱动芯片,你就可以设计一个更大的面积和更多LED显示屏。本文提供了一些理论和实践的参考价值。DesignofLEDDisplayControlSystemBasedonAT89C52SingleChipMicrocomputerABSTRACTThispaperintroducesdisplaydesignprocessabouthardwareandsoftwarebasedonAT89C52singlechipmicrocomputer.Weuseasimpleexternalcircuittocontrolthedisplayscreen,whichsizeis32×192.Thedisplayscreenalsocandisplaythesizeofthesix32×32dotmatrixChinesecharactersbyadynamicscanmode,andcanbedividedintotwosmalldisplayscreens,whichcandisplaytwenty-fourChinesecharacterswhosesizeis16×16.Wecanmodifythecodetochangethecontentofthedisplay,subtitlescanachievescrollingfunctionandthescrollspeedcanbeadjustedaccordingtorequirements,subtitlescanalsoachievepausefunction.TheChinesecharactercodestoredinexternaldatamemory,thecapacityofdatamemoryisexpandedaccordingtotherequirementsofChinesecharacterswewanttoshow.Thisdisplayscreenhasadvantagesofsmallvolume,fewhardwareandsimplecircuitstructure.KEYWORDSLED,ChineseCharacterDisplay,AT89C52I.INTRODUCTIONLEDdisplayhasbecomeanimportantsymbolofthecitylighting,modernizationandinformationsocietywithcontinuousimprovementandbeautificationofpeople'slivingenvironment.LEDlightscanbeseeninthelargeshoppingmalls,railwaystation,docks,undergroundstation,andavarietyofmanagementwindowandsoon.LEDbusinesshasbecomeafast-growingnewindustry,ahugemarketspaceandbrightprospects.Thetext,pictures,animationandvideoaredisplayedbyLED’slight,andcontentcanbechanged.Somecomponentsarethedisplaydevicesofthemodularstructure,andwhichusuallyconsistsofadisplaymodule,controlsystemandpowersystem.ThedisplaymoduleisconstitutedbythelatticestructurewhichconsistsofLED,andisresponsibleforlight-emittingdisplay;thescreencandisplaytext,pictures,videoandsoonbycontrolsystemwhichcancontrollightordarkofLEDinthecorrespondingregion;Powersystemisresponsiblefortransforminginputvoltageandcurrentintovoltageandcurrentwhichthescreenneeds.LEDdotmatrixdisplayextracteddisplaycharacterfontthroughPC,andsenttothemicrocontroller,thendisplayedinthedotmatrixscreen,whichmainlyusedfordisplayofindoorandoutdoorcharacters.LEDdotmatrixdisplaycanbedividedintographicdisplay,imagedisplayandvideodisplaybydisplayedcontent.Comparedwiththeimagedisplay,thecharacteristicsofgraphicdisplayisnodifferenceingraycolorwhetheritismonochromeorcolordisplay.Therefore,graphicdisplayalsofailstoreflecttherichnessofcolor,andvideodisplaycannotonlyshowexercise,clearandfull-colorimages,butalsoshowtelevisionandcomputersignals.Althoughtherearesomedifferencesbetweenthethree,butthemostbasicprinciplesaresimilar,II.SystemOverallStructureDesignSingleChipMicrocomputer(SCM)modelswereselectedaccordingtothetarget,function,reliability,cost,accuracyandspeedofthecontrolsystem.Accordingtotheactualsituationofthesubject,thechoiceofSCMmodelsmainlyconsideredfromthefollowingtwoaspects:First,SCMhasstronganti-interferenceability;Second,SCMhasahighercost-effective.DuetoMCS-51iswidelyusedinChina,hasmoreinformationandcancompatiblewiththemoreperipheralchipstoo,inparticular,ATMELCorporation,introducedanewgenerationmicrocontrollerin2003,thatis89Sseries,anditstypicalproductswithhighperformanceandlowcostmicrocontrollerisAT89C52.AT89C52isalowvoltage,high-performanceCMOS8-bitmicrocontroller,thechipincludes8KBread-onlyprogrammemory(PEROM)whicherasecanberepeated,256byterandomaccessdatamemory(RAM),devicesadopthigh-densitynonvolatilememorytechnologytoproduce,compatiblewiththestandardMCS-51instructionsetandthe8052products,whilethechipbuilt-ingeneral-purpose8-bitcentralprocessing(CPU).Flashstorageunit,canbeappliedtothemorecomplexcontrolapplications.ThesystemwasrealizedbythecircuitrywhichismadeupofAT89C52chip,Clockcircuit,resetcircuit,columnscandrivercircuit,linedrivecircuitandthesix32×32LEDdotmatrix,theoverallstructureofLEDcharactersdisplayisshowninFig.1.Adisplayunitiscomposedofdotmatrixandtwo74HC154.Linedatasignalisdividedintotwoparts,whichisgivenbythetwo8255Arespectively,butthe8255AdataarefromtheP0portthemastercontrollerAT89C52.Thecolumnscanningsignalofeachcharacterwasgivenbythetwo74HC154,the74HC15412piecesandwasdividedintosixgroups.Theinputsignalof74HC154wasgivenbytheP1.0~P1.3ofAT89C52.Externaldatamemory6264connectedwiththeAT89C52theP0port.III.SYSTEMHARDWARECIRCUITDESIGNA.CircuitDesignofMCUControlSystemThesizeofChinesecharactersis32×32,butmicrocontrollerhas32I/Oport,andcan’tmeetdesignrequirements,sotheI/Oportmustexpand,thedataportexpansionwasimplementedbytwo8255A.ThedataportexpansionisshowninFig.2,74HC373istheaddresslatch,andlatchloweightaddress,theloweightaddresssignalsof6264providedbyit,butthehigheightaddresssignalsof6264providedbyP2.0~P2.4,Internalportof8255AwaschosenbyA0andA1.74HC139is2-4decoder,whoseinputsignalsareprovidedbyP2.6andP2.7ofSCM,andprovidedstrobefortheexternalI/Odevices,becausethesystemhasmorethanoneexternaldevice,makesurethattheycannotbegated,sothattheiraddressesistheonlyanddonotrepeat.TheclockcircuitofAT89C52composedof18,19feetfromtheclockside(XTALIandXTAL2),and12MHzcrystal,capacitorC1andC2.BTheCircuitDesignofDisplayMemoryUnitThesizeofChinesecharactersis32×32inthedesign,eachcharactercomposedoffourpartswhicheachpartcomposedoffourLEDmatrixwhichthesizeis8×8,circuitdecompositionmapofdisplayunit.Inaddition,becausetheChinesecharacterforeachdisplayneeds128bytesstoragespace,butAT89C52microcontrollerchipisonly256bytesdatamemory,itisfarlessthanthedesignrequirements,sowetheexpandedstoragespaceby8K×8externaldatamemory6264.CThecommunicateDesignofPcInte18255Aisauniversalprogrammableparallelinput/outputinterfacechip.Itsfunctioncanbesetthroughthesoftwareprogram,andhasastrongversatility.ItcanbedirectlythroughtheCPUdatabusconnectedtoexternaldevices,easytouseandflexible.Inte18255Ainterfacechiphasthree8-bitparallelinputandoutputports,programmingmethodscanbeusedtosetthreeportsasinputportsoroutputports.Chipsworkhavethebasicinputandoutput,strobeinput/outputandbidirectionalinput/output.WhenthedataweretransmittedbydatabusofCPU,itscanchoosetounconditionallytransfer,querytransmissionorinterrupttransmission.DuringInte18255Achipthree-port,theportCcanbeusedasnotonlythedataport,butalsothecontrolport.WhentheportCistakenasadataport,itcanbeusedasnotonly8-bitdataport,butalsoseparatelyastwo4-bitdataport,andeachbitoftheportCcanbeoperated,cansetaparticularbittoinputoroutput,soprovideconvenientconditionsforbitscontrol.DSerialCommunicationInterfaceCircuitPCandSCMarelinkedviaaserialcommunicationinterface.InordertoimplementserialcommunicationfunctionbetweenMCUandPC,andserialinterfacelevelofSCMwillbechangedintostandardRS-232Clevel.MCUandPC,takingintoaccounttheshortdistancecommunication,andmicrocontrollerismainlyresponsibleforreceivingcommandsanddata,sothePCisdirectlyconnectedwiththemicrocontroller,thisisthesimplestconnectionmethod.thesignalswhichisfromPac’sTXD-sidewerechangedintoacurrentsignalthroughthecommunicationcircuit,theinfraredlightemittingdiodesofoptocouperhavecurrentwhenasignaloccurs,thelightsignalswhichisemittedbydiodeprojectedontotheandphototransistor,convertedtoelectricsignal,theninputtothemicrocontrollerRXDside,sophotoelectricconversionisimplemented,andelectricaliscompletelyisolatedtoavoidthefeedbackandinterferencewhichisproducedbyoutputside.IV.SOFTWAREDESIGNTheentiresoftwaredesignmainlycomposesofdisplayprogramandcommunicationprogram.TheChinesecharacterstobedisplayedonthescreen,characterandotherdatafortransmissioncontrolanddisplayfunctionswereachievedbydynamicscan.RealtimecommunicationpartswhichcommunicatewithPCreceivedatainformationbySCMserialdisruption,soreal-timedatainformationtransmissionwithPCwasimplemented.ThehostcomputersoftwarewasimplementedbyVisualBasic.Inthestandardserialcommunication,MSCOMMwhichisthepowercommunicationcontrolisprovidedbyVB,itcansettheserialcommunicationofdatasentandreceived,andtheserialcommunicationportStatus,messageformatsandprotocolsareset,directlysenddatabyPac’sRS-232/RS-485serialports.InordertorealizedtoPCreliablecommunicationwithSCM,andensurethatbothsideshavethesamedataformatandbaudrate,thisdesignusesRS-232communications,a10bitsdataformat,9600bit/sbaudrate.Softwareprogramcomposedofthebeginning,initialization,displayprogram,front,whichthemainCharactercodestoredinthestaticmemory6264,andtheSCMwillwaitforsignalisgiven,thatis,theinputsignalofSCMpinP3.0.WhenP3.0isfromlowtohigh,displayprogrambegintoberun.First,controlwordswrittento8255Acontrolport,8255Aworkintheformofmode0inthedesign.Aftercontrolwordwasfinished,thedatawillbedisplayedwhichistransferredtothe8255Afromthe6264,thedisplaydataisoutputforfourtimesbecausethelinewidthofthecharactersscreenis32,arowofdataisinputandtransportedfromtoptobottomeach,signalofthefirstrowswhichiscontrolledbySCMisgatedafterdatatransmissionisover,sothefirstcolumndataisdisplayed,thencalldelayprocedurestodisplaythecontentsofthestable.thenextcolumnofdataisreadafterdelayproceduresisover,andthenextrowisgated,sothatthesecondcolumnofdataisalsodisplayed,andsoon,becausethescreensizeis32×192,192rowsareshown,and192rowsconstituteanimage.Then,scanningbeginfromthefirstcolumn,andthestartingaddressofdisplaydatabackwardshiftonthebasisoftheoriginal,whichhasanaddressoverflowissues,itwillassignstartaddresstotheaddresspointerwhenthedataaddressisoverflow,thedisplaydatacontentwillbeconstantlyrepeated.FlowchartofcommunicationwithPC
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 工业环保技术与减排策略
- 工业节能减排的技术路径与措施
- 工作技能与专业能力的提升路径
- 工作之余的健康营养生活方式养成建议
- 工作压力下的时间分配艺术
- 工作场所技能需求的调研与分析
- 工程中遇到的技术难题与创新实践
- 工程中的计算机仿真技术应用
- 工程师培训中数据挖掘技术的应用
- 工程伦理在水利工程中的实践研究
- 2024年教师资格考试小学面试科学试题及答案指导
- (一模)宁波市2024学年第一学期高考模拟考试 数学试卷(含答案)
- 2024年迪庆道路旅客运输知识考试题库
- 公司事故隐患内部报告奖励机制
- 上海市市辖区(2024年-2025年小学四年级语文)统编版期末考试((上下)学期)试卷及答案
- 小超市食品安全管理制度
- β内酰胺类抗菌药物皮肤试验指导原则2024课件
- 全过程工程咨询管理服务方案投标方案(技术方案)
- 皮肤科进修后汇报
- 表观遗传学智慧树知到期末考试答案章节答案2024年东北师范大学
- 兰州大学强基计划试题
评论
0/150
提交评论