What is the best language to deal with Ports?

Discussion in 'Programmer's Corner' started by Eng_Bandar, Sep 8, 2010.

  1. Eng_Bandar

    Thread Starter Active Member

    Feb 27, 2010
    50
    1
    Hi all,

    What is the best language to deal with Ports?

    give reasons.
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,142
    1,790
    I'm not sure what the candidate languages are, never mind which one is best or what the metric should be.
     
  3. Eng_Bandar

    Thread Starter Active Member

    Feb 27, 2010
    50
    1
    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#
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,142
    1,790
    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.
     
  5. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    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
     
  6. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    Labview is a drag and drop
     
  7. jfm

    New Member

    Sep 11, 2010
    1
    0
    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
     
Loading...