Question:
What language to use for serial communitcations?
p4rdner
2007-01-03 08:19:28 UTC
I need a recommendation for what language I should use to do serial communications over RS232. I know a little C++ but all I learned was console apps. I have tried VB because there is a "com control" already in it, but I didn't get very far with it.

I need something that I can set up my own protocol as well as the standard com stuff (baud, Xon/Xoff, etc.) It will be communicating with a microcontroller. Right now is communicating via “Hyper terminal”, but I want something.... prettier. I well be starting another C class in a couple of weeks, but I think its going to be another “Intro to...”
Six answers:
justme
2007-01-04 06:04:20 UTC
C or C++ would work. Heres a link to some code to show you how to do it. http://www.codeproject.com/system/chaiyasit_t.asp

If that doesnt work, heres a list of other projects.

http://www.codeproject.com/info/search.asp?cats=2&searchkw=serial+port&Submit1=Search&author=&sd=15+Nov+1999&ed=4+Jan+2007
Wesley C
2007-01-03 11:04:04 UTC
you are probalby going to be doing protocol level stuff.. so you are going to need acess to bit level operations. So c/c++ would be your best choice. Almost all programs of this sort use c. In this case c makes more sense then object oriented c++ code. I usually write all of my code in c++, but I also do alot of low level stuff like this, including drivers and c is the way to go.
Julio M
2007-01-03 09:27:16 UTC
you can use api's in Vb 6 to perform this task. you could also do it in low level C++. I did that project at college, we used a C++ program that was already provided by a link, but I don't really have that link available sorry.
yna_2006_cv
2007-01-03 09:46:19 UTC
Try C#. It's easyer then it seams. If you want to learn C# try the next book: Programing Microsoft Windows with C# byCharles Petzold
poorcocoboiboi
2007-01-03 08:25:10 UTC
I suspect "COM control" actually refers to Component Object Model, not COM ports. Sorry I can't be more helpful -- I'm a Unix guy. :-)
anonymous
2007-01-03 08:23:50 UTC
"C" Language or "C#" would be a good option for this.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...