1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

bit stuffing

Discussion in 'C' started by asxetos, Sep 11, 2006.

  1. asxetos

    asxetos New Member

    Joined:
    Sep 11, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    hello guys...i try to make an application, i have to make to communicate 2 devices together and send packets to each other...the problem is i cant manage to develop the bit stuffing problem...can anyone help me with that?

    bit stuffing: one counter will count the bytes and if check that 5 bits are "1" in row then it puts one 0 after those 5 "1" bits...

    i want that program work in c, thanks a lot
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    Can you let us know what is the data type you are using to store the bits.
     
  3. asxetos

    asxetos New Member

    Joined:
    Sep 11, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    i use a pointer that saw to an address...
    so i read byte per byte ( with masking technique) and then i write the results ( after bit stuffing) in that pointer
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    So whats the harm then in checking the 5 consecutive 1's
     
  5. asxetos

    asxetos New Member

    Joined:
    Sep 11, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    i write that program in c, so at least i have to read bytes per bytes
    but i want to develop bit stuffing technique in bits
     

Share This Page