模拟停车场管理系统的设计.doc

上传人:小飞机 文档编号:4281889 上传时间:2023-04-13 格式:DOC 页数:27 大小:157.50KB
返回 下载 相关 举报
模拟停车场管理系统的设计.doc_第1页
第1页 / 共27页
模拟停车场管理系统的设计.doc_第2页
第2页 / 共27页
模拟停车场管理系统的设计.doc_第3页
第3页 / 共27页
模拟停车场管理系统的设计.doc_第4页
第4页 / 共27页
模拟停车场管理系统的设计.doc_第5页
第5页 / 共27页
点击查看更多>>
资源描述

《模拟停车场管理系统的设计.doc》由会员分享,可在线阅读,更多相关《模拟停车场管理系统的设计.doc(27页珍藏版)》请在三一办公上搜索。

1、模拟停车场管理系统的设计辽东学院信息技术学院可编程逻辑器件原理及应用教学实习报告模拟停车场管理系统的设计学生姓名: 学 号: 0915110606 班 级: B1106 专 业: 电子信息工程 指导教师: 2014年07月【摘要】随着人民生活水平的提高,我国汽车保有量不断提升,私家车的数量越来越多,在生活小区、办公场所、商场、旅游景点等地方,停车难问题也日益突出。 解决停车难问题,除了加大基础设施投入(扩建停车场)外,有效地对现有的停车场进行合理分配、调度与管理,也是行之有效的措施,因而建设配套的停车场管理系统,对停车位进行有序地管理十分必要。 目前,无论在生活小区或是在写字楼宇的建设规划中,

2、均已对停车位的规划配备进行了充分考虑,停车场已成为人们生活服务的必备场所之一,停车场的数目增多,对停车场管理系统产生了强大的市场需求。 基于上述两点需求,本文设计了一套停车场管理系统,从地感线圈、道闸、吐卡机、主控板到微机管理系统,全套软硬件系统实现了对场内车位有序地分配与调度。本文将从整体方案、硬件设计、软件设计、安装实施等方面进行全面地介绍该系统。同时,本套系统在比较市场同类产品的基础上,独到地将停车管理中的日常处理从上位机(微机)移至下位机(主控板),降低了整个系统对微机的依赖,显出了自己的竞争优势。【关键词】:停车场、 管理系统、 无线射频卡 【Abstract】With the im

3、provement of peoples living standard, car ownership in China is rising, more and more people own private cars, in the living quarters, offices, shopping malls, tourist attractions and other places, parking difficult issues are also increasingly prominent. To solve the parking problem, in addition to

4、 increase the investment of infrastructure (expansion of parking lot), effectively carries on the rational distribution, the existing parking lot scheduling and management, is the effective measure, parking management system and construction, the parking spaces for orderly management is very necessa

5、ry. At present, no matter in the living quarters and office building planning, have parking space with the planning for a full account, parking has become one of the necessary place living services, the number of parking lots more, produced a strong market demand for parking management system. Based

6、 on the above two demands, this paper designs a set of parking management system, induction coil, main control gate, temple card machines, plate to the microcomputer management system from the ground, a full set of hardware and software system of the parking spaces and orderly allocation and schedul

7、ing. This paper from the overall system design, hardware design, software design, installation and other aspects of the implementation of a comprehensive introduction to the system. At the same time, the system based on the comparison of similar products on the market, will be unique to the daily ma

8、nagement of parking from the host computer (PC) to the next machine (main control board), reduce the entire system to rely on the computer, showing its competitive advantage.Keywords:The parking lot, management system, radio frequency card目录绪论11系统工作原理21.1 基本原理22 设计22.1系统结构设计及分析22.2分频模块42.3消抖模块42.4车牌

9、显示模块52.5 计时模块52.6费率器模块62.7滚动模块62.8译码模块73 使用说明84 结论8参考文献9附录A 源程序10附录B 系统原理图20绪论 近年来,随着中国经济的快速增长和国民收入的不断提高,汽车拥有量也日益增多,汽车已经逐步走进千家万户,使很多城市出现了“停车难”问题。为了满足日益增长的停车需求,大型、超大型停车场不断涌现,传统停车场管理系统已不能满足实际需求。存在的问题突出表现在:现有的停车场管理系统要求车辆在出入停车场时须停车验卡,车辆进出极其缓慢,经常造成上、下班堵车现象,不仅浪费时间,能源浪费也非常严重;随着停车场中车辆数量的增加,管理工作量和难度都成倍加大,传统停

10、车场管理系统在安全性和效率方面暴露出严重的缺陷。因此,对现有的停车场管理系统进行升级更新,是停车场建设中的当务之急。 本文针对上述实际问题,通过研究开发射频识别技术和红外通信技术,设计实现了一种远距离智能识别的停车场管理系统,以解决传统停车管理系统存在的问题。本设计基于射频芯片,设计了无线阅读器和无线智能电子标签通信系统,解决了远距离自动识别车辆信息的问题;所设计的车辆无线阅读识别系统与后台计算机管理系统相联结,便形成了一个功能强大和系统完善的远距离智能车辆识别系统。系统可以实现远距离车辆信息自动识别,实现车辆自动安全检测管理和收费等功能;系统还具有图像比对校验,车辆数据网络自动更新等新功能。

11、远距离智能识别停车场管理系统将新颖的生活理念和建筑艺术、信息技术、计算机技术等现代高科技完美结合,提供的是一种操作简单、使用方便、功能先进的人性化系统。1系统工作原理1.1 基本原理当一辆车进入停车场,按键A被按下:计时器开始计时,同时把该车的车牌号和费率送入数码管显示(3个数码管显示拨码开关对应的十进制数:采用BCD码转换的方法;费率显示采用输入设置,可以通过按键+1的方式设置从199的费率)。当车驶出停车场时,按键被按下,此时计时器停止计时,并把计时时间送入数码管显示(2位小时数、两位分钟数),同时显示车牌号信息及停车费用(三位显示:停车费用停车时间费率)。由于数码管位数不够采用滚动显示的

12、方式。2 设计2.1系统结构设计及分析本系统主要包括以下七个模块:分频模块fpq,车牌BCD转换模块chepai,消抖模块xiaodou,计时模块jishi,费率模块feilvqi,滚动模块gundong,译码器模块ymq。先通过VHDL文本生成这些模块,再在顶层文件中调用这些模块。系统的主程序流程图如图1所示。图12.2分频模块该模块对实验箱上的50MHz时钟进行分频,分成所需要的几种不同频率的时钟。分频的原理为:对50MHz时钟每来一个上升沿计一次数,当计数到一定值的时候,计数值清零并且让输出电平取反,根据计数值的不同可以得到不同的输出频率。在本设计中分频出0.1HZ,1HZ,100Hz,

13、200Hz,500Hz的频率,以供不同的需要。图22.3消抖模块作为机械开关的键盘,在按键操作时,机械触点的弹性及电压突跳等原因,在触点闭合和开启瞬间会出现电压的抖动。为保证按键识别的准确性,在按键电压信号抖动的情况下不能进行状态输入。为此必须进行去抖动处理,消除抖动部分的电压信号,一般有硬件和软件两种方法。硬件就是加去抖动电路,这样可以从根本上解决按键抖动问题。软件消抖就是利用软件延时消抖,具体说就是当检测到高电平(有按键按下),1kHz脉冲来一个高电平计数值加1,一遇到低电平计数值清零,当计数值大于10时,说明按键是被真的按下,消除了抖动。本系统采用软件消抖。 图32.4车牌显示模块用8位

14、拨码开关表示车号,拨码开关对应的8位二进制通过BCD转换为12位BCD码。图42.5 计时模块当A键按下时,计时器开始计时,B键按下时,计时器停止计时,clk为计时脉冲,来一个上升沿,计数器加1,reset为总复位信号。2.6费率器模块初值为0,当费率在0-99范围内时,费率按键每按一次,费率加1。图72.7滚动模块滚动显示模块,当C=1时不滚动,但当C=0时滚动显示车牌、停车时间、及停车中费用。y3.0输出到译码器,sel为位选信号。图82.8译码模块该模块将将输入的二进制信号译成相应的七段共阳极数码管的编码。数据输入data3.0,译码输出led7s6.0。图93 使用说明按键说明: A按

15、键:为开始按钮,即当车辆进入停车场时,按下A开始计时,并显示进入车辆的车牌号及收费费率。B按键:为停止按钮,即当车辆驶出停车场时,按下B按钮,停止计时,并滚动显示,车牌号、停车时间及停车费用。费率按键:为费率设置按钮,每按一次,费率加1。Reset按钮为总复位按钮。clk为系统时钟,绑定到实验箱上的50MHz的时钟上,led7s6.0为数码管段选控制信号,sel7.0为8个数码管的位选控制信号。测试方法:首先按下复位键,然后设置八位拨码开关的值(车牌号),此时,数码管显示三位车牌号信息和费率,按下费率按键可以设置费率的值(每按一次加1,范围099),过一段时间,按下B键,此时8位数码管会滚动显

16、示,三位车牌号,四位停车时间和三位停车费。按下复位键,可重新测试。4 结论模拟停车场管理系统,虽然在速度上我没能赶上大部分同学,但是经过在之前将近一个月的前期准备和一周的集中设计让我体会到了很多的东西。虽然在查找资料中找到了一个相似的程序,但是还是有很多的错误。后来,进过与同课题的同学的一起分析和改进终于还是完成了可用的程序。在这场战斗中我有很大的收获,首先我采用层次化结构化设计,将此项设计任务分成若干模块,规定每一模块的功能和各模块之间的接口,然后再将各模块联合起来调试,加深了我们对层次化设计的概念的认识。在设计的过程中,虽然遇到了很多困难,但是通过向老师和同学请教以及自己不断摸索、测试,一

17、个个难题迎刃而解。从而提高了我独立发现问题、分析问题、解决问题的能力,其次,我也明白了一个道理,任何一件事情,只有亲自去做的时候才知道它到底难不难,有多难。我们就像小马过河中的小马,需要自己多去尝试。参考文献1. EDA技术实用教程潘松,黄继业. 北京:科学出版社,20062. VHDL设计实例与仿真姜雪松,吴钰淳,王鹰等. 北京:机械工业出版社,20073. 基于Quartus 的FPGACPLD设计李洪伟,袁斯华.北京:电子工业出版社,2006附录A 源程序library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigne

18、d.all;entity fpq isport(clk:in std_logic; FP500HZout,FP200HZout,FP100HZout,FP1HZout,FP01HZout:out std_logic);end entity;architecture one of fpq issignal clkjs1:std_logic;signal clkjs2:std_logic;signal clkjs3:std_logic;signal clkjs4:std_logic;signal clkjs5:std_logic;signal cnq1:integer range 5000000

19、downto 0;signal cnq2:integer range 5000000 downto 0;signal cnq3:integer range 5000000 downto 0;signal cnq4:integer range 5000000 downto 0;signal cnq5:integer range 50000000 downto 0;beginmk1: process(clk) beginif clkevent and clk=1 thenif cnq5=2500000 thencnq5=cnq5+1;elsecnq5=0;clkjs5=not(clkjs5); e

20、nd if;end if;FP01HZout=clkjs5;end process;mk2:process(clk)beginif clkevent and clk=1 thenif cnq1=500 then cnq1=cnq1+1; else cnq1=0;clkjs1=not(clkjs1);end if;end if;FP500HZout=clkjs1;end process;mk3:process(clk)beginif clkevent and clk=1 thenif cnq2=12500000 then cnq2=cnq2+1;cnq2=cnq2+1;elsecnq2=0;cl

21、kjs2=not(clkjs2);end if;end if;FP200Hzout=clkjs2;end process;mk4:process(clk)beginif clkevent and clk=1 thenif cnq32500 thencnq3=cnq3+1;elsecnq3=0;clkjs3=not(clkjs3);end if;end if;FP100HZout=clkjs3;end process;mk5:process(clk)beginif clkevent and clk=1thenif cnq4250000000 then cnq4=cnq4+1;elsecnq4=0

22、;clkjs4=not(clkjs4);end if;end if;FP1HZout15 then dout=1; else dout=0; end if; temp:=temp+1; end if; end process; end arc; library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity chepai isport(-clk: instd_logic;-时钟输入 key : in std_logic_vector(7 do

23、wnto 0);-键入 - l: outstd_logic_vector (7 downto 0);-输出数码管位选 chep : outstd_logic_vector (11 downto 0)-数码管段码);END chepai ;architecture an of chepai issignal clock : std_logic;-分频后时钟signal p : integer range 0 to 255; signal b0,b1,b2 : integer range 0 to 9;-显示数位寄存器,b0表示个位, signal cnt : integer range 0 to

