摘要
计算机上的RS-232串行通信标准接口可以方便地与外设进行通信以及对外设的监测数据进行实时的采集。用C语言编写上、下位机的串行通信程序时,主要有查询方式和中断方式两种不同的方法。其中中断方式避免长时间访问串行口的问题,数据交换可在上位机后台进行,在设计前台事务处理程序时就可以不考虑数据交换问题,提高了CPU的工作效率。因此,本文着重介绍中断方式下的通讯编程,并使用数传电台实现排爆机器人上、下位机的无线通信。
The RS-232 serial standard interface of communication on the computer can carry on communication with the peripheral hardware conveniently ,and sample data in real-time. There are mainly two kinds of different methods, i.e. inquiring way and interrupt way, to program for serial communication between the upper computer and the lower computer in C language. Interrupt way prevents from waiting for the serial interface in a long time. Data interchange can be completed in the backstage of the upper computer, which needn ' t consider the data interchange problem while designing the transaction processing procedure in the front desk and have improved the working efficiency of CPU. So, the interrupt way is mainly introduced here. Data transmission radio can be used for realizing the wireless communication between the upper computer and the lower computer of the bomb-exclusive robot..
出处
《微计算机信息》
北大核心
2006年第11Z期253-255,239,共4页
Control & Automation
基金
广东省科技计划项目资助项目(2004A10403006)
2005年华南理工大学百步梯攀登计划研究项目
关键词
串行通信
无线通信
C语言
查询方式
中断方式
serial communication,wireless communication, C language,inquiring way,interrupt way