主题:关于串口传送问题
我想用VB向串口发送:F0 68 05 11 01 55 6C 十六进制数据该怎么完成呀?
我用下面这个程序试了一下但是单片机没有反应,请各位大哥帮帮忙
Private Sub Command1_Click()
Dim s(6) As Byte ‘建立数组
s(1) = F0
s(2) = 90
s(3) = 5
s(4) = 11
s(5) = 1
s(6) = C1
MSComm1.Output = s
End Sub
Private Sub Form_Load()
MSComm1.CommPort = 1 ’初始化串口
MSComm1.InBufferSize = 1024
MSComm1.OutBufferSize = 512
MSComm1.Settings = "19200,E,8,1"
MSComm1.PortOpen = True
End Sub
我用下面这个程序试了一下但是单片机没有反应,请各位大哥帮帮忙
Private Sub Command1_Click()
Dim s(6) As Byte ‘建立数组
s(1) = F0
s(2) = 90
s(3) = 5
s(4) = 11
s(5) = 1
s(6) = C1
MSComm1.Output = s
End Sub
Private Sub Form_Load()
MSComm1.CommPort = 1 ’初始化串口
MSComm1.InBufferSize = 1024
MSComm1.OutBufferSize = 512
MSComm1.Settings = "19200,E,8,1"
MSComm1.PortOpen = True
End Sub