摘要
在介绍Windows多线程技术及其编程思想的基础上,针对进行面向ITS车辆导航系统的研究时,需要用便携机实时接收多传感器(如里程计、数字罗盘、GPS等)的信息的实际需要,利用WindowsAPI函数实现了基于VC++6 0的分时串口通信,阐述了如何实现多线程技术。该技术采用PC机作为上位机,1对4单片机作为下位机,可使上位机分时地接收下位机发送过来的各个传感器的信息。通过跑车试验表明:应用了多线程技术的1对4单片机能快速、准确地完成数据采集任务。
The multi-thread technology and the programming idea in Windows were introduced.According to the practical demand that the experiment needs make portable computer receive the information from multi-sensors,such as speedometer,GPS and digital compass when making a research on the system of vehicle navigation based on ITS.Making use of the Windows API function implement the time-sharing serial communication based on VC++6.0 environment and thoroughly setting forth on how to carry out multi-thread programming.The multi-thread technology adopts PC as the master computer.The single chip of four in and one out was adopted as slave computer.It can make the master computer receive the message from every sensor sent by the single chip.From the experiment result of vehicle run experiment,the single chip applied the multi-thread technology can quickly and correctly finish the task of data collection.
出处
《仪表技术与传感器》
CSCD
北大核心
2004年第5期15-17,共3页
Instrument Technique and Sensor