infrared receiver

Thread Starter

sharring

Joined Apr 14, 2006
4
I just basically finished up a final project for an embedded systems class, but I want to add remote control capabilities. I need 14 buttons for 14 different commands for the hc11. I have never done this before and am a little lost.

I have an IR receiver that operates at 38kHz, which is currently connected to PA2 of the microcontroller (generic input capture port) through a simple amplification circuit. I have spent many hours with it (pretty sure I have correct code and setup), but nothing works. I have tried many of my remotes, but I don't know what their carrier frequencies are so I can't tell if they even should work.

Does anyone know of any remote controls that operate with a carrier frequency of 38kHz?

Also, I have a HT12D decoder, but I do not know if I need to use it. Can someone tell me when the decoder should be used and when it doesn't need to be used?

I'm open to any suggestions too.

thx
 

Thread Starter

sharring

Joined Apr 14, 2006
4
I figured out what was wrong, and am now getting a signal from my remote. Now I need to figure out how to decode the IR signal from the remote so that I can program the functions for each button. I'm having trouble finding out how to distinguish between the different buttons.

Any ideas?
 

beenthere

Joined Apr 20, 2004
15,819
Hi,

Just set up a phototransistor and use an oscilloscope to visualize the pattern of IR pulses associated with each button.
 

Thread Starter

sharring

Joined Apr 14, 2006
4
I was checking the state of the input port PA2 in a while loop in main, which gave inaccurate results because of the time depedency of the while loop. I ended up checking and recording the pulses using an input-capture ISR, which turned out to yield accurate results each time.

The input binary number was then converted to a series of decimal numbers which are used to determine which button was pressed.
 

treedog

Joined Apr 23, 2006
15
Originally posted by sharring@Apr 17 2006, 04:34 PM
I was checking the state of the input port PA2 in a while loop in main, which gave inaccurate results because of the time depedency of the while loop. I ended up checking and recording the pulses using an input-capture ISR, which turned out to yield accurate results each time.

The input binary number was then converted to a series of decimal numbers which are used to determine which button was pressed.
[post=16257]Quoted post[/post]​
38 khz sounds like ultra-sonic freq. am i correct about this? and not ir freq that may be the prob.
 

skypher

Joined Apr 16, 2006
16
Originally posted by treedog@Apr 23 2006, 07:41 PM
38 khz sounds like ultra-sonic freq. am i correct about this? and not ir freq that may be the prob.
[post=16453]Quoted post[/post]​
38 kHz is a standard IR frequency.
 

Thread Starter

sharring

Joined Apr 14, 2006
4
yea, the 38kHz is just the carrier frequency...the only problem was writing working code to decode the signal from the IR receiver...I just had to figure out how to use the input capture correctly
 
Top