资源描述:
《微机灯光控制系统》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、摘要本设计采集8位开关输入信号,若输入数据为“0“时,将其修改为”1“定输入的硬件接□电路。采样输入开关量,并存入NUM的软件程序段。以12个灯依次点亮为例(即灯光控制模式Ml),考虑与其相应的灯光显示代码数据。确定显示代码数据输出的接□电路。输出—个同期显示代码的软件程序段(暂不考虑时隙的延时要求)。应用定时中断服务和"UM数据,实现t=Nxl/18.2S的方法。实现某一种模式灯光显示控制中12个时隙一个周期,共重复四次的控制方法。要求在每一时隙开始采样开关输入数据N5I,并以此控制每一时隙的延时时间;在每一时隙结束时,检查有无键按下,若有任意一个键按下,则结
2、束灯光控制,返回DOS系统。通过人机对话,输入8种灯光显示控制模式的任意个数、任意次序连接组合的控制模式数据串(以ENTER键结尾)。对输入的数据进行检查,若数据都在1~8之间,则存入INBUF;若有错误,则通过屏幕显示输入错误,准备重新输入灯光显示控制模式数据。依次读取INBUF中的控制模式数据进行不同模式的灯光显示控制,在没有任意键按下的情况下,系统从第一个控制模式数据开始,顺序工作到最后一个控制模式数据后,又返回到第一个控制模式数据,不断重复循环逬行灯光显示控制。本系统的软件系程序在总体上有两部份,即主程序(MAIN)和实时中断服务程序(TNTT)。讨论以
3、功能明确、相互界面分割清晰的软件程序模块化设计方法。即确定有关功能模块,并画出以功能模块表示的主程序(MAIN)流程框图和定时中断服务程序的流程框图。关键词?8位开关输入信号;实时中断服务程序;软件程序段。ABSTRACTThedesigncollectioneightswitchtheinputsignal,iftheinputdatafortheH0,itwasrevisedtoTwillenterthehardwareinterfacecircuit.EntersamplingSwitchanddepositedintothesoftwareprogra
4、moftheNUM.Thelightswerelit12asanexample(thatis,lightingcontrolmodeMl),considerthelightingdisplaytheircorrespondingcodedata・Determinetheoutputdatashowthatthecodeinterfacecircuit.Overthesameperiodshowthattheoutputofacodeofthesoftwareprogram(nottoconsiderthedelayrequesttimeslot).Applica
5、tionNUMregularlyinterruptedservicesanddata,andt=Nx1/18.2Smethod.Achieveacertainmodeoflightingcontrolsinthe12slotcycle,atotaloffourtimestorepeatthecontrolmethod・RequirementsineachtimeslotbeginningofsamplingswitchinputdataNUM,andeachtimeslottocontrolthedelaytimeattheendofeachslot,press
6、thebuttontocheckfor,ifanyclickofabutton,theendoflightingcontrol,toreturntoDOSSystem・Throughhuman-machinedialogue,theimportationofeightkindsoflightingdisplay-and-controlmodelofarbitrarynumber,arbitraryorderofconnectionThecombinationofcontrolmodedataseries(attheendoftheENTERkey).Onthei
7、mportationofdatainspection,ifthedataarebetween1to&intoINBUF;iferrors,thenthroughthescreeninputerror,readytore-enterthelightingdisplaycontrolmodedata・INBUFwerereadinthecontrolmodedatashowdifferentpatternsoflightcontrol,intheabsenceofanybuttonpressthecase,acontrolsystemfromthemodeldata
8、,thesequence