Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: futaba S3003 servo

2004-06-20 by jay marante

how bout the PWM in in timer1? what's the appropriate PWM for the servo, the fast PWM or the Phase correct PWM? i don't know all of this. please bare with me. thanks.

David VanHorn wrote:
At 05:38 PM 6/19/2004 -0700, jay marante wrote:

>maybe i'll just have to go for some trail-and-error.
>next, i don't know how thw PWM works. i'll use mega16L.
>in general, how does the PWM work? and in AVR, how should i do this?
>thanks for the help.


I didn't use PWM in my implementation.
I started the pulse by taking an I/O port high, then loaded timer 1 with the appropriate time interval. When T1 overflowed, I got an interrupt, and all I had to do there was shut off all the RC servo outputs, and increment to the next servo.

Today, I would probably be more gutsy, and pulse all 8 servos at once, with the timer telling me when and which pulse to turn off.

I posted the code, written for the 8515, but you can port it, on dontronics, and I think it's also in the yahoo web site for avr-chat.


Yahoo! Groups Sponsor ADVERTISEMENT

Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.