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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/07/06 13:39
Read: times


 
#117949 - "Long" pulses?
Responding to: ???'s previous message

Stanley, how long are the pulses you are considering? Generally in infrared comms we're talking 100's of microseconds - so as long as the pulses of interest are shorter than the time it takes for your capture timer to count 65536 times, you're ok but there are ways in software you can extend the capture to 24 bits or larger. So for your average 8051 with pca hardware at 12Mhz, a full counter overflow takes just over 65mS. So, if you need a timeout, you can use a pca compare channel or count timer overflows for 65ms granularity.

As mentioned by others, keep your ISR code short and sweet - don't wait in an ISR for 100's of microseconds unless you REALLY want to, in which case you could not bother using interrupts and just have your main code poll the input. If your microprocessor have nothing else to do( like doing serial comms in the background etc) just sit in loops counting and waiting for the bit transitions - there is enough time between infrared frames to do a little other work.


List of 11 messages in thread
TopicAuthorDate
Receiving IR remote control code            01/01/70 00:00      
   What I would do            01/01/70 00:00      
      not the protocol            01/01/70 00:00      
   Not clearing IE0            01/01/70 00:00      
      IE0            01/01/70 00:00      
         IE0 does not need EX0 enabled            01/01/70 00:00      
            band-aids            01/01/70 00:00      
               timer in capture mode            01/01/70 00:00      
                  "Long" pulses?            01/01/70 00:00      
                     never use before            01/01/70 00:00      
            how to prevent IE0 set            01/01/70 00:00      

Back to Subject List