| ??? 02/16/01 22:08 Read: times |
#9411 - RE: IR Remote Decoding |
Hi Marshall
Those IR modules should not oscillate, if they do, something is not correct. I use the Sharp GPIU581Y IR module available from http://www.goldmine-elec.com (a great source for all your surplus electronic needs) they cost $1.72 each, find the PDF catalog and check page 55. They have the Sony and Sharp modules. I ordered both of them, but like the Sharp for it's extra range I found to be at about 35 feet even in a lighted room without using any IR filters. The modules, metal can housing must be firmly soldered to the power ground plane for best ambient light noise reduction. A good ground is a big help for this device. Then wire up the unit, looking at the bottom of the module at the three pins, the pin closest to the module edge is grounded to your ground plane. The next pin (center one) connects to a 100 ohm resistor to 5vdc. The last pin I use a 4.7K pull up to 5vdc and that same pin is the output signal to the cpu. I wire that pin to two 7414 inverters (six per chip). The reason for two is to retain the hi logic level when no IR is present. Then when an IR signal is received by the module the first logic level goes low which can cause an interrupt on pin P3.2 (INT0) setup in interrupt mode. Once in the interrupt routine detecting the first low level, stay there untill you decode the whole data stream (all data widths to be represented as counts). Just keep checking for a LO on INT0 and counting a NOP delay loop. Then count the HI level using a NOP delay loop, and store all counts all LO and HI transistions as counts untill finnished with this interrupt segment than decoded the pulse counts for all trasistions in some other routine. When you count 256 HI counts without seeing an interviening LO transistion, the data stream has ended ... so this interrupt has completed. Start with about 10-15 NOP's in the delay loop counter and asjust as necessary. Just use JNB P3.2 or JB P3.2 to find the data level changes while using the INC A (accumulator) to count NOP loop delay counts and storing this count after each level transistion. Then display the data as hex counts to continue the decode. You can then work on a routine to convert these hex width counts to actual binary 1/0 data to determine the device address, sub address, function, etc. My initial routine did it this way but I finally resorted to an external xtal clock running at 40KHZ so I can use it for both IR reception and IR Blaster clocks. There is very limited amount of data out there to perform the actual binary decode but if I did it, so can you. Sorry I can't give you my code for this, since it's my commercial product but this responce will get you started in the correct direction. It's really pretty easy once you get into it and fun to boot when you get it to work. That Sharp module I referenced herein is one great device. Actually I like buying anything from Goldmine, prices are not bad either. I bounce signals to the Sharp IR moduke from walls and ceilings etc. even with a high intesity desk light next to the exposed module without using any IR filters. I use it to detect most any remote in my application, RC5 and RECS80. You do need a different binary decoder code routine to display the final hex codes after converting from pulse counts for different remote devices (RC5, RECS80 etc.). Hope this helps you get started. Just do an internet search for IR or infrared as a search topic then jump to links at these sites to other sites. There is plenty of info out there to get started if you dig for it. But it's just to get you started. You will find most are too crude and unuseable including those with source code but it's enough help you get started and make an IR pro out of you one day. Post |
| Topic | Author | Date |
| 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 |



