Reading RC imput

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
JWalthall
Posts: 20
Joined: Sun Apr 27, 2008 10:18 pm
Been thanked: 1 time
Contact:

Reading RC imput

Post 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

User avatar
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

Post 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.

JWalthall
Posts: 20
Joined: Sun Apr 27, 2008 10:18 pm
Been thanked: 1 time
Contact:

Re: Reading RC imput

Post 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

User avatar
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

Post 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.

chevy6600
Flowcode V4 User
Posts: 115
Joined: Fri Feb 22, 2008 6:38 pm
Contact:

Re: Reading RC imput

Post 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. :cry: 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

Post Reply