Software > Software

Digital versus Analog Servo control

(1/2) > >>

Hey guys,

I have an Atmega32 microcontroller, i already have working code that will control an analog servo and change positions and such. Yet the code will not work for my digital servo, i read the stuff on digital vs analog and i know they recieve info at a higher frequency and such, but i have no idea how to reflect that in my code :(

Digital Servo Tutorial

Digital servos can be controlled exactly the same as an analog servo. Perhaps the frequency it should recieve is slightly different that your analog signal - try increasing/decreasing the frequency until the servo moves.

I'm fairly new to this stuff,

If i play with the # of milliseconds the pin is a high/low that will change the ange of my analog servo, but if i mess around with that on my digital servo the servo stay at the same exact angle through all the changes.

What do you mean by frequency?

OK I guess what I meant was pulse width, not frequency. Hmmm so a digital servo will usually go to and hold some angle with force if it recieves a signal outside of the allowable signal.

Start the high pulse at 1000us and increase that by 10us intervals - it should work somewhere between 1000us and 1600us.

When you do a pin high command, are you using a variable to store the number of microseconds, or are you just giving it a number? Variables max out at 256 when calling time delays . . .

Does the same exact code work if you just swap to the analog servo?

I did what you told me with the PWM but with no luck :(

The code works for my analog servo and changes angle, but with my digital it hold the angle but no matter what the PWM is its always the same angle :(

My time delay variable is set to max at 4294977295 (its an unsigned long int)

I dont know what to do, is it possible my servo is "broken"?


[0] Message Index

[#] Next page

Go to full version