From: "Peter L. Peres" > On Mon, 17 Feb 2003, michael brown wrote: > > *>I'm somewhat stumped as to how best to do this, since rising/falling > *>edges occur in the middle of the data bits. > > So you detect each bit half a bit late. Why is this hard ? Half bit late, half bit early, either way that's not too hard using a timer and hard delays. I was just looking for a way to do it using the capture mode of the capture/compare module and reading data on the edges. The problem with hard delays is the signal varies quite a bit between controllers. I suppose that I could use the first two bits to "get a feel" for the pulse length and then set the timer delays accordingly to sample the data accurately, but I'm trying to become a Zen master of capture mode. ;-) I've now switched to a Sony remote that uses PWM instead of RC-5 encoding. The capture mode works well with this scheme. I just thought that maybe someone knew of a clever way to measure the biphase pulse widths and then divine the data out of it. michael -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics