I have used a RS232 to USB converter in my project, can anyone tell me how to write a program in VB to collect data from the converter?
The computer is using USB port and data from the MCU (RS232).
Please help me to solve this problem. Thank you so much.
my e-mail: 03905076d@polyu.edu.hk
The computer is using USB port and data from the MCU (RS232).
Please help me to solve this problem. Thank you so much.
my e-mail: 03905076d@polyu.edu.hk
hi,
your program needs to communicate with this virtual comport. Do a Google search on 'MSCOMM' and 'VB'. You will find what you need.
Da fripster
your program needs to communicate with this virtual comport. Do a Google search on 'MSCOMM' and 'VB'. You will find what you need.
Da fripster
Hi
Your program should talk to Serial Port. Writing Serial reception can be done using MSCOMM. The data should be in that format what serial Port supports.You concentrate on USB data transmission ie the format. after getting this you can contact me.
Your program should talk to Serial Port. Writing Serial reception can be done using MSCOMM. The data should be in that format what serial Port supports.You concentrate on USB data transmission ie the format. after getting this you can contact me.
Hi
I have a small VB5 application which uses the parity bit as the start of message. The application works correctly when I use real hardware serial port, but when I try to use an FTDI USB>RS232 adaptor the port does not signal the parity Fail/Change so the messages fail. This is because the adaptor does not by default sense the parity and needs to be told specifically via Win32 API to notify me of the change. Since I'm using VB5 MSComm I will have to rewrite the application in C++ just to do this. VB hasn't got sufficient control in its MSComm control.
I have a small VB5 application which uses the parity bit as the start of message. The application works correctly when I use real hardware serial port, but when I try to use an FTDI USB>RS232 adaptor the port does not signal the parity Fail/Change so the messages fail. This is because the adaptor does not by default sense the parity and needs to be told specifically via Win32 API to notify me of the change. Since I'm using VB5 MSComm I will have to rewrite the application in C++ just to do this. VB hasn't got sufficient control in its MSComm control.
We also have found problems with USB to RS-232. Our program works correctly with standard serial cables. However when we moved to support new laptops, which didn't have serial/RS-232 ports, issues occurred.
FTDI chips where found to cause problems, probably related to the Parity character??? mentioned previously.
Silicone Labs chips (CP2102) were found to perform correctly. Unfortunately we couldn't find a supplier with a commercial solution (ie in a nice box/case), so we have begun producing our own.
Anybody else want some? :)
Do wish I knew more though... several hours of port snooping blah blah blah and couldn't find another solution which would still be compatible with product in the field!
FTDI chips where found to cause problems, probably related to the Parity character??? mentioned previously.
Silicone Labs chips (CP2102) were found to perform correctly. Unfortunately we couldn't find a supplier with a commercial solution (ie in a nice box/case), so we have begun producing our own.
Anybody else want some? :)
Do wish I knew more though... several hours of port snooping blah blah blah and couldn't find another solution which would still be compatible with product in the field!
I'm doing a project on "Power Quality Analyzer". I have converted the supply voltages into digital quantitites and then stored in RAM and then serially sent to RS-232 port. All these tasks are done by microcontroller. Now I have to get the data in VB. What i have to do to collect the data? Can Anyone give the source code for this application? Also plz give me ur email id, so that i can contact u.
We still have problems with some USB to RS-32 converters. In particular, I have tested 3 brands so far:
1) Radio Shack single port: always works OK for me;
2) FTDI single port, with the Prolific chipset: Did NOT work at first, but did after removing and inserting several times, and the COM port numbers always came up the same when removed and reinserted.
3) ByteRunner PL-8COM (box says MG-UX38, uses the Prolific chipset) 8-port device: This works OK with HyperTerminal, but not with our own application (which calls CreateFile()). Also, when I unplug and reinsert the USB cable, it makes me reinstall the device driver 9 times again (one for the bridge, 8 times for the ports).
Not only that, but the COM port numbers creep up each time, as though you had a bunch of these boxes all connected up.
We need USB to 4 RS232 devices, which don't have to be in an external case. Do you have those, or can you tell me who does with the Silicone Labs CP2102 chips?
1) Radio Shack single port: always works OK for me;
2) FTDI single port, with the Prolific chipset: Did NOT work at first, but did after removing and inserting several times, and the COM port numbers always came up the same when removed and reinserted.
3) ByteRunner PL-8COM (box says MG-UX38, uses the Prolific chipset) 8-port device: This works OK with HyperTerminal, but not with our own application (which calls CreateFile()). Also, when I unplug and reinsert the USB cable, it makes me reinstall the device driver 9 times again (one for the bridge, 8 times for the ports).
Not only that, but the COM port numbers creep up each time, as though you had a bunch of these boxes all connected up.
We need USB to 4 RS232 devices, which don't have to be in an external case. Do you have those, or can you tell me who does with the Silicone Labs CP2102 chips?
Here you can find some USB -> 4 (8) serial RS converters
regards,
Bravo
http://www.moxa.com/Zones/Serial_Communication/Product_Comparison.htm
regards,
Bravo
http://www.moxa.com/Zones/Serial_Communication/Product_Comparison.htm
If the system is Windows-based, then the USB-serial converter automatically provides for a virtual serial port that can be treated by your software as an ordinary legacy serial port. Just use the high-level system interface and don't try to peek and poke values into registers that aren't there. Find out from the Device Manager what the COMx name is (COM3, COM4?) of the USB-Serial device, and then reference that COM port number in your software just as if you were referencing a real COM port. The baud rate is irrelevant.
Robert Scott
Real-Time Specialties
Ypsilanti, Michigan
Embedded Systems Consulting
Robert Scott
Real-Time Specialties
Ypsilanti, Michigan
Embedded Systems Consulting
i have tried to use usb to rs232 converter and found
that even after checking the com port number that they
don't work well. Not to despair, another slightly more
complicated usb to rs232 converter comes with other
devices such as extra usb ports, mini din ports, 1 sr232
port, even a fire wire port. now its cost was more than
twice than the simple usb converter but it worked. it
installed the same with software and was called a
porlithic com port or it sold as a LAN dock device. it
comes with its own power supply but will do many more
types of work.
that even after checking the com port number that they
don't work well. Not to despair, another slightly more
complicated usb to rs232 converter comes with other
devices such as extra usb ports, mini din ports, 1 sr232
port, even a fire wire port. now its cost was more than
twice than the simple usb converter but it worked. it
installed the same with software and was called a
porlithic com port or it sold as a LAN dock device. it
comes with its own power supply but will do many more
types of work.
I'm facing the same problem where my app works on serial port but fail at virtual comport. Can you give the brand of the rs232 converter?
I have an application where I have to get the Weight from a scale connected to thru RS232. Not able to get data. If u have any sample code can u pls send it...
Regds
Mohan
Regds
Mohan
Hi Robert Scott,
could you explain to me how is that about use the high-level system interface?
My problem is I used the same program for the serial port and it works but with the converter usb-serial doesn't
could you explain to me how is that about use the high-level system interface?
My problem is I used the same program for the serial port and it works but with the converter usb-serial doesn't
Is it the same if the system is a Mas OS X??
Because I'm trying to sending and receive data to a device via a USB to Serail Converter, and I've no answer from the device. So I don't know if it is receiving the packets well? I'm using a script that worked with a normal Serial Port.
Emilien
emilio1202@gmail.com
Because I'm trying to sending and receive data to a device via a USB to Serail Converter, and I've no answer from the device. So I don't know if it is receiving the packets well? I'm using a script that worked with a normal Serial Port.
Emilien
emilio1202@gmail.com
When you installed the USB Converter hardware a 'normal' communications port would have been specified [com2, com3 etc.]. Once you know which com port is being assigned to the converter, you can treat it as you would any other in VB.
regards
Stephen
regards
Stephen
Go get Jan Axelson's book:
USB Complete: Everything You Need to Develop Custom USB Peripherals
ISBN 1931448027A
The current edition is the 2005 edition. There are earlier 1999 and 2001 editions.
USB Complete: Everything You Need to Develop Custom USB Peripherals
ISBN 1931448027A
The current edition is the 2005 edition. There are earlier 1999 and 2001 editions.
Hi Charmaine,
I have the same problem with the USB-serial converter.
My app works OK with all the serial ports, but when I used the converter, the data sent is wrong
Have you resolved your problem?
Could you explain to me how?
Thanks a lot.
My e-mail is gab_martha@yahoo.com
I have the same problem with the USB-serial converter.
My app works OK with all the serial ports, but when I used the converter, the data sent is wrong
Have you resolved your problem?
Could you explain to me how?
Thanks a lot.
My e-mail is gab_martha@yahoo.com
Hi all,
If you wrote a successful application for a standard serial port then the 'principles' are that it should run with a virtual port via USB. Of course text books and reality aint always the same.
What I have found with a few applications is that the timing paramters used may need adjusting to suit the new com port.
I try to write our applications with variables defined for the loop/character and timeout values. This way I can alter the settings in a compiled and running app.
hope this helps.
Stephen.
If you wrote a successful application for a standard serial port then the 'principles' are that it should run with a virtual port via USB. Of course text books and reality aint always the same.
What I have found with a few applications is that the timing paramters used may need adjusting to suit the new com port.
I try to write our applications with variables defined for the loop/character and timeout values. This way I can alter the settings in a compiled and running app.
hope this helps.
Stephen.
i'm interested in the same information. please send it to me also.
jafar13695@yahoo.com
jafar13695@yahoo.com
Whenever you use such a converter, It gets configured between COM3 to COM6. Exact port can be verified from Device Manager. Under Ports option, it shows you how many ports are configured. Then in VB, you can use MSComm1.CommPort = 3 if it is configured as COM3. Rest everything is same.
Good Luck,
Milind
Good Luck,
Milind
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2010 Nerds in Control, LLC. All rights reserved.
Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.
Fortune
"Text processing has made it possible to right-justify any idea, even
one which cannot be justified on any other grounds."
-- J. Finnegan, USC.







