Thread: Basic Serial Communication (Writing)

  1. #1
    Registered User
    Join Date
    Aug 2009

    Basic Serial Communication (Writing)


    I am a student and am working for a company over the summer. I am very new to C and and writing on an XP machine.

    Basically, I was wondering if anyone could help me understand how to write to a comm port. I am trying to write simple strings across COM4 with the following configuration:
    Parity: none
    Data bits: 8
    Stop bits: 1

    I was just wondering how I could send a specified string across the specified COM port with the least amount of code.

    In the end I want to be able to send a string once every second through COM4.

    Any help or code would be great, I am very new to C (started with java) and I really would like to learn how to do this. Thanks for everything in advance.


  2. #2
    Registered User kengr's Avatar
    Join Date
    Aug 2009
    There's an article by Robertson Bayer that covers the basics of Win32 serial port programming in C. The link is . This should be a good starting point.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Serial communication
    By chico1st in forum C Programming
    Replies: 8
    Last Post: 09-10-2008, 02:01 PM
  2. Advice on writing a basic encryption program?
    By osiris^ in forum C Programming
    Replies: 2
    Last Post: 09-10-2007, 02:02 PM
  3. Serial Port Communication
    By maxorator in forum C++ Programming
    Replies: 11
    Last Post: 04-27-2006, 03:13 PM
  4. Please help with serial communication problem - Long
    By spdylude in forum Windows Programming
    Replies: 3
    Last Post: 04-06-2005, 09:41 AM
  5. Bioscom serial communication
    By PierreB in forum C Programming
    Replies: 1
    Last Post: 10-24-2004, 10:04 AM