Thread: Writing data to serial port

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    92

    Writing data to serial port

    Hello

    I want to wirte code that will be able to send data to a serial port(RS232) but I never did such thing before. Can anyone give me some pointers on how this can be done. How to send a simple data like "hello" through the serial port.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    I've got an interesting game to play.
    It's called guess the OS and compiler.

    Nah, I'm bored of that game, you'll just have to tell us.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Sep 2005
    Posts
    92

    Opearting syatem and compiler

    My operating system is windows XP and the compiler i'am using is turbo C. I would really appriciate any hepl anyone can give me because I have no idea how this is done. It would be nice if someone can point out the structure of the program.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Is there a real reason as to why you're using a 16-bit fossil compiler on a 32-bit OS?

    Vista is nearly here - are you still gonna try and use that compiler?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    What Salem is trying to tell you is that you need to download and install Code::Blocks, Dev-C++, or some other IDE that has the compiler with it. . . those that I mentioned include GCC.

    As far as writing to the serial port, Google is your friend. Try this search string:
    "C programming" Windows XP "serial port"
    Experts Exchange was the first thing I got. There was a complete example in that listing.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Serial Port Questions
    By valaris in forum Tech Board
    Replies: 2
    Last Post: 05-22-2009, 08:26 AM
  2. sending data over UDP from serial port
    By forumguy in forum Linux Programming
    Replies: 0
    Last Post: 04-25-2009, 02:10 PM
  3. xor linked list
    By adramalech in forum C Programming
    Replies: 23
    Last Post: 10-14-2008, 10:13 AM
  4. Replies: 2
    Last Post: 05-22-2008, 11:43 PM
  5. gcc problem
    By bjdea1 in forum Linux Programming
    Replies: 13
    Last Post: 04-29-2002, 06:51 PM