??? 02/19/07 22:28 Read: times |
#133269 - Dont count bits until you have the sentinel! Responding to: ???'s previous message |
You're still counting bits before checking the sentinel! You won't necesarily have the first 5 bits being the sentinel - thats where your code fails.
Think carefully about the problem - you have a sequence of bits - there may be garbage bits before and after the data. So you have to look for a known bit sequence - the sentinel. Only then can you count off bits! |