PDA

View Full Version : IR Keys time changes



be80be
09-04-2008, 11:51 AM
I'm using a IR detector radio shack 273-640 It works but if i press a button like 1 it the pwm time is like 312 314 627 I press the same button again and the time changes 328 312 338 should it be the same .


I'm using the this program

' IR Remote for the Boe-Bot - RecordAndDisplayPwm.bs2
' Measure all data pulses from SONY IR remote set to control a TV.
' {$STAMP BS2}
' {$PBASIC 2.5}
time VAR Word(12) ' SONY TV remote variables.
index VAR Nib
' Display heading.
DEBUG "time ARRAY", CR,
"PWM MEASUREMENTS", CR,
"Element Duration, 2-us", CR,
"------- --------------"
DO ' Beginning of main loop.
DO ' Wait for rest between messages.
PULSIN 9, 1, time(0)
LOOP UNTIL time(0) > 1000
PULSIN 9, 0, time(0) ' Measure/store data pulses.
PULSIN 9, 0, time(1)
PULSIN 9, 0, time(2)
PULSIN 9, 0, time(3)
PULSIN 9, 0, time(4)
PULSIN 9, 0, time(5)
PULSIN 9, 0, time(6)
PULSIN 9, 0, time(7)
PULSIN 9, 0, time(8)
PULSIN 9, 0, time(9)
PULSIN 9, 0, time(10)
PULSIN 9, 0, time(11)
FOR index = 0 TO 11 ' Display 12 pulse measurements.
DEBUG CRSRXY, 0, 4 + index, "time(", DEC index, ")",
CRSRXY, 9, 4 + index, DEC time(index), CLREOL
NEXT
LOOP ' Repeat main loop.

thanks for input

GICU812
09-04-2008, 01:07 PM
You can check parallax's USB Oscope book, it has a chapter on IR xmiters

be80be
09-05-2008, 06:22 AM
It"s good I have that but it doesn't tell much about the IR module the 273-640 works but the key time you would think would be the same with what key is pressed if I press 1 it should be the same the next time i press it but it changes every time i press the key. If i made a program to use the ch- and ch+ and vol- vol+ how would i tell the stamp what to look for if the key changes every time I press it. I have seen on the net where thy where using a pull up resistor from vdd to input pin. the IR module is high till you press the remote then it go's low. I been fallowing the IR Remote for the Boe-Bot.

be80be
09-05-2008, 09:33 AM
It"s fixed just put a 10K resister from vdd to output makes 276-640 roll over and play good. lol