Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/08/03 20:52
Read: times


 
#56371 - Algorithm for reading IR remote pulses
Hi and thanks in advance for any tips!

I'm looking for the description of a typical algorithm used for reading pulses coming from an ordinary IR remote control. I've already seached for this here and on the net in general but have not come up with anything specific about this.

Just by looking at the pulse pattern of a NEC-1 code, I can observe that you typically have a long lead-in pulse followed by short pulses that are seperated by one of two time intervals (lets call this a short space and long space). The way I imagine reading this would be something like this (all bit values and timer counts are hypothetical values):

1- Look for the lead-in by starting a timer to measure the width of the pulse when it starts. For example, if theoretical width would be a count of 80, accept a count between 70 and 90 as valid.

2- Look for beginning of first data pulse and then start timer. Then look for next pulse. One of 3 things could occur:

2a- next pulse occurs within short space (for example, timer count between 18 and 22 (theoretical value of 20).
If so, count bit as a 1 and start looking for next pulse with a fresh timer count of 0

2b- next pulse occurs within long space (ex. between count of 38 and 42 (theoretical value of 40). If so, count bit as a 0 and start looking for next pulse with a fresh timer count of 0

2c- timer reaches a value such as 60 without a pulse (when one is expected). Reject the code as invalid and start looking for next lead-in pulse.


I think the above description gives you a good idea by what I mean by algorithm. Tell me if this one makes sense or if there is actually a better way of doing this. Thanks again.


Btw, I posted a question here looking for tips on using an 8751 to drive an old CGA card about a year ago to make a TV display and a few good tips were given to me. Well, I've since built the project and I have obtained very good results for what I wanted to do with it. I just thought you would appreciate the feedback.

Guy

List of 6 messages in thread
TopicAuthorDate
Algorithm for reading IR remote pulses            01/01/70 00:00      
   RE: Algorithm for reading IR remote pulses            01/01/70 00:00      
      RE: Algorithm for reading IR remote pulses            01/01/70 00:00      
         RE: Algorithm for reading IR remote pulses            01/01/70 00:00      
            RE: Algorithm for reading IR remote puls            01/01/70 00:00      
            RE: Algorithm for reading IR remote puls            01/01/70 00:00      

Back to Subject List