Re: 16LF1824 strange problem
looks everything perfectly obvious ...
1) @ first pass, varb value is not initialized ... so, it may be 255, 0 or whatever you want ... not really important here, but ...
2) your receiver may output its fail-safe value signal ( 1500µs ? ) until the Tx signal is captured .... so, a false detection may occur.
so, remember to ALWAYS initialize your variables ... here, 0 will make it !!!
one other little thing ...
pause 20 is not so good, as you can miss one pulse if signal incomes @ more than 46 Hz ( Graupner/JR is 45 Hz ... tadaaaaaa ) ...
as PULSIN waits for the pulse to occur, there's no special need for this delay ... other than pacing the detection loop.
and also think if the Tx is off, the Pic returns 0 as a PULSIN measure ...
Alain
Last edited by Acetronics2; - 18th August 2014 at 11:43.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks