出租车计价器系统设计中英文对照版
- 格式:docx
- 大小:38.26 KB
- 文档页数:26
摘要现在各大中城市出租车行业都已普及自动计价器,所以计价器技术的发展已成定局,预计未来计价器市场很有前景。
计价器作为出租车的一个重要组成部分,关系着出租车司机和乘客双方利益,起着重要的作用,因此,具有良好性能的计价器对广大出租车司机朋友和乘客来说是很必要的。
但是现阶段出租车的计费系统功能有时候并不能满足出租车司机的意愿。
本课题是出租车计价器系统的设计。
重点是设计出租车计价器的实用性,并尽量使最后的成品接近于商品。
整个系统是以89S51单片机为中心,采用A44E霍尔传感器对轮胎转数进行计数,实现对出租车里程的测量,并最终计算出结果。
其中采用掉电存储芯片AT24C02使系统在掉电的时候对单价、里程等信息进行存储,人机交换界面采用的是LCD1602液晶屏显示,并且通过语音芯片进行播报。
本电路设计的出租车计价器不但能实现计价的功能,同时还能实现根据时钟芯片自动调整白天、黑天计价模式,能自动处理中途等待等功能。
关键词:单片机AT89S51;LCD1602;出租车计价器;霍尔传感器;AT24C02ABSTRACTAutomatic taximeter has been universal among Cities for now. The taximeter technology is a foregone conclusion already. So taximeter of cars is still potential at next generation. As an important component taximeter is not only the interests of taxi drivers but also the passengers, so it has played an important role. The good performed taximeter is necessary for the public. The current taxi billing systems don’t meet the wishes of people. In this article we talk about various designs of taximeter system.The point is to design the practicality of the taximeter and as far as possible to make the final finished product close to commodities. The whole system is based on single-chip 89S51 and use a hall-sensor A44E to count the number of revolutions. In this way we can achieve the statistics of the taxi mileage and give out the final results. In this design we use AT24C02 to store the price, mileage and other information when the power is down. The man-machine interface of the exchange is LCD1602 screen, and through the voice chip broadcasts. This circuit design can not only realize the meter taxi valuation function, but also can realize the automatic adjustment according to the clock chips during the day, dark pricing mode, it can automatic processing midway waiting for function. Keywords: single-chip AT89S51; LCD1602; Taximeter; Hall sensor; AT24C02目录摘要 (I)ABSTRACT ....................................................................................... I I 1 绪论. (1)1.1 国内外出租车计价器的研究现状 (1)1.2 国内外出租车计价器的发展趋势 (2)1.3 本课题的研究目的及意义 (2)2 出租车计价器的方案论证 (4)2.1 出租车计价器的功能要求 (4)2.2 方案论证与比较 (5)3 出租车计价器的硬件设计 (7)3.1 单片机的介绍 (7)3.2 单片机最小系统 (11)3.3 里程计算模块的设计 (13)3.4 显示模块设计 (16)3.5 语音模块的设计 (18)3.6 掉电存储电路的设计 (21)3.7 按键电路的设计 (23)3.8 时钟电路的设计 (24)4 出租车计价器的软件设计 (27)4.1 模块介绍 (27)4.2 主程序模块 (27)4.3 里程计数中断程序 (28)4.3 定时中断服务程序 (29)4.4 中途等待服务程序 (30)4.5 显示服务子程序 (31)4.6 键盘服务程序 (33)5 系统调试 (34)5.1 软件调试 (34)5.2 里程计价测试 (35)5.2 掉电存储测试 (37)结论与展望 (38)可行性分析报告 (39)参考文献 (40)致谢 (41)附录一 (42)附录二 (43)附录三 (76)1 绪论出租车计价器是出租车营运收费的专用智能化仪表,随着电子技术的发展,出租车计价器技术也在不断进步和提高。
外文译文出租车多功能计费器的设计理念随着出租车行业的发展,对出租车计费器的要求也越来越高,用户不仅要求计费器性能稳定,计费准确,有防作弊功能;同时还要求其具有车票资料打印、IC卡付费、语言报话和电脑串行通信及税控功能。
不同国家和地址的计费方式存在差异,如有些地区有夜间收费及郊区收费等,而有些地区则无夜间收费和郊区收费;目前国内有些大城市要计计费器有税控功能,而有些城市无此要求;即使同一地区,不同车型的出租车其计费方式也有差别;而且出租车还面临几年一次的调价或调整计费方式等问题。
为此,我们设计了一款计费器。
该计费器内设置了多达64个选项系统上电、掉电以及供电电压降低时,第7脚产生复位输出,复位脉冲宽度的典型值为200ms,高电平有效,复位门限为4.65V。
计费器提供6个按键功能,但税控计费器不需要6个按键,只需要3个按键,因而无需4028译码器,利用CPU 的三条I/O线即可实现三个按键的功能。
1. 防作弊及脉冲输入模块。
为了提高计费器的防作弊功能,采用了两片PIC508,传感器中装一片PIC508,计费器中装一片PIC508。
其工作原理如下:每次计费器复位后,计费器中的PIC508送一随机数(1个字节)作为密码给传感器中的PIC508,车辆每产生一个脉冲,传感器中的PIC508均要将此密码送回到计费器的PIC508。
只有密码正确,计费器中的PCI508才发正确信息给CPU,表示输入了一脉冲,否则发错误信息给CPU。
当CPU收到三次错误信息(次数可任意设置)时,CPU报警表示有作弊现象。
由于不同时刻,即使同一个计费器的密码也不相同且是随机,因此采用该方法能效地防止司机作弊。
2 软件设计应注重的问题由于计数器的选项多达64个,功能齐全,能适应不同地区的需要,软件编程及调试比较复杂,需要非凡小心。
为了使计费器稳定、可靠地工作,软件设计主要考虑了以下几个方面:(1)为了防止计费器死机,软件编程时采用了指令冗余技术、软件陷阱技术以及软件看门狗技术。
精品好资料——————学习推荐出租车多功能计价器摘要随着出租车行业的发展,出租车行业已经是城市交通的重要组成部分,从加强行业管理以及减少与乘客的纠纷出发,以单片机为核心的智能出租车计价系统的开发就显得尤其重要。
本设计采用89S51单片机为主控器,以FJ2E-D10NK霍尔传感器测距,实现对出租车的多功能的计价设计,并采用AT24C02实现在系统掉电的时候保存单价和系统时间等信息,输出采用8段数码显示管。
本电路设计的计价器不但能实现基本的计价,而且还能根据白天,黑夜,中途等待来调节单价,但同时在不计价的时候还能作为时钟为司机同志提供方便。
关键词:89S51,霍尔传感器,AT24C02,AbstrsctAs the taxi industry development, urban taxi industry is an important component of the traffic, strengthening management and the reduction of trade disputes with passengers proceeding to SCM smart taxi at the core of the development on the pricing system is particularly Important. This design uses 89 S51 MCU-based controller, to FJ2E-D10NK Hall sensor location, and the taxi-pricing design and realization of the system used AT24C02 Power-down price and the time saved time and other information systems, output By paragraph 8 of the digital display. of the circuit design of the meter can not only achieve the basic pricing, but also based on the day, night, waiting for the half-way to regulate the price, but not accounted for in the time for the drivers but also as a clock Comrade convenience.Key words: 89S51, Hall sensor, AT24C02,目录第一章系统方案比较与选择31.1方案论证与比较31.2主要元器件的介绍5第二章电路的系统设计92.1 设计总框图92.2 里程计算、计价单元的设计92.3 数据显示单元的设计102.4 AT24CO2掉电存储单元的设计122.5 按键单元的设计122.6 设计总体电路图13第三章程序设计153.1 主程序模块153.2 定时中断服务程序153.3 里程计数中断服务程序153.4 中途等待中断服务程序163.5 显示子程序服务程序163.6 键盘服务程序163.7 程序流程图17第四章测试分析与计算184.1.里程计价测试方法184.2.里程测量数据194.3.掉电储存测试20第五章电路的调试与安装20第六章创新与特点21第七章总结22附录一:源程序23附录二:共阳数码管与74LS164的连接图28第一章系统方案比较与选择1.1方案论证与比较方案一:采用数字电路控制,其原理如图所示。
摘要该系统利用VHDL语言,以QuartusII软件作为开发平台,设计了出租车计程计价表,具有车型设置、起步里程设置、起步价设置、分时计价设置、里程显示、计费显示、计时显示、点阵数码管显示汉字及数字钟的报时及发光二极管花色显示等功能。
并进行了程序仿真、动态扫描等步骤。
关键词:VHDL语言、QuartusII软件、仿真目录一、设计任务说明 ---------------------------------------------- - - 2 -二、设计任务要求 ------------------------------------------------ - 2 -三、设计内容 ------------------------------------------------------ - 3 -(一)里程计价部分 ---------------------------------------- - 3 - (二)计时部分 ----------------------------------------------- - 7 - (三)数码管显示部分 ------------------------------------- - 10 - (四)点阵显示部分 ---------------------------------------- - 15 - (五)数字钟的报时及发光二极管花色显示部分---- - 17 - (六)整体电路连接部分 ---------------------------------- - 18 -四、整体电路图 -------------------------------------------------- - 22 -五、硬件实验结果图 -------------------------------------------- - 23 -六、心得体会 ----------------------------------------------------- - 23 -一、设计任务说明设计一个出租车计程计价表,具有车型设置、起步里程设置、起步价设置、分时计价设置、里程显示、计费显示、计时显示、点阵数码管显示汉字及数字钟的报时及发光二极管花色显示等功能。
出租车计价器设计摘要设计并实现一种利用89S51 单片机的出租车计价器。
使用霍尔传感器检测磁信号并产生脉冲,利用转盘转动模拟出租车车轮转动,通过记录脉冲个数,在计价器里换算成一定的计价营运里程,并通过按键实现总价、路程及时间的切换显示,采用EEPROM(AT24C02) 实现在系统掉电的时候保存单价和系统时间等信息,输出采用6 位LED数码管。
采用两种计价模式,区分白天黑夜计价,使该计价器的设计更加合理化。
系统的软件设计主要有:主程序模块、定时中断服务程序、里程计数中断服务程序、中途等待中断服务程序、显示子程序服务程序键盘服务程序。
采用单片机进行的设计,相对来说功能强大,用较少的硬件和适当的软件相互配合可以较容易的实现设计要求,且灵活性强,可以通过软件编程来完成更多的附加功能。
针对计费模式的切换,通过软件编程就可以轻而易举的实现。
避免了机械开关带来的不稳定因素。
另外在本方案中使用了点阵的液晶,可以实现更加友好的使用界面。
数据信息一目了然,即使是成品也可以方便的修改使用界面,更可根据不同的公司客户使用不同的局面。
关键词出租车计价器;89S51单片机;霍尔传感器;EEPROM(AT24C02)掉电保护The design of Taxi meterAbstractThe design of taxi meter is based on an implementation of using 89S51 microcontroller. Using the Holzer sensor detects the magnetic signal and generates a pulse, using turntables turn simulation taxi wheel rotates, by recording the number of pulses, converts certain idea price transport business course in the mileage fare meter and achieved through the key price,distance and time of the switch the display, using AT24C02 system realizes the power off when price and time keeping system information output, The output uses 6 LED nixietubes. There are two pricing models to distinguish between day and night valuation, the valuation implement designs more rational.The software design of the system are as follows: the main program module, timer interrupt service program, mileage count interrupt service routine, halfway to wait interrupt service routine, subroutine keyboard service program service program.The design of the single chip computer is relatively more powerful which uses with less hardware and the appropriate software interface and it can be easily achieved the design of requirements: flexibility. What is more, you can software programming to complete more of the additional features. In view of cost pattern cut and the switch, the realization may lift easily which through the software programming. It is also can avoid mechanical switch bringing the unstable factor. Moreover it has used the lattice liquid crystal in this plan which can achieve a more user-friendly interface and the data message is clearer. Even the finished product can also be conveniently modify the user interface. What is more,we can act according to the different company customer use different aspect . Keywords Taxi Meter;89S51 MCU;A44E Hall;EEPROM(AT24C02) Power off Protection目录摘要 (I)Abstract (II)第1章绪论 (1)1.1课题背景 (1)1.2设计任务 (1)1.3系统主要功能 (2)第2章出租车计价器硬件设计 (3)2.1 系统组成 (3)2.2 AT89S51单片机及其引脚说明 (3)2.3 AT24C02引脚图及其引脚功能 (6)2.4 AT24C02 掉电存储单元的设计 (6)2.5 车轮传动检测模块和按键控制模块 (7)2.5.1车轮传动检测模块 (7)2.5.2按键控制模块 (9)2.6 数据显示单元设计 (9)2.6.1数码管得分屏显示 (9)2.6.2 LED显示工作原理 (10)2.7 Protel绘制原理图 (11)第3章系统的软件设计 (13)3.1 系统的主程序设计 (13)3.2 定时中断服务程序 (15)3.3 里程计数中断服务程序 (16)3.4 显示子程序服务程序 (16)3.5 键盘服务程序 (16)3.5.1按键开关的去除抖动功能 (16)3.5.2按键功能 (17)第4章系统测试 (18)4.1 系统调试 (18)4.2 使用的仪器仪表 (18)4.3 里程计价测试 (18)4.4 掉电存储测试 (19)结论 (21)致谢 (22)参考文献 (23)附录A (24)第1章绪论1.1课题背景出租车计价器是乘客与司机双方的交易准则,它是出租车行业发展的重要标志,是出租车中最重要的工具。
课程设计报告书题目出租车简易计费器设计课程设计任务书课题题目摘要----------------jifei---------------library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity jifei isport ( clk,rst,en,en1:in std_logic;lc0,lc1,lc2,lc3:out std_logic_vector(3 downto 0);jj0,jj1,jj2,jj3:out std_logic_vector(3 downto 0));end jifei;architecture lab10_4 of jifei issignal Q00:std_logic_VECTOR(3 DOWNTO 0);--jifei0 signal Q01:std_logic_VECTOR(3 DOWNTO 0);--jifei1 signal Q02:std_logic_VECTOR(3 DOWNTO 0);--jifei2 signal Q03:std_logic_VECTOR(3 DOWNTO 0);--jifei3 signal Q1:integer range 0 to 10000;--JIZONGLUCHENG signal Q10:std_logic_VECTOR(3 DOWNTO 0);--lc0 signal Q11:std_logic_VECTOR(3 DOWNTO 0);--lc1 signal Q12:std_logic_VECTOR(3 DOWNTO 0);--lc2 signal Q13:std_logic_VECTOR(3 DOWNTO 0);--lc3 signal Q2:integer range 0 to 10000;--jidengdaishijianbeginprocess ( clk, rst)beginif clk'event and clk='1' thenif en='1' thenif en1='1' then --JILUCHENGQ1<=Q1+1;if Q10= "1001" THENQ10<="0000" ;IF Q11="1001" THENQ11<="0000";if Q12= "1001" THENQ12<="0000" ;IF Q13="1001"THENQ13<="0000";ELSEQ13<=Q13+1;END IF;ELSEQ12<=Q12+1;END IF;ELSEQ11<=Q11+1;END IF;ELSEQ10<=Q10+1;END IF; --JILUCHENGJIESUIF Q1<=3 THEN --JISUANLUCHENGFEIYONGQ00<="0101";ELSEif Q00= "1001" THENQ00<="0000" ;IF Q01="1001" THENQ01<="0000";if Q02= "1001" THENQ02<="0000" ;IF Q03="1001"THENQ03<="0000";ELSEQ03<=Q03+1;END IF;ELSEQ02<=Q02+1;END IF;ELSEQ01<=Q01+1;END IF;ELSEQ00<=Q00+1;END IF; --LUCHENG FEIYONG JISUANJIESUEND IF;ELSEQ2<=Q2+1;IF Q2>5 THEN --JISUANDENGDAISHIJANDFEIYONGif Q00= "1001" THENQ00<="0000" ;IF Q01="1001" THENQ01<="0000";if Q02= "1001" THENQ02<="0000" ;IF Q03="1001"THENQ03<="0000";ELSEQ03<=Q03+1;END IF;ELSEQ02<=Q02+1;END IF;ELSEQ01<=Q01+1;END IF;ELSEQ00<=Q00+1;END IF;END IF;END IF;END IF;END IF;IF RST='0' THENQ00<="0000";Q01<="0000";Q02<="0000";Q03<="0000";Q1<=0;Q2<=0;Q10<="0000";Q11<="0000";Q12<="0000";Q13<="0000";END IF;LC0<=Q10;LC1<=Q11;LC2<=Q12;LC3<=Q13;JJ0<=Q00;JJ1<=Q01;JJ2<=Q02;JJ3<=Q03;end process;end lab10_4;首行空两个中文字符;文字采用小四、宋体;行间距:多倍行距1.3;字数:200-400字左右关键词课题相关关键词,以分号间隔目录课程设计任务书............................................. 错误!未定义书签。
用VHDL语言设计出租车计价器1个报价近年来,出租车行业发展迅速。
全国有数千家出租车公司,出租车计价器市场巨大。
随着电子科学技术的不断发展,特别是集成电路的飞速发展,电子设计自动化已经成为主要的设计手段。
随着EDA技术的蓬勃发展和FPGA等数字可编程器件的出现,数字出租车计价器的设计变得更加简单,性能更加稳定,可以实现更加复杂的功能。
此外,利用EDA软件可以方便地在计算机上实现设计和仿真。
本设计基于VHDL(FPGA)语言,是电子设计领域最具活力和前景的技术,未来必将取代一些过时的数字元件。
1.1课程设计的目的随着电子技术的不断发展和进步,集成电路的设计方法也在不断更新。
今天,传统的手工设计过程已经被先进的电子设计自动化(EDA)工具所取代。
只有基于硬件描述语言和逻辑综合的子项下的电路设计方法,才能满足集成电路系统设计日益复杂的要求,缩短设计周期,满足集成电路系统设计日益迫切的要求。
在这种情况下,传统的出租车计价器的设计方法已经跟不上现在的节奏,过去的出租车计价器的功能也远远不能满足实际需要。
以往出租车计价器的不稳定和功能短是大家开始寻找功能更强大、性能更稳定、价格更低廉的新型出租车计价器的缺点。
大规模可编程逻辑器件和VHDL硬件描述语言的出现使这一切成为可能。
本设计的研究目标和意义是使用价格低廉、性能稳定、价格低廉、扩展性强的出租车计价器,满足当前出租车市场的需求,从而解决当前出租车计价器存在的一系列问题。
1.2课程设计要求1.它可以实现充电功能。
收费标准为:按里程收费,起步费10.00元,车库3公里后再按2元/公里收费。
计价器收费或超过一定收费(如20元)时,每公里收取车费的50%,车停止收费。
2.实现预设功能:可以预设起步费,每公里收费,车行里程。
3.实现模拟功能:可以模拟汽车的启动、停止、暂停、速度等状态。
4.设计一个动态扫描电路:用两位小数显示票价。
5.用VHDL语言设计一个满足上述功能要求的出租车计价器,并用层次化设计方法设计电路。
ABSTRACTIn this paper, a multi-channel taximeter that is able to deal with more than one passenger simultaneously is proposed.In order to demonstrate the theory of operation of the proposed system, a complete design for an experimental three-channel taximeter (whose prototype has been built under grant from the EgyptianAcademyfor Scientific and Technological Research> is presented.System location, outline, block diagrams as well as detailed circuit diagrams for the experimental taximeter are also included.1. INTRODUCTIONTransporting people in the morning from their homes to their works and back in the afternoon has become a big problem in big cities especially in undeveloped countries. As a partial solution of this problem, the authorities in some countries had, unofficially, left the taxicab drivers to carry different passengers to different places at the Same time. For example, a taxicab with four seats may carry four different passengers without any relation between them except that their way of travelling is the same.Accordingly, it has become very difficult to rely on the present conventional single-channel taximeter to determine the fare required from each passenger separately. Accordingly, an unfair financial relation was created between the taxicab driver, owner, passengers and the state taxation department.Under these circumstances, taxicab drivers force the passengers to pay more than what they should pay. In some cases passengers had to pay double fare they should pay. With the present conventional single-channel taximeter, taxicab owners are not able to determine the daily income of their taxicab.In some cases (a taxicab with four seats> they may only get one quarter of the income of the taxicab (collected by the taxicab driver>. From which they should pay the salary of the taxicab driver as well as the cost of fuel, minor and major repairs in addition to the car depreciation. As a matter of fact the position of the taxicab owners is not so bad as it seems. A general agreement has been reached between the taxicab drivers and owners such that the drivers should guarantee a fixed daily income to the owners as well as the paying for the cost of fuel as well as the minor repaires. Even though the taxicab drivers still share the large portion ofthe income of the taxicab. Also with the presence of the single-channel taximeter, it has become very difficultfor the state taxation department to know the yearly income of the taxicab and accordingly it has become very difficult to estimate the taxes to be paid by the taxicab owners.In order to face this problem, the state taxation department had to impose a fixed estimated taxes for each seat of the taxicab whatever the income of the taxicab. In this paper, we introduced a multichannel taximeter that can deal with more than one passenger simultaneously. I t should be pointed out that by the term passenger we mean a one person or a group of related persons. I t should also be pointed out that our proposed multi-channel taximeter is not, simply, a multi display readouts. As a matter of fact it contains logic circuits that automatically changes the fare per killometer of travelling distance or per minutes of 'waiting time according to the number of passengers hiring the taxicab. In the following part and as an example, we will present a complete design for a three-channel taximeter.Block diagrams as well as detailed circuit diagrams of the experimental three-channel taximeter are also included. A prototype has been built under grant from the EgyptianAcademy for Scientific and Technological Research.2. AN EXPERIMENTAL THREECHANNEL TAXIMETERTheory of operation of our experimental device to work as an electronic digital taximeter is based on t h e fact thathe speedometer cable rotates one revolution for each meter of travelling distance.Accordingly, if the speedometer cable is coupled with a speed sensor that generates a single pulse for each meter of travelling distance, then our taximeter could be three up counter modules associated with a speed sensor unit.However, our experimental taximeter is not simply a three display readouts. As a matter offact it contains logic circuits that automatically changes the fare per kilometer of travelling distance or per minutes of waiting time according to the number of passengers hiring the taxicab. The device may be splitted into two main parts: The first is the speed sensor unit which may be located anywhere in the taxicab such that an easy coupling to the speedometer cable can be achieved. The second unit contains the main electronic circuit, the displayand control panel. The unit should be located somewhere in front of both the driver and the passengers.A possible components locations is shown in Figure 1.A. Speed Sensor UnitThe main function of this unit is to supply train of pulses whose frequency isproportional to the angular rotation of the wheels. A possible form of a speed sensor is shown in Figure 2.If may consist of a tj.pica1 permanent magnet sine wave generator with its output connected to a pulse shapping circuit (two general purpose silicon diodes, 1K ohms resistor and a schmit trigger inverter>.In order to find some way to detect the movement of the taxicab, the output of the sine wave generator is rectified through a general purpose silicon diode Dl then smoothed by a 1000 F capacitor. The output voltage at terminal Q is then limited to the value of 4.7 volts by using a Ik ohms resistor as well as a zener diode ZD. The level of the voltage at terminal Q would be high whenever the taxicab is moving and will be zero otherwise. This voltage can be used for the automatic switching from distance fare to time fare.B. Main Electronic and Display Unit A suggested shape for the main electronic and display unit is shown in Figure 3. The control and display panel contains all ' controls necessary for operating the taximeter as well as four readout displays. The first channel will give the sum of money required from the first passenger, while the second and third readouts are for the second and third passengers, respectively. The fourth readout will give the total income of the taxicab.The contents of the last readout should be nonvolatile and be able to be retained even during parking the taxicab. The channel rotary selector switchs 1 , 2 and 3 have fully clockwise/anticlockwise positions. In the fully anticlockwise position, the counter of the corresponding readout is blancked and disabled.In the fully clockwise position, the counter is unblanked, cleared to zero and enabled to be ready for counting the sum of money required from the first, second and third passengers, respectively.Pushing the total sum pushbutton 4 unblanks the fourth readout enabling any person to retain the readout corresponding to the total income. After the release of the pushbutton, the fourth readout will be blanked again. This unit also contains the main electronic circuit which will be fully described in the following section.3. DESCRIBTION OF THE MAIN ELECTRONIC CIRCUITThe general block diagram of the main electronic circuit is shown in Figure 4. It consists of five subcircuits designated by the symboles CTI up to CT4supporting circuits, these are: The number of passenger deticition circuit CTI, travelling distance scaling circuit CT2, waiting time scaling circuit CT3, circuit CT4 which generatesclock pulses for the display circuit.A. Number of Passengers Detection Circuit CT1 As shown from the general block diagram, the circuit CTI has three inputs I, 2 and 3 as well as three outputs J, K and L. The function of the circuit is to supply a high level voltage at terminals J, K or L if and only if one, two or three passengers are hiring the taxicab, respectively. The term passenger, here, means one person or a group of related persons. When a passenger is getting into the cab, we simply turn on a free readout display by turning the corresponding rotary selector switch to a fully clockwise direction.This will automatically disconnect the corresponding terminal I, 2 or 3 from ground. The logical relation between various input terminals I, 2 and 3 and the output terminals J, K and L is shown in Table 1.As a combinational circuit we start the design by deriving a set of boolean functions. A possible simplified boolean functions that gives minimum number of inputs to gates may be obtained from Table I.A possible logical diagram that is based on the above derived expressions is shown in Figure 5.It consists of two inverters, four 2-input AND, to3-input AND two 3-input OR gates B. Tavelling Distance Scaling Circuit CT2As shown from the block diagram of Figure 4, the circuit CT2 has four input J, K, L and E and one output M. The function of the circuit is to supply a single pulse at the output M for a certain number of pulses generated at the output of the speed sensor (certain number of meters travelled by the taxicab>, according to the number of passengers hiring the car. A suggested fare per kilometer of travelling distance is shown in colomn two of Table 2. the circuit, in this case, should supply a single pulse at the output M for every 100, 125 or 143 pulses generated at the input terminal E according to the level of voltage at input terminale 3, K or L, respectively.Our circuit could be, as shown in Figure 5, three decade counters, connected as a three digit frequency divider whose dividing ratios 100, 125 and 143 are automatically selected by the voltage level at terminals J, K and L, respectively.A possible circuit diagram that may verify the above function is shown in Figure 6. It consists of three decade counters type 7490, one BCD-to decimal decoder type 7445, three 4-input AND, one 3-input ANDone 2-input AND two 3-input OR gates.C. Time Scaling Circuit CT3As shown in the block diagram, the time scalingcircuit will have four inputs J, K, L and F and one output N. The function of this circuit and accordingto colomn three of Table 2 (fare per 2 minuts of waiting time> is to supply a single pulse at the output N for every 120, 240 or 360 pulses supplied at the input terminal F from the I Hz clock according to level of voltage at inputs J, K and L, respectively.Time scaling circuit would be similar to the distance scaling circuit but with different diving ratios. A Possible circuit diagram is shown in figure 7.It consists, in this case, of three decade counter type 7490, two 3-input AND, one 5-input AND, one 2-input AND one 3-input OR gates.D. Circuit CT4 Which Generates Clock Pulses for Display CircuitThe function of this circuit is to supply one, two or three pulses at the output terminal R for each pulse generated at any of the terminals N or M, according to the voltage level at the input terminals J, K or L, respectively. The output P will receive a pulse for each pulse generated at any of the input terminals N or M. This function can be performed by the circuit shown in Figure 8, it consists of one ripple counter type 7493, one half of a dual JK masterslave flip-flops circuit type 7476, three inverters, three 2-input AND, one 3-input AND, one 2-input OR and one 3-input OR gates. When a pulse is generated at either input terminals N or M, a high level voltage will be generated at the output Q of the flip-flop. This will g a t e t h e I Khz signal to be connected to the input A of the ripple counter as well as to the output terminal R. When one, two or three pulses are counted by the ripple counter, according to the level of voltage at the input terminals J, K and L, respectively, a high is generated to reset the counter and change the state of the flip-flopsuch that Q becomes low.Hence, the 1 KHz signal is disabled to reach the outputerminal R or the input A of the ripple counter. In order to ensure the proper function of the circuit, the flip-flop should be cleared whenever a new channel is operated. This has been achieved by the input 5 and will be explained later when describingthe function of the channels rotary selector switchs.E. Display CircuitAs shown in Figure 2, the display panel would contain three 4-digit displays that give the sumof money required from each passenger separately as well as a one six-digit display that gives the total income of the taxicab. A possible wiring diagram for the display circuit is shown in Figure 9. Rotating any of the rotary selector switches to fully clockwise direction will supply the corresponding display by5 volts through terminals 1, 2 and 3, respectively.The corresponding display will be unblanked by supplying a low level of voltage through terminals A, C and G, respectively. Keeping terminals 8, D and H, respectively, at low level will keep them reset to zero. The corresponding display is then enabled by removing the low voltage from terminals B, D, and H, respectively, to be ready for counting the sum of money required from the corresponding passenger starting from zero.The counting pulses for these three displays are supplied through terminal P. The total sum display will be enabled whenever any of the three displays is enabled (this is done by a 3-input OR gate as shown in Figure 8>. Retaining the contents of the last display will be done by unblanking it by supplying a low level of voltage to terminal I as shown in Figure 10 b.F. Changing Over Between Time and Distance FaresIn the following part, two different methods for changing over between time andistance fares are suggested:The first is to switch to time fare whenever the distance fare is less than the time fare. Hence,a simple look to fares table (Table 2> can show that time fare should be used whenever the taxicab moves with speed less than 50 m/min. A possible circuitthat can perform this switching action is shown in Figure IO c. It contains one rpm limit switch and a one inverter as well as two 2-input AND gates.The contacts of the limit switch are normally closed and will be opened whenever the angular speed of the speedometer cablexceeds 50 rmp. The second alternation is to connect the input of the inverter in Figure 10 c. to the output terminal Q of the speedometer circuit, Figure 2.In this case, the switching into time fare will be done whenever the taxicab is at stand still.G. Function of the Rotary Selector Switches The voltage levels that should be supplied bythe terminals of the rotary selector switches in order to ensure proper operation by the electronic circuit are given in Table 3. Connection of three rotary selector switches each witb four decks of five poles each, that satisfy the logic function of Table 3, is shown in Figure 10 a. Rotating any of the three switches into fully clockwise direction will pass through five positions. The function of the rotary selector switches can be described starting from the first position passing through variousteps until reaching the final position as follows:Initial position: In this position a low voltage level is applied to terminals I, 2 and 3, this will disconnect the 5 volts supply from the three first displays, set the three inputs of the number of passenger detection circuit CTI to low level. A low voltage level is applied to terminals 8, D and H, this is to ensure that the total income display is disabled.V oltage levels at terminals A, C, G and S are at no care condition.Step I: Rotating any of the rotary selector switches one step toward clockwise direction will supply 5 volts to the corresponding display, provides a high level voltage at terminals 1, 2 or 3 indicating that one passenger have entered the taxicab. A high level voltage should be applied to terminals A, C or G in order to ensure that the corresponding display is still blanked. Other terminals B, D, H and S are kept unchanged. Step 2: Rotating the rotary selector switch onestep further, will change the state of voltages at terminal A, C or G to be at low level and unblanks the corresponding display. States of voltages at terminals I, 2, 3 and S are remained unchanged.Terminals B, D and H should be remained at low level to ensure that the corresponding readout is cleared to zero while unblanking the display.二、中文翻译摘要本文提出了一种出租车多通道计价的方案,能同时处理一个以上乘客的情形。
《数字逻辑电路》课程设计——出租车计费器的设计计算机学院软件工程1401赵雷3140608027出租车计费器的设计一、系统设计任务及要求(1)能实现计费功能,计费标准为:按行驶里程收费,起步价为7.00元,并在车行3千米后再按2元/千米,当总费用达到或超过40元时,每千米收费4元,客户端需要停车等待时按时间收费,计费单价每20秒1元。
(2)设计动态扫描电路:以十进制显示出租车行驶的里程与车费,在数码管上显示(前四个显示里程,后三个显示车费)。
(3)用VHDL语言设计符合上述功能要求的出租车计费器,并用层次化设计方法设计该电路。
(4)完成电路全部设计后,通过系统试验箱下载验证设计的正确性。
二、系统设计方案根据系统设计设计要求不难得知,整个出租车计费系统按功能主要分为速度选择模块、计程模块、计时模块、计费模块4个模块。
车速控制模块计数器模块译码模块动态扫描电路模块顶层原理图1.速度模块:通过对速度信号sp的判断,决定行使的路程,这里是通过速度信号来模拟一个变量的取值。
如kinside变量,其含义是行进100m所需的时钟周期数,然后每行进100m,则产生一个脉冲clkout来驱动计费模块。
VHDL语言:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity Taxi_part1 isport(clk,reset,start,stop:in std_logic;sp :in std_logic_vector(2 downto 0);clkout :out std_logic);end Taxi_part1;architecture behavior of Taxi_part1 isbeginprocess(clk,reset,stop,start,sp)type state_type is(s0,s1);variable s_state:state_type;variable cnt:integer range 0 to 1400;variable kinside:integer range 0 to 1400;begincase sp iswhen "000"=> kinside:=0;when "001"=> kinside:=1400;when "010"=> kinside:=1200;when "011"=> kinside:=1000;when "100"=> kinside:=800;when "101"=> kinside:=600;when "110"=> kinside:=400;when "111"=> kinside:=200;end case;if(reset='1') then s_state:=s0;elsif(clk'event and clk='1') thencase s_state iswhen s0=>cnt:=0;clkout<='0';if(start='1') then s_state:=s1;else s_state:=s0;end if;when s1=>clkout<='0';if(stop='1') then s_state:=s0; --相当于无客户上车elsif(sp="000") then s_state:=s1; ---有客户上车,但车速位0,即客户刚上车还未起步elsif(cnt=kinside) then cnt:=0;clkout<='1'; s_state:=s1;else cnt:=cnt+1; s_state:=s1;end if;end case;end if;end process;end behavior;2.计程模块:由于一个clkout信号代表行进100m,故通过对clkout计数,可以获得共行进的距离kmcount。
出租车计价器系统-完整版⽬录毕业设计任务书...................................... 错误!未定义书签。
毕业设计成绩评定表.................................. 错误!未定义书签。
毕业(论⽂)设计答辩申请书............................ 错误!未定义书签。
正⽂.. (1)中⽂摘要及关键词 (1)引⾔ (2)第⼀章出租车计价器系统功能描述 (3)1.1 计价器整体功能描述结构 (3)1.2 各部分电路功能描述 (3)第⼆章⽅案论证 (4)2.1 主控电路选择 (4)2.2 显⽰电路选择 (4)第三章计价器系统电路功能单元设计 (5)3.1 电源模块设计 (5)3.2 ⾥程、计价单元的设计 (5)3.3 数据显⽰单元的设计 (7)3.4 按键及数据显⽰单元的设计 (7)第四章主要元器件选择及介绍 (8)4.1 单⽚机选择 (8)4.2 MCS-51系列单⽚机内部结构及功能部件 (8)4.2.1 MCS-51系列单⽚机的内部结构框图 (8)4.2.2 单⽚机外部引脚说明 (9)4.2.3 并⾏输⼊/输出接⼝ (11)4.3 1602字符液晶显⽰简介 (12)第五章程序设计 (15)5.1 系统主程序设计 (15)5.2 定时中断服务程序 (15)5.3 ⾥程计数中断服务程序 (15)5.4 中途等待中断服务程序 (15)5.5 显⽰⼦程序服务程序 (15)5.6 键盘服务程序 (16)5.7 程序流程图 (16)第六章设计总结及致谢 (18)6.1 设计总结 (18)6.2 致谢 (18)参考⽂献 (19)附件 (20)附录1 (20)附录2 (20)毕业论⽂答辩委员会表决意见.......................... 错误!未定义书签。
毕业论⽂答辩过程记录表.............................. 错误!未定义书签。
出租汽车计价器的检定与GPS和软计算技术(Taximeter verification with GPS and soft computing techniques)直到最近,西班牙地方政府在使用机器的滚筒校验器时,发现在这个过程中轮胎的状况可能会导致错误和机械化施工试验设备不兼容某些车辆。
因此需要设计一个新的测量设备。
在我们的看来,除非采取测量实际的出租车运行使用情况,否则核查计价器将不可靠。
而全球定位系统传感器是适合这一进程的。
因为它测试车提供位臵和速度独立的装臵,但棘手问题在于难于使用全球定位系统传感器:全球定位系统坐标测量不匹配正实坐标,一般来说,我们没有给出绝对公差。
我们不知道是否最大的错误就是总是低于绝对公差。
例如,海拔7米。
然而,我们知道,在圆圈的半径7米与中心的实际位臵有50%的测量的误差。
本文描述了一个实际应用软计算基础技术来解决这些棘手问题。
特别是,我们提出的特点中的不确定性和模糊技术,使我们可以利用近似的一些算法,原打算用于遗传模糊系统这一新的领域。
具体来说,我们提出了一种新的方法计算长度上界的轨迹,同时考虑模糊的数据。
这必然会在计算中使用改进的多目标进化算法,它可以优化模糊值函数。
结合它限制的基本动态行为的车辆,本测量精度将进一步改善。
1.简介从工程的角度来看,用测量路径长度使用的全球定位系统来覆盖的车辆的使用位臵数据似乎是一个简单的任务。
然而,如果这些测量的运用对于法律而言,情况就不同了。
全球定位系统接收器测量提供的这些数据有一个模糊的性质,即实际位臵和遥感车辆坐标之间有可能出现大偏差。
这些偏差是罕见的,然而他们是可能的,而且这事实可以使全球定位系统中的一些应用失效。
这种行为(即一个仪器大部分时间具有高精度,但有时候其准确性也会失真)不是全球定位系统的一个专属特例。
许多用于合法用途(例如,雷达)的其他传感器也有这一问题,但是程度较小。
然而,这些传感器却经常使用,因为在实际情况下,如果一个测度失真概率不是很低,那么它提供的数据仍然可以受理。
基于单片机的出租车计价器设计(附源程序)基于单片机的出租车计价器设计(附源程序)摘要本设计的是一个基于单片机AT89S52的出租车自动计费设计,附有复位电路,时钟电路,键盘电路等。
复位电路是单片机的初始化操作,除了正常的初始化外,为摆脱困境,通过复位电路可以重新开始。
时钟电路采用12MHz的晶振,作为系统的时钟源,具有较高的准确性。
在上电时字符型液晶1602显示最初的起步价,里程收费,等待时间收费三种收费,通过按键可以调整起步价,里程收费,等待时间收费。
通过按键模拟出租车的运行,暂停,停止。
在1602液晶上可以显示运行的时间,运行时暂停的时间,通过计算可以得出总共的费用和总的路程。
在这里主要是以AT89S52单片机为核心控制器,P0口接1602液晶显示模块,P1口接按键的,通过按键输入。
关键字AT89S52;1602液晶;出租车计费器ABSTRACTThe design is based on a monolithic integrated circuit AT89S52 taxi billing design, with reset circuit, clocking circuit, keyboard circuit. Reset circuit is initialized, besides the normal operation of the initial dilemma, as a foreigner, through the reset circuit can start again. 12MHz adopts the clock circuit, as a system of crystal oscillator, higher clock source.The characters in the crystal that the initial 1602, charges, fees mileage waiting time, three buttons can be adjusted by charging fees, just waiting time, mileage. Through the simulation of the taxi, buttons, stop. Suspension In the liquid crystal display can run 1602, operation time, when suspension can be obtained by the computation of the total cost.here is mainly for the core controller, AT89S52 SCM P0 mouth after 1602 LCD module, P1 mouth after the keys, through the keystroke.1 课程设计任务书1.1 课程设计任务设计一个出租车自动计费器,计费包括起步价、行车里程计费、等待时间计费三部分,用1602液晶显示总金额,运行时间,暂停时间,最大值为99.9元,起步价为5.0元,3Km之内起步价计费,超过3Km,设速度为100m/s,10s增加1.3元(即1KM增加1.3元),等待时间单价为每分钟1.5元,用液晶显示总里程,同时用液晶显示等待时间和运行花费时间。
Machi ne tool nu merical con trol reforms机床数控改造First, CNC systems and the developme nt trend of history一、数控系统发展简史及趋势1946 birth of the world's first electronic computer, which shows that human beings created to enhance and replace some of the men tal work tools. It and huma n agriculture, in dustrial society in the creati on of those who merely in crease compared to manual tools, from a qualitative leap for mankind's entry into the information society laid the foun datio n. Six years later, i n 1952, computer tech no logy applied to the machine in the United States was born first CNC machine tools. Since then, the traditional machine produced a qualitative change. Nearly half a century since the CNC system has experie need two phases and six gen erati ons of developme nt.1946年诞生了世界上第一台电子计算机,这表明人类创造了可增强和部分代替脑力劳动的工具。
它与人类在农业、工业社会中创造的那些只是增强体力劳动的工具相比,起了质的飞跃,为人类进入信息社会奠定了基础。
6年后,即在1952年,计算机技术应用到了机床上,在美国诞生了第一台数控机床。
从此,传统机床产生了质的变化。
近半个世纪以来,数控系统经历了两个阶段和六代的发展。
1.1, Numerical Control (NC) phase (1952 to 1970)1.1、数控(NC)阶段(1952〜1970年)Early computer's computational speed low and the prevailing scientific computi ng and data process ing is not affected, but can not meet the requireme nts of real-time con trol machi ne. People have to use digital logic circuit "tied" into a sin gle mach ine as a dedicated computer nu merical con trol system, known as the hardware conn ection NC (HARD-WIRED NC), called the Numerical Control (NC). With the developme nt of comp onents of this phase after three gen eratio ns, that is, in 1952 the first gen erati on - tube; 1959 of the sec ond gen eratio n - tran sistor; 1965 of the third generation - small-scale integrated circuits.早期计算机的运算速度低,对当时的科学计算和数据处理影响还不大,但不能适应机床实时控制的要求。
人们不得不采用数字逻辑电路"搭"成一台机床专用计算机作为数控系统,被称为硬件连接数控(HARD-WIRED NC ),简称为数控(NC)。
随着元器件的发展,这个阶段历经了三代,即1952年的第一代--电子管;1959年的第二代--晶体管;1965年的第三代--小规模集成电路。
1.2, Computer Numerical Control (CNC) phase (1970 to present)1.2、计算机数控(CNC)阶段(1970年〜现在)To 1970, GM has bee n a small computer and mass-produced.So it tran spla nt system as the core component of NC, have entered a Computer Numerical Control (CNC) stage (in front of the computer should be "uni versal" word omitted). To 1971, the United States INTEL company in the world will be the first time the two most core computer comp onents - comput ing and con troller, a large-scale in tegrated circuit techn ology in tegrati on in a chip, called the microprocessor (MICROPROCESSOR), also known as the cen tral process ing un it (CPU).到1970年,通用小型计算机业已出现并成批生产。
于是将它移植过来作为数控系统的核心部件,从此进入了计算机数控(CNC)阶段(把计算机前面应有的"通用"两个字省略了)。
到1971年,美国INTEL公司在世界上第一次将计算机的两个最核心的部件--运算器和控制器,采用大规模集成电路技术集成在一块芯片上,称之为微处理器(MICROPROCESSOR),又可称为中央处理单元(简称CPU)。
1974 microprocessor to be used in CNC system. This is because the function of the computer is too small to control a machine tool capacity affluent (the time has bee n used to con trol more tha n one mach ine, called Group Con trol), as a reas on able econo mic use of the microprocessor. Mini computer reliability and the n not ideal. Early microprocessor speed and fun cti on ality while still not high eno ugh, but can be adopted to solve the multi-processor architecture. As microprocessor core is a general computer comp onen ts, it is still known as the CNC.到1974年微处理器被应用于数控系统。
这是因为小型计算机功能太强,控制一台机床能力有富裕(故当时曾用于控制多台机床,称之为群控) ,不如采用微处理器经济合理。
而且当时的小型机可靠性也不理想。
早期的微处理器速度和功能虽还不够高,但可以通过多处理器结构来解决。
由于微处理器是通用计算机的核心部件,故仍称为计算机数控。
By 1990, PC machi nes (pers onal computers, domestic habits that computer) performanee has been developed to a high stage, as a CNC system to meet the requireme nts of the core comp onen ts. NC system based on PC has now en tered the stage.到了1990年,PC机(个人计算机,国内习惯称微机)的性能已发展到很高的阶段,可以满足作为数控系统核心部件的要求。
数控系统从此进入了基于PC的阶段。
In short, CNC has also experie need a stage three gen eratio ns. That is, in 1970's fourth gen erati on - small computer; 1974 of the fifth gen eratio n - microprocessors and the sixth-generation 1990 - Based on the PC (called PC-BASED abroad).总之,计算机数控阶段也经历了三代。
即1970年的第四代--小型计算机;1974年的第五代--微处理器和1990年的第六代--基于PC(国外称为PC-BASED)。
Also pointed out that, although the foreign computer has been renamed NC (CNC), but China still customary said Numerical Control (NC). Therefore, we stress the day-to-day "NC", i n esse nee, is that "computer nu merically con trolled."还要指出的是,虽然国外早已改称为计算机数控(即CNC)了,而我国仍习惯称数控(NC)。
所以我们日常讲的"数控",实质上已是指"计算机数控"了。