March 26, 2009

serial port interfacing using visual basic

admin

interfacing using visual basic, serial communication, serial port COM1, serial port comunication using visual basic.NET vb.net, serial port interfacing, serial port interfacing using Visual C#, vb with RS232

Ads



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 serial port interfacing using visual basic

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:
  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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
Name : 
Mail : 
Website : 
Message :