Have 28X1 FW A.1 @ 16MHz
Have a Vishay TSOP4838 IR receiver/preamp.
Have a multi TV Remote with SONY setting (can't find a source for a basic SONY TV remote in NZ)!
Issue 1.
Data received is not 0,1,2,3 etc
but
11264 and similar
Issue 2.
When the IRIN is used in the basic form,
IRIN pin,Variable
AND
the same button is pressed repeatedly, then the number received gets bigger each time the button is pressed.
Resolution;
If the command is used in its more complex form;
e.g.
IRIN [4000,RTC_Set],5, w1
then the number returned does not increment but the number is still of the form 11264 etc
So to get 0 thru 9 the following subroutine works to get 2 digits combined ;
which returns
1 (for button 1)
2 (for button 2)
12 for button 1 then 2 etc and
110 for button 10 then button 10
There is no 0 button.
Q1. presumably the improper function of the IRIN in basic mode is a Compiler issue or is it a FW issue?
Q2. Is the big number a TV remote issue?
Q3. Is the big number a TSOP4838 issue?
Any feedback gratefully received.
Thanks
Have a Vishay TSOP4838 IR receiver/preamp.
Have a multi TV Remote with SONY setting (can't find a source for a basic SONY TV remote in NZ)!
Issue 1.
Data received is not 0,1,2,3 etc
but
11264 and similar
Issue 2.
When the IRIN is used in the basic form,
IRIN pin,Variable
AND
the same button is pressed repeatedly, then the number received gets bigger each time the button is pressed.
Resolution;
If the command is used in its more complex form;
e.g.
IRIN [4000,RTC_Set],5, w1
then the number returned does not increment but the number is still of the form 11264 etc
So to get 0 thru 9 the following subroutine works to get 2 digits combined ;
Code:
GetIR:
IRIN [4000,RTC_Set],5, w1
pause 1500
b0 =w1-11263
IRIN [4000,RTC_Set],5, w1
pause 1500
b1 =w1-11263
b0=b0*10+b1
sertxd (#b0,cr,lf)
@ptr =b0
Return
1 (for button 1)
2 (for button 2)
12 for button 1 then 2 etc and
110 for button 10 then button 10
There is no 0 button.
Q1. presumably the improper function of the IRIN in basic mode is a Compiler issue or is it a FW issue?
Q2. Is the big number a TV remote issue?
Q3. Is the big number a TSOP4838 issue?
Any feedback gratefully received.
Thanks
Last edited: