Introduction - If you have any usage issues, please Google them yourself
VB serial communication with the microcontroller to achieve the task pc
//Use pc with vb achieve single-chip serial communication tasks
//Write program code
Definition of variables
Dim cnum As Integer loop count mark
Dim choosenum As Integer Select Indicators
Serial port initialization
Add the following code in the form s Load event to initialize the serial port
Private Sub Form_Load ()
MSComm1.CommPort = 1
MSComm1.InputMode = 1
MSComm1.RThreshold = 1
MSComm1.SThreshold = 1
MSComm1.Settings = "4800, n, 8,1"
MSComm1.PortOpen = Ture
choosenum = 1
End Sub