|
发表于 2012-11-1 16:30:17
|
显示全部楼层
本帖最后由 ntwhq 于 2012-11-1 16:48 编辑
谢谢分享!VB程序调试中发现一问题:
子程序
Private Sub Form_Load()
With Com
.CommPort = 3 '设置Com1为通信端口
.InBufferSize = 1 '设置缓冲区接收数据为40字节
.InputLen = 1 '设置Input一次从接收缓冲读取字节数为1
.RThreshold = 1 '设置接收一个字节就产生OnComm事件
.Settings = "9600,N,8,1"
End With
Com.PortOpen = True
End Sub
中CommPort = 3应为CommPort = 1
楼主可能使用了USB转串口线,将串口设置成了Com3。 |
|