Go Down

Topic: ppm (sum) in to servo output, possible timer issue (Read 3 times) previous topic - next topic

DuaneB

Hi,

   Your not the only person to have had trouble combining the code from the two posts on this basis I will remove the code from both posts and reference them both to a new post, it will make it easier for everyone and easier for me to manage.

Duane

cardboardboks

Quote
Hi,

   Your not the only person to have had trouble combining the code from the two posts on this basis I will remove the code from both posts and reference them both to a new post, it will make it easier for everyone and easier for me to manage.

Duane


Got it kind of working but the servo output was very jerky.
I'll wait until you've made up a new post and try again

DuaneB

Hi,

How many channels are you reading and how many are you outputting ?

Did you change these defines to match ?

#define RC_CHANNEL_OUT_COUNT 4

#define RC_CHANNEL_IN_COUNT 3

3 and 4 are correct for my test setup, you most likely have a different number of channels coming in and will need to update the 3 to whatever it is that you have - leave the 4 for now we will come back to it.

Duane B

rcarduino.blogspot.com

cardboardboks

#13
Feb 04, 2013, 05:12 pm Last Edit: Feb 04, 2013, 05:22 pm by cardboardboks Reason: 1
Reading 8 channels outputting at least 8 as well.

Will update that and get back to you with results.

Edit: 1 bit of clarification. I have changed that lump of code to this

#define RC_CHANNEL_IN_COUNT 8
// two ticks per us, 3000 us * 2 ticks = 6000 minimum frame space
#define MINIMUM_FRAME_SPACE 16000
#define MAXIMUM_PULSE_SPACE 5000

Does MAXIMUM_PULSE_SPACE need to be changed as well?
I'm going to guess ether 1500 or 1066?? if it does need changed.

DuaneB

I need to create a FAQ or something similar for using the library, the interface is not the nicest - I did consider auto detection of the number of channels, its easily done but slows the ISR down slightly if the number of channels is not set at compile time.

Anyway just set the number of input channels to 8 for now, and once thats working nicely we will adjust the output channels.

Duane B.

Go Up