Basic Serial Communication (Writing)

This is a discussion on Basic Serial Communication (Writing) within the C Programming forums, part of the General Programming Boards category; Hello, I am a student and am working for a company over the summer. I am very new to C ...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    1

    Basic Serial Communication (Writing)

    Hello,

    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:
    Baud:4800
    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.

    -DUG

  2. #2
    Registered User kengr's Avatar
    Join Date
    Aug 2009
    Posts
    1
    There's an article by Robertson Bayer that covers the basics of Win32 serial port programming in C. The link is http://www.robbayer.com/files/serial-win.pdf . 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, 03:01 PM
  2. Advice on writing a basic encryption program?
    By osiris^ in forum C Programming
    Replies: 2
    Last Post: 09-10-2007, 03:02 PM
  3. Serial Port Communication
    By maxorator in forum C++ Programming
    Replies: 11
    Last Post: 04-27-2006, 04:13 PM
  4. Please help with serial communication problem - Long
    By spdylude in forum Windows Programming
    Replies: 3
    Last Post: 04-06-2005, 10:41 AM
  5. Bioscom serial communication
    By PierreB in forum C Programming
    Replies: 1
    Last Post: 10-24-2004, 11:04 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21