Weird servo behaviour

I'm trying to control a TowerPro SG90 servo. First I tried the Arduino Servo library, both Write() and WriteMicroseconds() worked perfectly via Serial input. Microseconds value differ a bit from manufacturer specs, but wasn't big deal as it all worked. Problem came when trying to use ServoTimer2 library because my Timer1 was occupied with VirtualWire. I modified ServoTimer2 library to use same pulse widths as Servo.h hoping that would make it work better (min 555, max 2400) but wasn't the case.

As you can see, ServoTimer2 seems to be using half the microseconds of Servo.h but for 0ยบ position, which I presume is conflicting with Min_Width (555, previously 750), and that's why it starts near Servo 1200 position.

Anyone has faced this same problem before? What's the reason and what should I do about it? Simply use half of the values?

I modified ServoTimer2 library to use same pulse widths as Servo.h hoping that would make it work better

Perhaps your modifications are not correct.
What was the "problem" with the unmodified ServoTimer2 library?

jremington:
Perhaps your modifications are not correct.
What was the "problem" with the unmodified ServoTimer2 library?

It worked like this (the upper and lower limits weren't that much changed after-all) so I thought that maybe my servo used different values and I could make it work by changing them. But nope, for same reason it's as if the library was doubling my inputs.

I'm using a Pro Mini 3V3, 8MHz.

Ha Another Servo Weirdness Thread !

Did you tell the IDE that you are using an 8MHz Arduino ?
If you didn't think of that detail, your timers will be off.

MAS3:
Ha Another Servo Weirdness Thread !

Did you tell the IDE that you are using an 8MHz Arduino ?
If you didn't think of that detail, your timers will be off.

I have Pro Mini board selected, and 3.3V 8MHz processor selected on tools.