Download Serial Port Interface in Vb.Net Project

Download Serial Port Interface in Vb.Net Project



Introduction :

The serial port on our computers are with us for quite sometime now. It is more favored than the parallel port for interfacing with the outside world because it require lesser wires and can go farther distance and can even be used with newer technologies such as Bluetooth using its serial port capability. In this tutorial is a quick start guide in communicating with the serial port using VB.net without any previous knowledge.

Before we start, VB.net 2010 must be installed. The installer can be freely downloaded from Microsoft. After that follow these Steps.

  • Start Visual Basic 2010 Express and you will be prompted with the Start Page Window.
  • Select on New Project and select Windows Form Application and give the Project a name, in this case I named it Serial Port Interface.
  • A blank form will be displayed named Form1. This is the main form which will contain all other controls.
  • Click on the toolbox to show the  controls, you may want to click on the pin to disable the autohide feature.
  • Click on the form and change its name to frmMain (for easier identification specially when adding more forms). Also, change its name, in this case VB.net Terminal – Philrobotics. This name will be the one that will be displayed on the title bar.  Since this program is only a small program, we can disable the Maximize button by setting MaximizeBox value on the form’s property to false.
  • Let’s start to add some controls to our form. From the common Controls, add (2) two labels, (2) two combo box and (2) two buttons. Change the text of the first label to “Com Port:” and the second one to “Baud Rate:”. For the combo box change its name to cmbPort and cmbBaud for the purposes of easier identification when we will add the codes to our controls. Also, change the text of the two buttons, the first to “Connect” and the second to “Disconnect” and change their name to btnConnect and btnDisconnect. As you can see, I use cmb and btn prefix to refer to combo box and button same reason as above, for easier identification.
  • Next, from the Containers add two Group box and change its text to “Transmit Data” and “Received Data”. Inside the Transmit Data group box, add a textbox and a button. Change the name of the textbox to txtTransmit and the button to btnSend, also change its text to Send. On the Received Data group box, add a Rich Text Box and change its name to rtbReceived. Lastly and the most important, add the SerialPort from the components.
  • Now, we come to the next part, adding the instructions to our program. To start coding double click the form or press F7 to view the code. To add a code to individual controls just go back to the designer view or press Shift+F7 and double click a control to add code into it.
  • For instance if we double click on the Send button on the designer view the Code Editor will take us to Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click
  • On this Part is where we enter our codes.

To complete our program put the following codes to the code editor:


After putting all the codes we are now ready to compile our project. To do this go to, Debug -> Build SerialPortInterface.  If there are no errors, It will indicate Build Succeeded at the status bar.

  • The executable file of the compiled project is usually located at the binRelease of the project folder.
  • To test if our program is working, short the TX and RX pin of your serial port and  press F5 or click on the green triangle. Each data that we send must also be received by our program. In my setup I’m using a USB-to-Serial Converter and is allocated at COM18.


Download :

Password : CTprojects or codingtalks.com

You Need "Download Serial Port Interface in Vb.Net Project" ???

"Download Serial Port Interface in Vb.Net Project" (Source Code / Report / PPT) Totally belong to CodingTalks Team and We always ready to Share our Stuff with our users. If you are Very Much Interested on This Topic Then you must Leave a Comment what Exactly you Looking For Or Send us Email to get Full Information.

Coding Talks

Filed in: Computer Science, Electronics, VB.NET Tags: , , ,

Get Updates

Share This Post

Related Posts

One Response to "Download Serial Port Interface in Vb.Net Project"

  1. pllssss send me coding of on;line blood bank management system in php front end and sql as back end with in 2days

Leave a Reply

Submit Comment

© 2018 CodingTalks. All rights reserved.

Warning: filemtime(): stat failed for /home/codingtalks/public_html/wp-content/plugins/floating-social-share-bar//js/waypoints.min.js in /home/codingtalks/public_html/wp-content/plugins/floating-social-share-bar/floatingshare.php on line 213