09.09.2019
Posted by 

Hello folks, Visual Basic.net is an easy to learn language from Microsoft for the windows platform.One of the cool features of Visual Basic.net is the ability to whip up good looking gui components with a few lines of code. In this tutorial we are going to use Visual Basic.net to program your PC's Serial Port and communicate with an embedded microcontroller like MSP430 or 8051. Hi Everyone i have written a progarm in Visutal Basic. Net 2010.Net Framework 4 for receving data from a serial port to my proram thur 9-Pin Serial cable.

  1. Visual Basic Serial Port Communication Example
  2. Serial Port Receive Data Vb Net Format In Excel
Port

Visual Basic Serial Port Communication Example

Data

Serial Port Receive Data Vb Net Format In Excel

CODE - Public Function ReceiveSerialDataPort8 As String' Receive strings from a serial port.Dim returnStr As String = 'Dim com1 As IO.Ports.SerialPort = NothingTrycom1 = My.Computer.Ports.OpenSerialPort('COM8', 9600, Parity.None, 8, StopBits.One)com1.ReadTimeout = 10000DoDim Incoming As String = com1.ReadLineIf Incoming Is Nothing ThenExit DoElsereturnStr &= Incoming & vbCrLfEnd IfLoopCatch ex As TimeoutExceptionreturnStr = 'Error: Serial Port read timed out.' FinallyIf com1 IsNot Nothing Then com1.CloseEnd TryReturn returnStrEnd FunctionThanks,Shaminda RE: reading data from serial port vb.net 2012 (TechnicalUser) 3 Oct 14 11:34.