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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/22/01 11:30
Read: times


 
#9542 - RE: IR Remote Decoding
To all those that helped me out with my RC5 remote decoding, thankyou for your help I was able to write my code entirely in C using IRQ's I carried it out like this

1. Fed the Demod IR into P3.2 (int0) on reception of any IR this generates an interrupt, at this point I disable int0 and start Timer0 (which also fires an IRQ)
2. Timer 0 repeats for the number of bits in a IR message (11-14 depending on what infor you want)
3. Each time the timer fires read in the bit level into 2 bytes, byte 1 for the remote type, byte 2 for the command.
4. On completion of reading the 11-14 bits diasble the timer interrupt and enable int0, ready for the next message.
5. In my application I then spit the 2bytes out the serial port where I read them on my PC,

I don't have an application where I actually do anything with the received code but I was doing this as an exercise more than anything.

The advantage (I reckon) of doing the IR decoing as mentioned above is that as it is done entirely in ISR's most of the time the controller (89c2051) is actually sitting there doing nothing, which allows me to write more code at a later time that actually uses the micro to do something useful.

Again, thanks to all those that posted on this thread.
Marshall

List of 14 messages in thread
TopicAuthorDate
IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      
RE: IR Remote Decoding            01/01/70 00:00      

Back to Subject List