#include #include #include #include #include #include #include #include #include #include #include #include // Globale Variablen volatile unsigned int L; short int tp0=0; unsigned int eep1 __attribute__((section(".eeprom"))); unsigned int eep2 __attribute__((section(".eeprom"))); unsigned int eep3 __attribute__((section(".eeprom"))); unsigned int eep4 __attribute__((section(".eeprom"))); unsigned int eep5 __attribute__((section(".eeprom"))); unsigned int eep6 __attribute__((section(".eeprom"))); unsigned int eep7 __attribute__((section(".eeprom"))); unsigned int eep8 __attribute__((section(".eeprom"))); int *peep1=(int*)(12345); int *peep2=(int*)(54321); //------------------------------------------------------------------------------------------ //Initialisierung void init(void) //Initialisierung { DDRA = 0xFF; //Alle A Pins = Ausgänge DDRA &=~ (1<> 8 ); UBRRL = (uint8_t)UART_UBRR_CALC( UART_BAUD_RATE, F_CPU ); //alternativ bei der avr-libc "direkt 16bit" : //UBRR = UART_UBRR_CALC( UART_BAUD_RATE, F_CPU ); //------------------------------------------------------------------------------------------ //Teachprogramm void teach() { //Eingabe der Pulse für Positionen 1-9 in die Variablen tp1 - tp8 //Eingabe geschieht über die Tasten WASD. Die Schritte werden in den //Variablen tp gespeichert. char dummy[2],ch,ch2; unsigned int i,z,zsp; zsp=0; PORTA |=(1<