Hi all, I'm interested in talking to anyone who has done decoding of data from an RF 2 button remote control. I'll skip most of the details and get down to the problem. The data is sent as a combination of short and long pulses. I receive the pulses OK, and have developed some code that discriminates between short and long pulses, (approx 500us & 1500us), and succesfully recognises each button press. It works well, but not well enough. There is zero tolerance for pulses that are "broken up" during less than perfect reception. This results in a relatively poor range of operation. My assumption is that there is still enough of the pulse getting through that it should still be possible to identify short and long data pulses. I'm using a PIC16F877 with the data from the receiver module coming into RB0/INT. Presently I interrupt on a rising edge, start a timer, switch to falling edge and on that interrupt read the timer value which is the pulse width. I have been thinking of all kinds of averaging and integrating schemes but my brain hurts and I haven't found a workable solution yet. I would appreciate any helpful suggestions, especially from anyone that has already been there and done that. Thanks, Brent. -- Brent Brown, Electronic Design Solutions 16 English Street, Hamilton, New Zealand Ph/fax: +64 7 849 0069 Mobile/txt: 025 334 069 eMail: brent.brown@clear.net.nz -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.