Recommend a language

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Hi guys

What is the easier language to learn to interface to rs232 and USB port on a PC(windows environment), I don't need fancy stuff, all I need is read and send datas, and to some calculation.

GUI app is prefer.

I only know C, and touch on some other languages a bit.

Thanks
 

ErnieM

Joined Apr 24, 2011
8,415
I'd vote for Visual Basic, either version 6 if you can still get it, or the latest dot-net version which is freely downloadable from Microsoft.
 

tshuck

Joined Oct 18, 2012
3,534
I'd probably say C#. Coupled with the .Net framework, C# can do a lot! I actually started in C# to do what you are describing. I wrote a simple program to transmit certain commands over to a PIC to control some LEDs. I suggest C# since you already know C, and the syntax, minus the object-oriented part, is largely the same.

Python has some plugins, the PySerial package comes to mind, that can access a serial port, and I'm sure there are libraries to support USB.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
I'd probably say C#. Coupled with the .Net framework, C# can do a lot! I actually started in C# to do what you are describing. I wrote a simple program to transmit certain commands over to a PIC to control some LEDs. I suggest C# since you already know C, and the syntax, minus the object-oriented part, is largely the same.

Python has some plugins, the PySerial package comes to mind, that can access a serial port, and I'm sure there are libraries to support USB.
What IDE are you using with C#? Any good free one?
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
I can properly stat at VB within 30mins (done it before), but what do I need to learn before I can write some simple GUI app with C#? not talking to RS232 or USB at this stage, just simple Hello World!

I teach myself a bit C++ on windows before, the windows handling thing seem to give me a headache the last time I tried to learn it.
 

THE_RB

Joined Feb 11, 2008
5,438
To "read and send datas" you don't really need any language.

You can get little freeware PC programs that will send a text file (or binary file) out the serial/USB port, and will record any incoming text or binary data from the serial/USB port to another file.

That's all you need to do datalogging or data transmission (from the PC end).

Then from a received data file you can chart it in Excel or another spreadsheet, complete with indicators or text markings etc.
 

Thread Starter

bug13

Joined Feb 13, 2012
2,002
To "read and send datas" you don't really need any language.....
I am thinking more of off load the heavy duty job to the PC and control the stuff with a MCU in real time (or at least as fast as possible).

But thanks for your tips :)
 

tshuck

Joined Oct 18, 2012
3,534
I can properly stat at VB within 30mins (done it before), but what do I need to learn before I can write some simple GUI app with C#? not talking to RS232 or USB at this stage, just simple Hello World!

I teach myself a bit C++ on windows before, the windows handling thing seem to give me a headache the last time I tried to learn it.
Well, using the .NET framework, 45 seconds!:)

No, Seriously, there is a designer tool built in that allows you to drag and drop components(called controls) onto the window. WindowsForms(WinForms) is probably easiest, and WPF(Windows Presentation Foundation) is a bit more of a learning curve, but is extremely powerful. I'd recommend you start with WinForms....

One of the controls in the WinForms toolbox(the place you drag controls from) is the SerialPort, allowing you to control the serial port, be it virtual or real. This, a RS232 to UART adapter and you can talk to a PIC in minutes(ideally;)).

Tutorial:
http://www.homeandlearn.co.uk/csharp/csharp_s1p5.html
 
Top