我想做51单片机向pc每隔1s发送“*”!怎么显示!VB通信下面设置如何更改?
PrivateSubForm_Load()DimIstringAsStringMSComm1.CommPort=1MSComm1.Settings="9600,N,8,1...
Private Sub Form_Load()
Dim Istring As String
MSComm1.CommPort = 1
MSComm1.Settings = "9600,N,8,1"
MSComm1.InputLen = 1
MSComm1.RThreshold = 1
End Sub
Private Sub send()
If MSComm1.PortOpen = False Then MSComm1.PortOpen = True
MSComm1.Output = sendstring
End Sub
Private Sub MSComm1_OnComm()
Select Case MSComm1.CommEvent
Case comEvReceive
Nowstring = MSComm1.Input
Instring = Instring + Nowstring
If Nowstring = "*" Then
data_number = data_number + 1
data_string(data_number) = Instring(总显示函数或子程序为定义怎么更改)
TextBox.txt = Instring
Instring = ""
End If
End Select
End Sub 展开
Dim Istring As String
MSComm1.CommPort = 1
MSComm1.Settings = "9600,N,8,1"
MSComm1.InputLen = 1
MSComm1.RThreshold = 1
End Sub
Private Sub send()
If MSComm1.PortOpen = False Then MSComm1.PortOpen = True
MSComm1.Output = sendstring
End Sub
Private Sub MSComm1_OnComm()
Select Case MSComm1.CommEvent
Case comEvReceive
Nowstring = MSComm1.Input
Instring = Instring + Nowstring
If Nowstring = "*" Then
data_number = data_number + 1
data_string(data_number) = Instring(总显示函数或子程序为定义怎么更改)
TextBox.txt = Instring
Instring = ""
End If
End Select
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询