| ??? 01/05/01 15:53 Read: times |
#7844 - RE: IR please help... |
May I suggest few things...
There are 3 points you should look at: 1- Whether IR receiver is ok or not? 2- Sampling and IR carrier freq. etc. 3- Assembly/Basic 1- It is very easy to test if you can find osciloscope around you. Apply the appropriate supply with a 50ohm resistor to positive pin in series and approx. 100uf capacitor parallel to supply pins. Get a regular remote control for testing purpose, press any button to send IR data to the receiver, and check at the output pin of IR receiver. It should give digital level output. If you find glitches, and analogue level output, means you need to find another receiver. Please note that output of IR receivers are active low, so when it receives the carrier, the output goes down, if it is not receiving any carrier it is always high. --------------------- 2- Usually IR remote uses 40KHz to 50KHz carrier. But some IR receivers are optimized at around 35KHz, so they are not very reliable for detecting proper IR carrier. For testing purpose, you can connect IR receiver output to any input port pin of your uP and pole this pin. You can further assemble the code to display the received code through serial port to Hyperterminal on PC monitor, or attach some LEDs (though I would suggest to send the received signals to PC via RS232). If you take my suggestion and connect your uP to the PC via serial port, than I would suggest you to measure the received signal high time and turn ON/OFF the timer when input signal (from IR receiver) goes low then high. 3- I always use assembly and for uP such as 8051 it is very convenient to use assembly, unlike many other uP. Rauf |



