Question about the FREQOUT command in SX/B
FREQOUT:
Does this command start the pulses and allow the program to continue on, or does it pause until the command is complete? I can't find this information in the sx-key sx/b command help page, is there somewhere else i should be looking?
For example if i do:
Should i get anything in ir_in? Right now I'm trying this, and its not working. i tried adjusting the duration from 1 to 10 to 255 just in case it was too a transmit for my detector. If i bring in an external 38khz IR emitter (a remote control) and shoot it at the detector it does increment ir_in. I've replaced the IR emitter with a led and it does light. I haven't checked the freq of the output yet, my ghetto-scope isn't setup right now.
Does this command start the pulses and allow the program to continue on, or does it pause until the command is complete? I can't find this information in the sx-key sx/b command help page, is there somewhere else i should be looking?
For example if i do:
FREQOUT IR_emit_Left, 1, 38000 ' FREQOUT (Pin, Duration in ms 1-255, Freq in hz 1-65335) square wave output COUNT Front_IR_Detect, 1, ir_in
Should i get anything in ir_in? Right now I'm trying this, and its not working. i tried adjusting the duration from 1 to 10 to 255 just in case it was too a transmit for my detector. If i bring in an external 38khz IR emitter (a remote control) and shoot it at the detector it does increment ir_in. I've replaced the IR emitter with a led and it does light. I haven't checked the freq of the output yet, my ghetto-scope isn't setup right now.
Comments
The FREQOUT command stops the program while it is generating.
If you are using the SX48 you can easily use one of the two timers to generate 38KHz.
On the SX28, you can create an interrupt to generate the 38KHz (but it make skew timing with other commands).
The following is all you need for the interrupt routine. Make sure the LEDPin is set to an output.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
Post Edited (Bean (Hitt Consulting)) : 2/16/2007 7:41:56 PM GMT
Yeah Freak-Out... da da da da... da da... da da... Freak-Out [noparse];)[/noparse]
Okay, I'm showing my age...
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman