Quick Question: Servos

InvaderZim

Senior Member
Hi all,

Can an 18x (or any picaxe for that matter) support more than 1 servo at a time? Can all 8 outputs be servos if I choose?

And just curious: do all 8 pulses happen at the same time? Or one after another? That probably doesn't matter for my purposes, just got to thinking.

Thanks!
 

Technical

Technical Support
Staff member
yes, pulses are one after another, not at the same time. But that doesn't matter for servos anyway, they just expect a pulse every 20ms or so.
 

LFLekx

Member
Might I add a question...

Going over the manual, it says that servo commands are reset when a high or low command is executed - is this restricted to the pin that the high or low is altering?

Say, for instance, I have a servo pulse-train running on pin 3 of an 18X, and I then set pin 4 high. Does that kill the pulse-train on pin 3?
 

Wrenow

Senior Member
yes, pulses are one after another, not at the same time. But that doesn't matter for servos anyway, they just expect a pulse every 20ms or so.
Hmmmm. This may provide a solution for a problem I had been pondering and simplify a one of code - IF I am understanding correctly.

So, the servo pulses are output sequentially, say output 1 then output 2 then output 3 etc. Could you multiplex these pins together on a single output buss to get a single output pulse stream similar to a regular Radio Control stream? Would you need diodes at each output before the buss?

Cheers,

Wreno
 

BeanieBots

Moderator
That should work,(similar to the Tx stream). Just diode OR them onto a single line with a pull down.
Never checked the exact timing. Might not be much gap between say "1" going low and "2" going high. Then decode with a series of pulsin's.
Could also be a solution to albrand's problem!
 

LFLekx

Member
High/low will only effect the servo pulses if it is on the same pin.
In that case... the simulator is messed up. Because when I start a pulse train on one pin, then set a different pin high, the first pin indicates a high as well.

(I don't have an oscilloscope to check...)
 

Wrenow

Senior Member
Could work for Albrand, but I think the offset add solution I offered is a better fit in his situation and easier to code/decode, since it is one proportional and one digital channel he is trying to mix/multiplex, and you can get that information into a single pulse.

Cheers,

Wreno
 
Last edited:
Top