What software are you talking about?
To drive a hobby servo to 0-position from an Atmega, do this:
1) tie ground to the Atmega and the servo and your battery -
2) tie battery + to the center servo wire, and to the input to your voltage regulator
3) tie the output of the voltage regulator the to Atmega VCC and AVCC
4) tie the control wire of the servo (final wire) to the pin for PORT B pin 2 (port value 0x4)
5) run code like the following on the Atmega:
int main() {
setup_timers();
DDRB |= 0x4;
while (true) {
sei(); // enable interrupts
delayus(20000);
cli(); // disable interrupts
PORTB |= 0x4;
delayus(1500);
PORTB &= ~0x4;
}
return 0;
}
You need to implement setup_timers() and delayus() to do the right thing. Typically, I run Timer1 at fuor ticks per microsecond. delaysus() then would read the timer value, multiply the input by 4, and wait until (timervalue - initialreadvalue) >= (calculatedvalue). Compensate for the cycles used for set-up if you want super accuracy.