Page 1 of 1
Reading RC imput
Posted: Tue May 19, 2009 2:27 am
by JWalthall
Ok I am asking for help again. I am trying to read a RC imput to switch on and off an output on a 12F629 PIC. Is there any sample code out there that I can see to try and figure this out. All I want to do is set the pin high when the PIC sees the 2 ms signal and then low when it see anything else. Thanks again for everyone that has helped.
Jim Walthall
Re: Reading RC imput
Posted: Tue May 19, 2009 9:21 am
by Benj
Hello
Do you mean radio control or resistor capacitor by RC?
Can you not simply read the input into a variable and then if the variable is one output a 1, if the variable is 0 output a 0.
Re: Reading RC imput
Posted: Tue May 19, 2009 3:10 pm
by JWalthall
Hi Benj,
I want to read a signal from a radio control receiver. I really don't understand what I need to read as the signal has a range of 1ms to 2ms pulse. There is no high or low value.
Thanks,
Jim Walthall
Re: Reading RC imput
Posted: Tue May 19, 2009 3:40 pm
by Benj
Hello
The type of pulse sent from a radio controlled receiver is normally a Servo motor control signal.
This control signal repeats 50 times a second (50hz) and consists of a logic 1 pulse that lasts between 1 and 2ms. The rest of the time the signal will be a logic 0.
Are you trying to measure the length of the pulse to try and detect the input from the transmitting device? If so then a timer interrupt is probably your best bet. I think someone else tried to do a very similar thing recently that you should be able to find by digging through the Flowcode forums.
Re: Reading RC imput
Posted: Tue May 26, 2009 8:00 pm
by chevy6600
Hi all, it`s been a while since i last browsed here, too busy doing other things that need doing instead of flowcoding.

i`m on holiday at the mo and had time to see what all of you have been doing .
FLINT 3058 did a little program which you may like to have a look at,
http://www.matrixmultimedia.com/mmforum ... f=5&t=5194