Hi guys, For my second PIC project, I'm going to need to detect a button being pressed on an IR remote control. I've done a small amount of research on this and from what I've read I'm going to need to hook up an IR receiver to one of the pins and then time how long pulses last (and/or the gaps between them depending on the remote). So, in order to determine how long a pulse lasts I'm thinking that I'm going to need to do something like: - loop waiting for pin to go high - reset TMR0 - loop waiting for pin to go low - value in TMR0 now contains length of time of pulse I just wanted to get some feedback whether I'm thinking of this in the right way, or whether there is some other technique that is generally used for timing pulses etc. Thanks, Matt -- Matt N. Marsh Email: matt@mattmarsh.net Yahoo: marshmn Web: http://www.mattmarsh.net/ Jabber: mattmarsh@jabber.org MSN: matt@mattmarsh.net ICQ: 250467363 AIM: MattMarshUK -- 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