Scott Dattalo wrote: >>> You may wonder how Manchester encoding may be more robust against >>> multiple transmitters or how it can allow the distance between the >>> transmitter and receiver be increased. Well first, a Manchester encoded >>> data stream has state information. For example, if you look at a >>> Manchester stream there are narrow pulses and wide pulses. Only certain >>> combinations of these pulses are allowed. So if interference damages a >>> particular pulse then there's a significant probability that the >>> Manchester state decoder will encounter an illegal state. >> >> Same for PWM. If you sample 3 times per bit, the first sample must be 1, >> the second is the bit state, the third must be 0. Anything that's not 1x0 >> is noise. > > You're confusing pulse width validation with pulse stream state. For > example, it's possible for interference to perturb a skinny pulse into a > fat pulse or vice versa in both Manchester encoded data streams and PWM > encoded streams. In a PWM encoded stream, you can only detect this error > via your error code -- and to the degree it's robust enough to catch > these types of errors, then there's no problem. However, in Manchester > coding there is state information in the data stream itself. Regardless > of the message, there are certain combinations of skinny and wide pulses > that are illegal. For example, a skinny pulse must either be preceded or > followed by another skinny pulse. So if you see a wide pulse on either > side of a skinny one, then that's an error. I'm not sure I'm confusing things :) I know that there is state information in the Manchester stream, in that only certain states are permitted. But that's also true for the PWM stream. Take the simplest case of two samples per bit for Manchester and 3 samples per bit for PWM. Manchester allows only combinations 10 and 01, everything else is considered invalid. Average noise has a 50% probability of generating a valid bit. PWM allows only combinations 1x0, everything else is considered invalid. Average noise has a 25% probability of generating a valid bit. This doesn't say much about robustness against various forms of distortion, but it shows the inherent state information in both encodings that allows rejection of invalid states at the bit level. Certain combinations are legal, others are not legal -- this is the same in both encodings. >> OTOH... Why would Microchip use this as basis for their KEELOQ products if >> decoding Manchester is as easy as decoding PWM and results in better >> performance? > > I'm not sure for their reasons for choosing a PWM encoding scheme over a > Manchester encoding. But KEELOQ is a whole lot more than just the > physical layer. Of course, however AFAICS the rest of the system could remain pretty much the same if it was implemented with Manchester instead of PWM. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist