- Category:
- CSharp
- Tags:
-
- File Size:
- 2kb
- Update:
- 2014-05-06
- Downloads:
- 0 Times
- Uploaded by:
- 朱光前
Description: 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
To Search:
File list (Check if you may need any files):
VB实现pc与单片机串口通信任务