A true manchester decoder will recover the clock from the transitions in the input stream. This allows it to successfully handle clock differences between the transmitter and the receiver. The basic idea is this: Start looking for the edge a little before where you expect it to be, and keep looking a little beyond where it is expected. Reset your 'center-of-bit' time based on where you actually see the clock. This is critical once the message starts to get longer, or the tolerance of the transmitter and receiver system clocks isn't very good. Bob Ammerman RAm Systems ----- Original Message ----- From: "Kevin Olalde" To: Sent: Wednesday, February 20, 2002 12:45 PM Subject: Re: [PIC]:Manchester encoding/decoding routine examples please > Andrew, thanks for the shorter version. Obvious now that one sees it. Got in > my head I wanted to roll carry, duh. > > Being completely green here, what else is needed in a decode routine before it > qualifies as Manchester decoder? > > Again, this is close to my first time out (not my field, just playing). I > included the conversion of my transmitted data to this Manchester scheme to help > with transmission errors I was seeing using some Liapac 433Mhz modules. The > encoding certainly seemed to help reduce errors. > > Thanks again for the cleaner routine. > > Kevin > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu