Thread: Serial port programming

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    2
    Hello Mr. PierreB,
    I am also working on a similar thing as you.
    So i wanted to know of exactly how do you interpret :
    "0xC0 | 0x03 | 0x00 | 0x00" as "4800 baud, no parity, 8 bits, 1 stop"
    i mean could u tell me the way to write these codes and to interpret them?
    hoping for an answer
    thankyou

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    You expect him to come back about 3 years after he wrote his post here? I wouldn't expect it.

  3. #3
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732
    Never realized that it was such a old post. And perhaps this was his last post. And pretty sure that he wont be back. lol

    ssharish2005

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    2
    Quote Originally Posted by MacGyver View Post
    You expect him to come back about 3 years after he wrote his post here? I wouldn't expect it.
    So, if he cannot, i request anyone to kindly answer my question.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,667
    Split from ancient thread - http://cboard.cprogramming.com/showthread.php?t=58196

    @ jitender dogra
    Are you really using such an old compiler for accessing the serial port?
    The answer to your question is to look inside something like bioscomm.h, where those hex constants should have meaningful #define names, names which should have been used in the original post to being with.

    Remember, unless your real OS is DOS (and not some window inside some other OS), then that code is obsolete.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. serial port to poll on request
    By infineonintern in forum C++ Programming
    Replies: 2
    Last Post: 06-11-2009, 06:52 AM
  2. Can't Read From Serial Port
    By HalNineThousand in forum Linux Programming
    Replies: 14
    Last Post: 03-20-2008, 05:56 PM
  3. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  4. Reading and writing to a serial port
    By SwarfEye in forum C Programming
    Replies: 2
    Last Post: 08-18-2006, 12:28 AM
  5. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-08-2003, 04:59 PM