On Sun, 2007-05-13 at 14:47 +1200, Jinx wrote: Thanks for sharing... > My application uses two 12F675s clocked with 4MHz internal. The > receiver PIC needs to match its timing to the transmitter, which uses > (approx) 1ms bit length. Two bytes of data are sent = 32 bits of > Manchester For my (similar) application, a fixed bit rate is unacceptable. While I can't share the code, I can say that it's fairly straight forward for the receiver to dynamically adjust to the transmitter's bit rate. There's a trade off between interference/noise rejection and the dynamic range of the bit rates. For my set up, I accommodate a ratio of 4:1. Another improvement you may wish to consider is decoding the Manchester stream while the data is being received. This accomplishes two things. First, it allows you to recognize more quickly when the incoming stream is corrupted. Second, it allows you to respond more quickly to the next data stream. > God bless logic analysers And simulators... Once you remove the big kinks, a simulator will allow you to explore all of those corner cases. Scott -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist