Thread: sending/recving 0xff over RS232 in C

  1. #1
    Spam is Good
    Join Date
    Jan 2009
    Location
    In a cave on Mars
    Posts
    37

    sending/recving 0xff over RS232 in C

    Hi,

    When I send 0xff over serial, I only recv 0x7f. My write/read type is unsigned char, so I can't see why I'm not recv'ing the MSB. Any ideas?

    Thank you.
    Last edited by coletek; 04-02-2009 at 07:17 PM.
    "What comes around, goes around"

  2. #2
    Spam is Good
    Join Date
    Jan 2009
    Location
    In a cave on Mars
    Posts
    37

    Solved

    Solved: As I suspected, it was a serial port config issue. I had the strip
    parity bit option set (i.e. options.c_iflag |= (INPCK | ISTRIP)).
    "What comes around, goes around"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple RS232 Question
    By ricky1981 in forum C++ Programming
    Replies: 11
    Last Post: 06-13-2011, 12:13 PM
  2. RS232 interface, DE2-70 board
    By duffbuster220 in forum C Programming
    Replies: 3
    Last Post: 05-02-2009, 01:22 PM
  3. Read and display signel serial mouse RS232 in C
    By zebres in forum C Programming
    Replies: 1
    Last Post: 03-22-2009, 09:09 AM
  4. To generate bar code from a number
    By darkducke in forum C Programming
    Replies: 18
    Last Post: 01-16-2008, 06:33 AM
  5. rs232 with win api
    By alaturka in forum C Programming
    Replies: 14
    Last Post: 12-27-2005, 10:24 PM