What is the best language to deal with Ports?

Thread Starter

Eng_Bandar

Joined Feb 27, 2010
46
Hi Papabravo,

you know each language have features may be not find in others. Some languages are better in hardware like C language. About me I deal with Matlab in serial ports and it is very nice and easy but unfortunetly Matlab don't support USB communication directly for this reason I search to other language execute my project and strong to support many things. I can't every time change my programming language to execute my project this is very hard. My interests to do projects have softwares and hardwares together. I like also do projects contain GUI and join it with circuit. I did project contains MatLab GUI, MikroC Pro and Proteus this project is compare between two images if they are same send data to PIC and pic will execute command. I like before do any project simulate it. I think now you knew what I mean in What is the best language to deal with Ports? Also support GUI applications to do excellent projects. I want choose one of these Java or C++ or C#
 

Papabravo

Joined Feb 24, 2006
21,227
Support for things like USB is more a function of the operating environment rather than the language. If you look carefully, these things are handled by libraries and other support packages rather than being embedded in the structure of the language. There is no earthly reason why Matlab could not support USB since ultimately, under Windows that support would use the same call to the Windows API function CreateFile, that is used for serial port access.
 

debjit625

Joined Apr 17, 2010
790
Communication with ports are best done with hardware drivers i.e. device drivers in windows normally,and for that we use a mixture assembly and C language(I use x86 assembly language, because my processor is Intel P4 32bits).We have to create a kernel driver to access any I/O port in windows for example USB,serial,parallel,etc.

Not everybody can creates kernel drivers,some use drivers already created but then you have to compensate about the speed of communication between your application and the driver as you will be not knowing about the structure of the data flow through the driver totally.

Now about the GUI application...

C++ will be the best as its native which gives these kind of application speed of communication better(both with the driver and user interface) then any other IM language.On the other hand its C# and Java, in both you will find creating GUI very simple and fast development ,but if your application is going to perform on windows platform then C# will be good as compare to Java.

What I do is use C# to create prototype then I port the program to C++.

Good Luck
 

jfm

Joined Sep 11, 2010
1
I'm not a programmer but have dabbled with a few software fun projects using QBASIC; a 'tic-tak-toe' game that appears on screen, as to the game layout, with 9 holes. When I press a number, from 1 to 9, the appropriate hole fills with a color, flashes and a sound is played. If three holes are filled vertically, horizonally or diagonally a line is drawn through them, winner indicated, sounds, etc., are heard, which is no big deal for programmers to come up with. However, I would like to use REAL mechanical switching inputs to the game, as inputs are indicated, using a USB port. Any suggestions as to how I may approach this? Thanx, JFM
 
Top