ATmega88 @ 8MHz Servo 01
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* servo_01.c ATmega88 @ 8MHz */ | |
#include <avr/io.h> | |
#include <util/delay.h> | |
int main (void) | |
{ | |
DDRC = (1<<PC0); | |
while( 1 ) | |
{ | |
PORTC |= (1<<PC0); | |
_delay_us( 1500 ); // Pulsbreite von 1,5ms für die Servolage | |
PORTC &= ~(1<<PC0); | |
_delay_ms( 18 ); // Kein kritischer Wert | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment