March 26, 2009
serial port COM1 is a serial communication based physical interface, serial communication means that information transfers in or out one bit at a time, it has a 25-pin, look at the figure below to see it’s image
Serial port
To access this port usng visual basic you have to use ActiveX named MScomm
This ActiveX comes with visual bsic from microsoft, it is used to make a serial connection with other devices such as phone network or your custom circuit.
to download this ActiveX you can follow this link:
http://www.yes-tele.com/mscomm.ZIP from yes-tele.com
This ActiveX can be choosen and drag drop it to your form invisual basic.
At the first click on this ActiveX and go to OnComm() event for it, this event run when there is a data recieved, you can directly receive data as the followig:
suppose we have a Mscomm instance called comm1 and a Text box called Text1
Private Sub comm1_OnComm()
if(Comm1.CommEvent=’comEvReceive’) Then
Text1.text=Comm1.Input ‘ get info from seral port
End if
End Sub
That is to receive data, to send data using command button called Command1 you will do this :
Private Sub Command1_Click()
Comm1.Output = “1234″ ‘this is to out data
End Sub
You can download an advanced example about serial communcation from here: http://www.yes-tele.com/download/vb60.zip
Related Posts:
- MSComm activex free download
To access serial port usng visual basic you have to use ActiveX named MScomm This ActiveX comes with visual bsic from microsoft, it is used to make a serial connection... - Telephone Directory source code with visual basic
This example is a Telephone Directory source code with visual basic which shows and turns out the simple database operation like add, update and delete. the database connection to microsoft... - 3d buttons using visual basic
3d buttons using visual basic vb This example shows to you how you can make 3d buttons using visualbasic.. you can download it from www.arabyarea.com/en and run it to see... - make your custom menu using visual basic
this project code demonstrates to you how to make a cutomized menu you can colorize it as you like, also you can resize it as it is needed! you can... - Make elliptic or circular forms using visual basic
This visual basic code shows to you how to make Elliptic or circular forms, you may need this for splash screen or some tools forms. by this idea you add... - download Parallel Port Viewer controller
download Parallel Port Viewer This program views and controls parallel port . Program Features: - It is possible to change each bit in Data Register, Status Register and Control... - 3d text objects source code using visual basic
This program show to you how to write 3d text using vb .. it is a simple idea .. you can choose font size and words thikness also you can... - phone address book source code using visual basic
This example is a phone note book which demonstrate the simple database operation like add, update and delete. it connnects to microsoft access to get rows of contacts, the progam... - Dictionary using visual basic
This source code is a dictionary code.. you have fill all words in it and it's meaninig to have an answer for translation requests! download this dictionary code here The... - Eject CDROM source code using visual basic
this example is about ejecting CDROM, you can make a button to eject CDROM in your program as same as in this source code. enjoy downloading this example source code...



No responses to "serial port interfacing using visual basic"
No comments yet.
Leave a comment