24、 3:=0;-数码管位选扫描程序beginp smg4:=0000;-0 -gfedcba 共阳WHEN 1 = smg4:=0001;-1WHEN 2 = smg4:=0010;-2WHEN 3 = smg4:=0011;-3WHEN 4 = smg4:=0100;-4WHEN 5 = smg4:=0101;-5WHEN 6 = smg4:=0110;-6WHEN 7 = smg4:=0111;-7WHEN 8 = smg4:=1000;-8WHEN 9 = smg4:=1001;-9when others=null; END CASE; RETURN smg4; END b_to_s4;b

25、egincase p is when 0|10|20|30|40|50|60|70|80|90|100|110|120|130|140|150|160|170|180|190|200|210|220|230|240|250=b0b0b0b0b0b0b0b0b0b0end case;case p iswhen 0|1|2|3|4|5|6|7|8|9|100|101|102|103|104|105|106|107|108|109|200|201|202|203|204|205|206|207|208|209=b1b1b1b1b1b1b1b1b1b1-b0=10;end case;if p100 t

26、hen b2=100 and p200 thenb2=200 thenb2=2;end if;chep(3 downto 0)=b_to_s4(b0);chep(7 downto 4)=b_to_s4(b1);chep(11 downto 8)=b_to_s4(b2);end process;end an;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity jishi isport(A,B,reset:in std_logic; clk_minhz:in std_logic; data:

27、out std_logic_vector(15 downto 0);end;architecture one of jishi issignal data1:std_logic_vector(15 downto 0);signal c:std_logic;beginprocess(clk_minhz,reset,A,B)beginif reset=1 thendata1(15 downto 0)=0000000000000000;elseif(Aevent and A=1)then c=1;end if;if B=1 thenc=0;end if;if c=1 thenif clk_minhz

28、event and clk_minhz=1 thenif data1(3 downto 0)=1001 then data1(3 downto 0)=0000;if data1(7 downto 4)=0101then data1(15 downto 8)=data1(15 downto 8)+1; data1(7 downto 4)=0000; else data1(7 downto 4)=data1(7 downto 4)+1;end if;else data1(3 downto 0)=data1(3 downto 0)+1;end if;end if;elsif c=0 thendata

29、(15 downto 0)=data1(15 downto 0);end if;end if;end process;end;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity feilvqi is port(reset:in std_logic; clk_minhz:in std_logic; feilv:out std_logic_vector(7 downto 0) );end feilvqi;architecture one of feilvqi issignal feilv1:

30、std_logic_vector(7 downto 0);-signal c:std_logic;beginprocess(reset,clk_minhz)beginif reset=1then feilv1=00000000;elsif clk_minhzevent and clk_minhz=1thenif feilv1(3 downto 0)=1001then feilv1(3 downto 0)=0000;if feilv1(7 downto 4)=1001thenfeilv1(7 downto 4)=0000;else feilv1(7 downto 4)=feilv1(7 down

31、to 4)+1;end if;else feilv1 (3 downto 0)=feilv1(3 downto 0)+1;end if;end if;feilv=feilv1;end process;end;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity gundong isport (A,B:in std_logic; data:in std_logic_vector(15 downto 0); chep:in std_lo

32、gic_vector(11 downto 0); feilv:in std_logic_vector(7 downto 0); clk_200HZ,clk_1HZ: in std_logic; sel:out std_logic_vector(7 downto 0); y:out std_logic_vector(3 downto 0); end;architecture body_chooser of gundong is signal c:std_logic;signal count:std_logic_vector(2 downto 0);signal cnt: std_logic_ve

33、ctor(3 downto 0);begin-process(clk_200hz)-begin process (A,B)beginif (Aevent and A=1) then c=1;end if;if b=1 then c=0;end if;end process;process(clk_200HZ)beginif(clk_200Hzevent and clk_200HZ=1)thenif count111 thencount=count+1; else count=000;end if;end if;end process;process(clk_1HZ)beginif clk_1H

34、Zevent and clk_1HZ=1 THENIF cnt1100 then cnt=cnt+1; else cnty=0001;sely=data(11 downto 8);sely=data(7 downto 4);sely=data(3 downto 0);sely=1010;sely=chep(3 downto 0);sely=chep(7 downto 4);sely=chep(11 downto 8);selnull;end case;elsif cnt=0000 thencase count iswhen 000=y=chep(11 downto 8);sely=chep(7 downto 4);s

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号