摘要
本文讨论了VB串行通信中MSComm控件InputMode属性的使用方法。在Binary模式下传输数据,可以解决ASCII码中传送超过128的字符时所存在的问题,消除了在Text模式下,String变量只能处理ASCII码0~127的文本字符的缺陷,真正实现Windows环境下计算机与单片机的通信。同时给出了串行通信中字节的发送与接收的应用实例,具有一定的实用价值。
The usag e method of the InputMode properties for MSComm control is discussed in Visual Basic serial communication.Under the Binary Mode the data transmitted can resolve the existent problems while transmit over 128's character in the ASCII,and eliminate the limitation that String variable can only deal with0~127's text character of the ASCII under the Text Mode.It implements in deed the communication between comput-er and sing lechip in the Windows.At the same time,the application example that the byte is sent and re-ceived is g iven out in the serial communication.The practice proves that it has applied value in a certain extent.
出处
《工业控制计算机》
2002年第3期48-51,共4页
Industrial Control Computer