Pommie said:You cannot ignore time. If you ignore time wont you always receive 1010101010. Surely, receiving Manchester encoded data is exactly the same as RS232 (timing wise) except you get twice as many bits.
RS232 uses fixed timing, Manchester doesn't, it's the transitions that are the data, NOT the HIGH or LOW points. In fact you can recover the original 'clock rate' from the Manchester coding if you didn't know it.
Obviously timing can't be completely ignored, a transition shouldn't occur too early, or too late - but there's a LOT of variation possible.
The reason this is important is that neither IR or Wireless links provide the same data output as you supply to the transmitter - which makes RS232 type timing unreliable. As long as you're running at a fairly low speed, you can read RC5 by a crude timed sampling technique, but obviously if you drift outside the correct bit you will read completely the wrong data - and as RC5 uses many more bits than RS232, it's got more chance of doing so. Having played for years with IR and Wireless links, I still find it confusing that the pulse widths from the receiver vary in width depending on the number and sequence of high and low bits, and the received signal strength.
Notice how the SIRC's IR system uses very different pulse widths, it's for the same reason - so timing is VERY non-critical.