Gerhard Fiedler wrote: > (They use duty cycles of 1/3 and 2/3) I used this approach a while back on a hobby project and it worked quite well for my needs. Extremely simple to encode and decode. For receiving, I used interrupts driven by edge detection from the RF rcvr. Once triggered, I counted one-banana, two-bananas until half a bit time transpired. Then I sampled the incoming line. Shifting this in produced a byte. Is it the correct byte? I used framing as follows: synchronize with 0xAA, 0x55, byte count, data, checksum. The 0xAA and 0x55 did duty to get the RF rcvr to play nice. Plus noise had a hard time to keep up and look like that along with the byte count and checksum. I was sending control data to a lighting controller; if a frame or 3 got lost, no big deal. The data was sent continuously until the operator approved of the result. Think: operator with control watching the lights for correct operation. Noise, especially when the TX was off, meant a steady stream of interrupts. I dealt with this in the easiest way: a separate PIC to demodulate the RX line. Only good data got sent to the main controller via serial data lines. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist