Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   bit stuffing (http://www.go4expert.com/forums/bit-stuffing-t1375/)

asxetos 11Sep2006 14:34

bit stuffing
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

shabbir 11Sep2006 15:09

Re: bit stuffing
Can you let us know what is the data type you are using to store the bits.

asxetos 11Sep2006 23:06

Re: bit stuffing
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

shabbir 11Sep2006 23:08

Re: bit stuffing
So whats the harm then in checking the 5 consecutive 1's

asxetos 11Sep2006 23:12

Re: bit stuffing
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

All times are GMT +5.5. The time now is 07:00.