> An IR data stream from a dedicated IR transmitter IC will have > a pretty accurate data clock. Not in my experience. They tend to be RC based and will drift a fair amount. There is measurable drift over the length of a transmission but not enough to cause too much trouble. You also have to watch the rise and fall times of some IR detectors. They aren't the same so measuring a pulse width gives you wrong information, but edge to edge is OK. The method I used recently was to use a single edge interrupt and each timen preload a timer with 0xff minus the value halfway between a 0 and 1 bit time. Each time you get an edge interrupt, the data bit to record is the value of the timer overflow flag. Steve. ====================================================== Steve Baldwin Electronic Product Design TLA Microsystems Ltd Microcontroller Specialists PO Box 15-680, New Lynn http://www.tla.co.nz Auckland, New Zealand ph +64 9 820-2221 email: steveb@tla.co.nz fax +64 9 820-1929 ====================================================== -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu