??? 03/28/04 11:30 Read: times |
#67512 - RE: infrared remote control detection Responding to: ???'s previous message |
I have posted a lot of information on the forum regarding IR remote control decoding. I would encourage you to search it out as some of it could be helpful to you.
You describe the system you have as one that has a lot of interrupt activity going on already. This being the case I would recommend that you use an additional interrupt for the IR waveform detector. If you try to just poll in the waveform using software loops in the mainline program you won't be able to get much else done! The technique is to use an interrupt that triggers off the edges of the IR waveform (do note that the typical IR receiver module strips the IR carrier frequency and outputs the modulation envelope). This interrupt is most convenient if it can be a timer interrupt from an Input Capture (look closely at a Timer 2 capability or a PCA capability) that would provide you a time count from the previous edge to this edge for pulse width measurement. You can also use just an external interrupt input for the egge detection and have the ISR quickly read the running contents of another timer register for the time stamping information. Here is a picture of a recommended circuit configuration. The use of an IR receiver module is recommended over a simple IR diode or photo transistor because you get a nice logic level out to work with!! The XOR gate lets the microcontroller configure the polarity of the IR signal edge that the interrupt will respond to. The INT0- pin for example will trigger on the falling edge of the input. The software can toggle the depicted output pin LOW to trigger the interrupt when the IR signal has a falling edge and then in the ISR toggle the output pin HIGH so that the next interrupt will happen at the rising edge of the IR signal. Some 8051/52 derivatives have interrupt or timer inputs that can be internally configured for active edge via an SFR bit. In those cases the XOR gate and the output control pin are not required. I also show an input pin that can directly read the signal level from the IR detector. This is useful for some derivative type parts wherein the INTR or TIMER input pin state is not available to be read from the port pin whilst the pin is set for special function mode (Cygnal parts fall into this category for example where configured special function pins are uncoupled from the normal port pin logic). ![]() I have previously posted some information regarding the TSOP series of IR detectors here: http://www.8052.com/forum/read.phtml?id=31491 Good luck. Post back if you have questions about the software aspects of IR decoding. Michael Karas |
Topic | Author | Date |
infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection | 01/01/70 00:00 | |
RE: infrared remote control detection![]() | 01/01/70 00:00 |