Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Serial port component

Status
Not open for further replies.

hennep

Programmer
Dec 10, 2000
429
0
16
I need a component to access the serial port in CBuilder. There is a lot to find on the web but most of it delphi or msvc. Does anyone know of a vcl component that is written in c++ instead of pascal?
I need to run multiple instances to address several usb2serial converters.

many thanks in advance.
hennep

======================================================
Computer programmers don't byte, they nibble a bit
 
I'm in the same boat. TurboPower's AsyncPro won't work with the newer OS and newer C++ Builders due to Unicode. There is a newer version of AsyncPro but like you said, it's written in Pascal. I've trying to get it to compile in in C++Builder 2010 but so far, no joy.

TMS has one but it runs about $75. If I can't get AsyncPro or TComPort compiled in C++, I might have to fork out some $$$.


James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
At first sight it looked too good.
I have installed the TMS trial component. When I run the project it asks for a .pas file. (VaComm1.pas)
The TMS component is also written in pascal.

$75 is not too bad. I need it for a project and takes me at least one day to create a simple component myself. Using separate threads to receive the data takes even longer.
Maybe the easiest approach is to use one of these msvc projects and convert it to bcb.

codeproject has a few usefull projects that might be suitable to convert, but it is still a lot of work:

=================================
Computer programmers don't byte, they nibble a bit
 
Hi James,

I modified a simple class to communicate with the serial port. Found the original on the codeproject site.
I will start with a receiving thread tomorrow.

This zip contains a test project written in bcb6

It only starts the log function for a microcontroller board that I recently developed. For me this is the easiest way to generate al lot of serial data :)

have fun with it

=================================
Computer programmers don't byte, they nibble a bit
 
Thanks. I'll take look see. My app requires a thread that listens to a serial port for data coming from a PLC component. The old AsyncPro was threaded for me so it was super easy to set up. If you are still using BCB6, AsyncPro will work for you. That's what I used in BCB6.

Now I'm using RAD Studio (C++ Builder) 2010 and everything has to use Unicode so I have to look for components that can use Unicode.


James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
This version has a thread to read from the serial port. I deliberately did not use events because we need a window handle to send the events. I do not have plans to put it in a component yet. The idea is, when I leave it in a class there are no compiler dependencies.
I have replaced the zip on my server: It does exactly what I need at the moment, just communication.

I keep looking for a vcl component to be able to handle the other comport events. For the current project I need communication without handshaking. But if you find a c++ component that handles the complete serial port, please let me know.

=================================
Computer programmers don't byte, they nibble a bit
 
Thanks. I will.


James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top