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
Reading RC imput
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Reading RC imput
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Reading RC imput
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
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
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Reading RC imput
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Reading RC imput
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

FLINT 3058 did a little program which you may like to have a look at,
http://www.matrixmultimedia.com/mmforum ... f=5&t=5194