Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help VB.net serial communication

Status
Not open for further replies.

ECG eng.

Junior Member level 1
Joined
Oct 5, 2010
Messages
17
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,395
hi all
i have to connect a microcontroller to a pc through serial port and use VB.net 2008 to receive the data ... and i m stuck neeed hints or a simple program that will receive the data from the microcontroller.... thanks in advance
 

First thing to do is add a serialport to your program. Look at the API and see how to instantiate the serial port. You can declare which COM port on your pc the microcontroller is connected to and then open the port. From there it is as easy as SerialPort.WriteLine("BLAH") or SerialPort.ReadLine()

Good luck
 

thnx for the help ... i have changed to vb6 coz i've been told it's better for hardware inteferance but having problems with receiving and sending data no i dea y ?
to connect between the microcontroller and vb6 i used UM232R (UART to USB) converter.
 

didn't your serial communication work for VB.net 2008 program?
 

no it ddnt we always had problems :( and nw in vb6 the com port is not identified eventhough we have downloaded the driver ??!! i dnt think the problem is with the program it's connection problems.. we have tried sending only or recieving only and nothing is happning
 

Since it is connection problem, it is better if you can post your circuit diagram with codes.

Try these steps:
loop back serial Tx and Rx pins and then check the echo using your vb6 program
once this is done. Then check your microcontroller circuit and program
 

it worked worked but with troubles the data dont stop from being transimted from the microcontroller and recived by the transimtter i have un-enabeled the transmission but still i am getting the data ??! wt to do
 

For information on using the serial port with VB.net you could try my article in Circuit Cellar Issue 197 (Dec. 2006) entitled "Visual Basic 2005 and the Serial Port". Jan Axelson did a similar article in "Nuts and Volts" some time after that.

For use of the serial port in VB6 there are several sources including "Serial Port Complete" by Jan Axelson. It is also addressed in the a chapter and an appendix of my book "Excel by Example: A Microsoft Excel Cookbook for Electronics Engineers" published by Newnes/Elsevier ISBN 0750677562

If you have a copy of VB6 Enterprise or Professional editions then using the serial port will not be a problem.
If you have a valid (lesser) copy of . the paid for .Net version, Microsoft used to (and may still)send you a professional version of VB6 on request.

On other systems, even those that you have installed the target application built under a legal copy of VB6 there is sometimes a problem installing MSCOMM32.ocx. Here is a reference explaining what to do.
**broken link removed**

-Aubrey
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top