基于AT89C51单片机的LED显示控制系统.docx
- 文档编号:3954166
- 上传时间:2022-11-26
- 格式:DOCX
- 页数:24
- 大小:2.82MB
基于AT89C51单片机的LED显示控制系统.docx
《基于AT89C51单片机的LED显示控制系统.docx》由会员分享,可在线阅读,更多相关《基于AT89C51单片机的LED显示控制系统.docx(24页珍藏版)》请在冰豆网上搜索。
基于AT89C51单片机的LED显示控制系统
本文摘译自:
ApplicationofElectronicTechnique
外文文献原文:
DesignofLEDDisplayControlSystemBasedonAT89C52SingleChipMicrocomputer
Abstract—ThispaperintroducesdisplaydesignprocessabouthardwareandsoftwarebasedonAT89C52singlechipmicrocomputer.Weuseasimpleexternalcircuittocontrolthedisplayscreen,whichsizeis32×192.Thedisplayscreenalsocandisplaythesizeofthesix32×32dotmatrixChinesecharactersbyadynamicscanmode,andcanbedividedintotwosmalldisplayscreen,whichcandisplaytwenty-fourChinesecharacterswhosesizeis16×16.Wecanmodifythecodetochangethecontentofthedisplay,subtitlescanachievescrollingfunctionandthescrollspeedcanbeadjustedaccordingtorequirements,subtitlescanalsoachievepausefunction.TheChinesecharactercodestoredinexternaldatamemory,thecapacityofdatamemoryisexpandedaccordingtotherequirementsofChinesecharacterswewanttoshow.Thisdisplayscreenhasadvantagesofsmallvolume,fewhardwareandsimplecircuitstructure.
IndexTerms—LED,ChineseCharacterDisplay,AT89C52
I.INTRODUCTION
LEDdisplayhasbecomeanimportantsymbolofthecitylighting,modernizationandinformationsocietywithcontinuousimprovementandbeautificationofpeople'slivingenvironment[6].LEDlightscanbeseeninthelargeshoppingmalls,railwaystation,docks,undergroundstation,avarietyofmanagementwindowandsoon.LEDbusinesshasbecomeafast-growingnewindustry,ahugemarketspaceandbrightprospects[9].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[6].SCMhasexcellentcostperformance,smallsize,highreliability,strongcontrol,andwidelyusedinsmartinstruments,mechanicalandelectricalintegration,realtimeprocesscontrol,robotics,domesticappliances,fuzzycontrol,communicationssystemsandsoon.ThisarticledescribedthedesignbytheLEDdisplayrelevantprinciple,andthedesignofhardwareandsoftwarestructurearedescribedindetail,finally,wesimulatefortheoveralldesignandanalyzetheresults.
II.SystemOverallStructureDesign
SingleChipMicrocomputer(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[10].ThesystemwasrealizedbythecircuitrywhichismadeupofAT89C52chip,Clockcircuit,resetcircuit,columnscandrivercircuit,linedrivecircuitandthesix32×32LEDdotmatrix,theoverallstructureofLEDcharactersdisplayisshowninFig.1.Adisplayunitiscomposedofdotmatrixandtwo74HC154.Linedatasignalisdividedintotwoparts,whichisgivenbythetwo8255Arespectively,butthe8255AdataarefromtheP0portthemastercontrollerAT89C52.Thecolumnscanningsignalofeachcharacterwasgivenbythetwo74HC154,the74HC15412piecesandwasdividedintosixgroups.Theinputsignalof74HC154wasgivenbytheP1.0~P1.3ofAT89C52.Externaldatamemory6264connectedwiththeAT89C52theP0port.
Figure1TheoverallstructureofLEDcharactersdisplay
III.SYSTEMHARDWARECIRCUITDESIGN
A.CircuitDesignofMCUControlSystem
ThesizeofChinesecharactersis32×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),and12MHzcrystalX,capacitorC1andC2,anduseson-chiposcillatormode.Resetcircuitusesasimplepower-onresetcircuit,andmainlyconstituteofresistorR1,capacitorC3,connectedtotheAT89C52'sresetinputpin.
Figure.2.SCMcontrolsystemcircuit
BTheCircuitDesignofDisplayMemoryUnit
ThesizeofChinesecharactersis32×32inthedesign,eachcharactercomposedoffourpartswhichare(a),(b),(c),and(d),andeachpartcomposedoffourLEDmatrixwhichthesizeis8×8,circuitdecompositionmapofdisplayunitisshowninFig.3.
(A)(B)
(C)(D)
Figure.3.Circuitdecompositionmapofdisplayunit
Thelinesignalsof(a)~(b)aregivenbytwo8255A,1PA0~1PA7and1PB0~1PB7arePAandPBportof8255A-1,2PA0~2PA7and2PB0~2PB7arePAandPBportof8255A-2,therightfiguresrepresentcolumnscansignalswhichisgivenby74HC154.16columnstrobesareprovidedby74HC154,(a)~(d)requireseightsignal,respectively,so(a)and(b)sharea74HC154,(c)and(d)shareda74HC154.Displayacharacterneedtwo74HC154whichprovidecolumnscansignals.Whenthecircuitworks,the(a)~(d)isgatedbyscanningsignalinproperorder,onlyonewasgatedatatime,andothercolumnsareextinguished,thedisplayeddataisgivenbytwopiecesof8255Asimultaneously,thehumaneyewillseeastablecharacterbecauseofthehumaneye'spersistenceofvision.Inaddition,becausetheChinesecharacterforeachdisplayneeds128bytesstoragespace,butAT89C52microcontrollerchipisonly256bytesdatamemory,itisfarlessthanthedesignrequirements,sowetheexpandedstoragespaceby8K×8externaldatamemory6264.(a)(b)JOURNALOFCOMPUTERS,VOL.6,NO.4,APRIL2011719©2011ACADEMYPUBLISHER
CTheDesignofRanksDataUnitCircuit
Inte18255Aisauniversalprogrammableparallelinput/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.Figure.4.
Figure.4.Linedataunitcircuit
LinedataunitcircuitIndesignofthedisplayunitcircuit,thelinesdataaregivenbytwo8255A,asisshowninFigure4.ThisdesignusesdynamicdisplaymeanstodisplayChinesecharacters,whichcanbecontrolledthebythemeansoflineorcolumnscanning,Thesystemusesthemethodofcolumnscanningtocontrolscreen,SpecificcolumnscanningcircuitisshowninFigure5.Columnscanningcircuitcomposedof12piecesof74HC154.Twopiecesof74HC154provided32strobestodisplayacharacter.Theinputsignalof74HC154isP1.0~P1.3whichisprovidedbyAT89C52tocontrolscreen,but12piecesof74HC154wereusedinthedesign,theyworkaccordingtotheorder,theinputofanotherpieceof74HC154
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 基于 AT89C51 单片机 LED 显示 控制系统