Mircea wrote: > -----Original Message----- [snip] > Receive goes licke this: > > If you have carrier then > 1. wait for let's say 5 transitions from L to H of the preamble > then look for the double 00 timeslot (first from the preamble and the > second from the start bit) > 2. after the start's bit up transition wait 1/4 of timeslot > (half of the up > transition) > 3. from here sample eight times at full timeslot to aquire > the 8 bits of the > transmitted byte > 4. wait for the stop bit's down transition > 5. wait a 1/2 timeslot and goto 2 te receive as many byte you > have in a > packet > The purpose of manchester and differential manchester is two-fold: One, prevent baseline wander. Second is to provide a way for the receiver to sync to the sender's clock (by forcing a transition in the middle of a bit). By sampling at fixed intervals, you defeat the second purpose. clocks can drift and/or run at different speeds. For long packets, you could very well incorrectly decode the data. It makes more sense to sample the data and record the time between transitions. After you sync with the preamble and the start bit, the receiver is at a known place in the data stream. For each transition, you know the direction and time interval. Then you can figure out what bit was sent in spite of minor clock variations. Perhaps I'm overly complicating the issue? -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics