C# and Serial Ports

Discussion in 'C#' started by ljlong, Jan 6, 2009.

  1. ljlong

    ljlong New Member

    Joined:
    Dec 30, 2008
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Software engineer, embedded, rtos, machine control
    Location:
    Santa Rosa, CA
    I have MS Development Environment 2003 version 7.1.3088 and .Net Framework 1.1,
    old I know but I can't afford to update. My problem is there is no System.IO.Ports.
    The compiler is telling me that 'Ports' does not exist in the class or 'namespace Systme.IO'.
    I have 'using System.IO.Ports;' at the top of the file. Examples from the web tell me that all I need to do is add the above class and call the correct user functions. Is Ports a new feature? It is also not listed in Help->Index dialog list. I have the feeling I out of luck here. But, perhaps those more experienced in C# may have a solution that does not cost an arm and a leg.

    thanks
    jim
     
  2. suri123

    suri123 New Member

    Joined:
    Dec 17, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Dude,

    i am unable to paste the url i got, but try looking for how to use CreateFile in C# using google.

    i found good once pointing to bytes.com and webtropy
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    You would be able to post after getting the post count up in double digit.
     
  4. ljlong

    ljlong New Member

    Joined:
    Dec 30, 2008
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Software engineer, embedded, rtos, machine control
    Location:
    Santa Rosa, CA
    Thanks for the links
    FYI - I found out that net framework 2.0 has the required serial port links so I'll do the project in java

    jim
     
  5. suri123

    suri123 New Member

    Joined:
    Dec 17, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Thanks Shabbir.
     
  6. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    Why can't you afford to update, when the compilers are free?
     
  7. ljlong

    ljlong New Member

    Joined:
    Dec 30, 2008
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Software engineer, embedded, rtos, machine control
    Location:
    Santa Rosa, CA
    I was speaking of Microsoft's Visual Studio. I have an old version. I guess you are referring to a GNU type of c# compiler. First the reason I wanted to do a c# project was because I need some wheels up time with the development environment and its library's. I can still do the project; however, I will not have an RS232 serial interface. I'll use UDP and have an Arm 7 or 9 read the serial and send it via UDP. c# is a Microsoft creature and doing development outside of its development environment never occurred to me. I would first think of using java. In fact I'm a little surprised that a GNU type of c# compiler exist. I would have thought Microsoft would have copywrited it like intel did to the 8085's assembly language thus the Z80's back in the day.

    Thanks for the input. I'll look into a free one though using gdb to debug it doesn't sound like fun.

    jim
     
  8. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    Yes I know you're talking about Visual Studio, which is an expensive product. However the compilers can be downloaded from MSDN for free, although they don't come with the IDE. But you can get round that; use Eclipse or some other open source IDE instead. All the MSDN help stuff is online so all you lose there are the Visual Studio specific key bindings and behaviour.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice