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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/26/06 21:28
Read: times


 
#130154 - RC5 polling
Responding to: ???'s previous message
I just did an IR remote using RC5, and I had to sort this out. I did it using an SiLabs C8051F226, which only has the standard 8051 INT0\ and INT1\ falling-edge interrupts. I found it easiest to simply interrupt on the IR receiver module's first start bit falling edge, then disable the external interrupt and use a timer to count to the middle of each bit (well, not the transition in the middle, but the middle of bit time before or after the transition ... pick one).

Another way to do it would be to use a device with more-flexible external interrupts. Other SiLabs parts let you interrupt on any transition on a port pin. A simple state machine would keep track of the current state of the bit, and the interrupt could process whether the transition meant the new bit is a zero or a one.

A third way to do it is to simply poll for transitions and again use a simple state machine to determine the value of each incoming bit.

There are lots of ways to skin this cat.

-a

List of 25 messages in thread
TopicAuthorDate
Multiple Interrupts with Infrared RC5            01/01/70 00:00      
   Must be the technique you are using            01/01/70 00:00      
      Test Zero Cross            01/01/70 00:00      
         Couple of questions            01/01/70 00:00      
   Do you disable interrputs when you are in ISR?            01/01/70 00:00      
   use priority            01/01/70 00:00      
      Peter,Please clarify            01/01/70 00:00      
         RC5 within interrupt            01/01/70 00:00      
         RC5 polling            01/01/70 00:00      
            Quality workmanship...            01/01/70 00:00      
               workmanship            01/01/70 00:00      
            Dimmers            01/01/70 00:00      
               Russel Please            01/01/70 00:00      
                  Some more points            01/01/70 00:00      
                     Dimmers            01/01/70 00:00      
                     that does not make sense            01/01/70 00:00      
                        Divide and Rule            01/01/70 00:00      
                           instead of using your first choice, you state:            01/01/70 00:00      
   C sample code            01/01/70 00:00      
      Let me assimilate your code first            01/01/70 00:00      
         .LST?            01/01/70 00:00      
         About the 4n35            01/01/70 00:00      
            Thanks Jerson ,I corrected the picture            01/01/70 00:00      
               Here            01/01/70 00:00      
   F629FAN Schematic            01/01/70 00:00      

Back to Subject List