节点文献
汽车行驶记录仪的通信技术研究
Research of Communication Technology on Vehicle Traveling Data Recorder
【作者】 朱俊;
【导师】 曾春年;
【作者基本信息】 武汉理工大学 , 控制理论与控制工程, 2009, 硕士
【摘要】 嵌入式系统是一个高速发展的新兴领域。USB接口、CAN总线接口、RS232串口等由于具有成本低、速度快、易于扩展等诸多优点,在电子设备领域得到了十分广泛的应用与研究。因此,在嵌入式系统中实现这三种通信接口的开发,是十分具有现实意义和应用前景的。汽车行驶记录仪作为实时监控汽车行驶的一种电子产品,可以保存关于汽车行驶信息的重要数据,为确定事故的真实原因提供重要参考。本文根据《汽车行驶记录仪国家标准》(GB/T 19056-2003)的要求,并针对燃料电池混合动力汽车的特殊通信需求,设计了用于汽车行驶记录仪数据通信模块的相应接口,内容包括RS232串口通信接口、CAN通信接口以及USB通信接口。其中,USB通信接口模块具有USB主机/设备双重功能,并可以实现两种功能之间的自由切换。采用RS232通信接口,是为了实现与PC机或其它串口设备(如串口热敏打印机)等进行通信。设计添加CAN总线接口模块是为了满足汽车行驶记录仪通过车载CAN网络进行数据采集的需要。而为了丰富被采集数据的存储方式以及提高与PC机之间的数据传输速度,研究设计了USB主/从功能一体化通信模块。其中,USB的主机功能能够识别、配置接入记录仪的U盘,并可以将通过CAN接口采集到的实时数据存储于U盘之中。USB的从机功能能够使PC机识别与支持该通信模块,并能使记录仪作为USB设备与PC机实现高速数据通信。文章详细分析了三种接口的基本结构与工作原理,通信模块的硬件电路设计和软件编程的功能实现。重点研究了USB接口的通信技术,涉及包括:USB设备被主机识别的枚举过程,海量存储设备支持的MassStorage类协议,FAT文件系统,如何使用Bulk-Only传输方式,通过发送UFI命令实现数据传输的读/写操作,以及完成USB从机功能所需开发的固件程序、USB驱动程序和用户应用程序的介绍等。最后,对本课题的设计内容进行了实验测试。实验结果表明,该系统运行稳定,能够实现数据的高速可靠传输与处理。
【Abstract】 Embedded system is a fast developing new field.RS232,CAN and USB have been developing rapidly in the field of electronic equipment, having the attributes of low-cost,rapid-speed,ease-of-extend,so they are applied widely.Therefore,the realization of RS232,CAN and USB communication functions in embedded system has the practical significance and the application prospect.As a real-time monitoring electronic product,Vehicle Traveling Data Recorder saves the important information of the running state of a car.It will provide reliable and correct information,which is helpful for the analysis of accidents.Based on the requirements of "National Standard of Vehicle Travelling Data Recorder"(GB/T 19056-2003) and special communication demand of FCEV,an Vehicle Traveling Data Recorder consists of RS232,CAN and USB communication modules were researched.The USB module has two functions—USB Host/USB Slave, and the two functions can be switched between each other.Using RS232 interface is for the communication between VTDR and PC or other serial devices(such as a printer).Adding CAN interface is used for getting data from CAN bus.In order to get rid of PC for storing collected data and to improve the speed of data transporting,a USB Host/Slave interface is designed.The host function could identify a U disk and store the collected data from CAN interface into the U disk.The slave function allows a PC to identify and support the USB interface module and to communicate with the VTDR by much more higher transporting speed as a USB device.This paper focus on the researching of basal configuration,working principle,hardware and software for the three interfaces and deeply analyses some special aspects of the USB interface module,such as the theory of USB interface,the enumeration of a USB equipment to the USB Host for identification,USB Mass Storage class specification of a mass storage removable device,construction of FAT file system,how a USB Host can use Bulk-Only transfer protocol to read/write the data on the USB flash disk by sending USB Floppy Interface(UFI) commands,and introducing three programs for realizing USB Slave function which are USB controller driver program,core driver program and user software.In the end,an experiment is carried out and reveals that the operation of this system is steady and the functions such as high rate data collecting,reliable transmission and processing are well fulfilled.
【Key words】 VTDR; RS232 Interface; CAN Interface; USB Host/Slave;