Drive a stepper motor with acceleration and deceleration using an Allegro driver on ATmega8