Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to control 5 servos in 1 Timer interrupt?

Status
Not open for further replies.

guil

Newbie level 3
Joined
Oct 11, 2011
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
Hi,
I wanted to control 5 servos in 1 Timer(Timer0). My Timer0 interrupt at 0.5ms and this will be supplied to 5 servos as PWM source.

But, I have a hard time figuring the easy way I can control the 5 servos. Such as, holding 1 servo to a desired position while controlling the other and rotating the other.

I'm using F340DK. I know this mcu has 5 PCA modules. Let's just say that all 5 PCA modules were used by other peripheral other than the servos.

Also, do you know how can I slow down the movement of a servo?

thanks in advance
guil
 

It surely doesn't work with a fixed 0.5 ms timer interrupt.

Generating the pulse widths sequentially with timer intervalls programmed to 0.5 - 1.5 ms and an pause intervall adding up to 20 ms period seems a possible solution. I don't know about the detailed application constraints, however.

As with all software generated timings, interrupt latency will cause pulse width jitter. An external gating hardware operated from a single hardware pulse width output would allow exact timing, if appropriate.

Slow movement of a servo can be obviously achieved - by changing the set point slowly and continuously.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top