Where would I find some code on handling IR Remote Control?
Is there·any code out there or how-to for dealing with IR?· I am looking to record some remote control code and be able to play it back.· I was thinking of using a 555 in helping with generating the 38.5kHz that is needed to transmitt to off load the SX.· Then using the Parallax Infrared Receiver to detect the IR code.· ·Is there any good starting porint for me on doing this with the SX?·
Regards,
Mark
Regards,
Mark
Comments
You can purchase the book here http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/List/1/catpageindex/2/ProductID/149/Default.aspx?txtSearch=ir+boe-bot&SortField=ProductName%2cProductName
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
www.iElectronicDesigns.com
·
If you use 16bits to measure each sample ( to sample it's duration), it would use up 800 bytes to record an IR pulse train.
It seems the SX is lacking the ram space for the application of record and playback, unless you can implement external ram.
The SX at 8Mhz or higher can generate the 38Khz signal without a 555, but you need to use assembly.
Good Luck.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Sorry for my bad engish as it due to being hard-of-hearing and I only talk as how i hear things. Thanks for not giving me a hard time for it. [noparse]:)[/noparse]
You can use PAUSEUS to pause for microseconds, or you can use an interrupt. Each has it's good points and bad points.
For 40KHz you would do in a loop (note that "LED = ~LED" will toggle the LED):
LED = ~LED
PAUSEUS 12.5
Using an interrupt you would do:
INTERRUPT 80_000 NOPRESERVE
LED = ~LED
RETURNINT
If you use the interrupt you would make the LED pin an INPUT to turn off the 40KHz, and make it an OUTPUT to turn on the 40KHz.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
www.iElectronicDesigns.com
·
Most references I've found suggest that in SIRCS a device/keycode (12-bit) signal is transmitted three times, each within a 45 millisecond frame. Another element of the ISR is the frame timer.
This may be a little advanced of your present knowledge, but I think you'll find it worth studying. Good luck and have fun.
Post Edited (JonnyMac) : 12/12/2008 10:51:44 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php