SX and IR Booster
PLJack
Posts: 398
First off, I have read all the Parallax information on how
IR works. Very informative.
I would like to use SX/B but will take ASM as well.
I have fond some Basic and SX ASM IR code, but it is for object
detection only.
I want to receive and send IR remote codes.
For now I would settle for transmitting.
The complete goal is to receive IR from a remote (TV,VCR, etc)
and send it back out, like a booster.
That being said, here are my requirements Using an
SX28 and a 4mhz resonator. External, not the internal one.
(Would the internal one be accurate enough? That would be great)
When I say "light" I mean at 38 kHz. (adjustable, ie: 42 kHz)
Light an LED and pause for 2.4ms [noparse][[/noparse]Command pause]
Light an LED and pause for 1.2ms [noparse][[/noparse]logical 1]
Light an LED and pause for 0.6ms [noparse][[/noparse]logical 0]
Also recording incoming IR, but I'll handle that later.
Right now I want to send IR.
Any URL's or suggestions would be Greatly appreciated.
Thanks
Jack
This seems like a good place to start:
Post Edited (PLJack) : 4/11/2005 1:51:35 AM GMT
IR works. Very informative.
I would like to use SX/B but will take ASM as well.
I have fond some Basic and SX ASM IR code, but it is for object
detection only.
I want to receive and send IR remote codes.
For now I would settle for transmitting.
The complete goal is to receive IR from a remote (TV,VCR, etc)
and send it back out, like a booster.
That being said, here are my requirements Using an
SX28 and a 4mhz resonator. External, not the internal one.
(Would the internal one be accurate enough? That would be great)
When I say "light" I mean at 38 kHz. (adjustable, ie: 42 kHz)
Light an LED and pause for 2.4ms [noparse][[/noparse]Command pause]
Light an LED and pause for 1.2ms [noparse][[/noparse]logical 1]
Light an LED and pause for 0.6ms [noparse][[/noparse]logical 0]
Also recording incoming IR, but I'll handle that later.
Right now I want to send IR.
Any URL's or suggestions would be Greatly appreciated.
Thanks
Jack
This seems like a good place to start:
' ------------------------------------------------------------------------- ' Device Settings ' ------------------------------------------------------------------------- DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX FREQ 4_000_000 ' ------------------------------------------------------------------------- ' IO Pins ' ------------------------------------------------------------------------- IrLED VAR RB.0 ' output to IR LED Detect VAR RB.7 ' input from IR detector LED1 VAR RC.7 'LED (green) ' ------------------------------------------------------------------------- ' Constants ' ------------------------------------------------------------------------- IrMod CON 38000 ' modulation freq = 38 kHz Yes CON 0 ' for active-low output; Yes, detected No CON 1 ' No, not detected ' ========================================================================= PROGRAM Start ' ========================================================================= ' ------------------------------------------------------------------------- ' Program Code ' ------------------------------------------------------------------------- Start: input Detect Main: freqout IrLED, IrMod, 1 if Detect = No then Main low rc.7 'If yes, then turn on the LED pause 2000 high rc.7 'Turn off the LED goto Main end
Post Edited (PLJack) : 4/11/2005 1:51:35 AM GMT
Comments
On for 2.4ms(command)
Off for .6ms(pause)
On for .6ms(logical 0)
On for 1.2ms(logical 1)
Take a look at the Parallax IR remote docs.
http://www.parallax.com/dl/docs/prod/compshop/IRremoteAppKit.pdf
If you want to get any useable range(30+ feet) consider pulsing the IRLED at very high current and maybe even doubling up on transmitters.
search in here, i found lots of useful info:
http://www.electro-tech-online.com/
You would get much more flexibility using interupts for the 38Khz signal directly in assembler.
This can easily be modified·to set or clear a flag enabling the IRLED.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Jonb) : 4/11/2005 1:08:03 PM GMT
Anyway, keep in mind that there are several remote control encoding schemes. Not all are compatable, nor do they all use the same encoding scheme and carrier frequencies.·The one that I've played with is the REC-80, but that·was a long time ago.·
In anycase, if you build your unit, you may have to build it to recognize the various remote·control·schemes out there.
Sorry, I'm not being very helpful...· ...just trying to give you a heads up...
-Dan
Yes, this project will be a challenge. My approach is to get one scheme working.
Keeping in mind that I will need to allow for others.
One step at a time. Thanks for the heads up.
Ok, when I said I read the doc, I meant I read it once. [noparse]:)[/noparse]
Thank you Jon. That is the kind of info I'm after.
I'll study the code you posted tonight.
Thanks again, and for the forum link.
Jack
Post Edited (PLJack) : 4/11/2005 10:07:42 PM GMT