Gast
#734913
Hallo, habe ein Problem bei meinem Programm im AVR Studio 4! ATMEGA 32 habe mir ein Würfelprogramm geschrieben das bei betätigen eines tasters eine zahl von 1-6 ausgibt! Mein Problem ist bei "Build" bringt er mir drei Fehlermeldungen die ich nicht mehr los werde!!! 1. Fehlermeldung #include datei "global.h" -->irgendwie kann ich die nicht finden! 2+3. Fehlermeldungen bei meinen Schleifen { Vllcht kann mir ja jemand weiterhelfen Bräuchte es für die Berufsschule Bin um jeden nützlichen Beitrag froh Danke schon im Vorraus hier noch das Programm /******************************************************* Projekt: Würfelprogramm Date:2007-12-23 Author: ElektroAzubiG&S Chip Type: ATMEGA32 *******************************************************/ #include "global.h" <-- 1. Fehlermeldung /*definieren von Konstanten*/ #define True 1 #define False 0 #define Pi 3,14 void init /*Unterprgramm wird initialisiert*/ { <----2.Fm wdt_disable(); DDRB= 0x0F; DDRA= 0xF0; DDRB= 0x0F; PortB= 0x00; timer0init (); sei(); uartinit(); uartset baudrate (19200); rprintfinit(uartsendbyte); rprintf ("\r\nhallo leute\n"); rprintf("ich bin der meisterprogrammierer"); } //Ende init /*Hauptprogramm*/ { <--3.Fm char i; init main (void) //Lampentest (alle ein dann aus) PORTB= 0xEF; timerPause (500); PORTB= 0x00; timerPause (500); PORTB= 0xEF; timerPause (500); PORTB= 0x00; timerPause (500) PORTB= 0xEF; timerPause (500); PORTB= 0x00; timerPause (500); //dann endlosschleife while (1) { rprintf ("Endlosschleife"); rprintfCLRF(); for (i=1; i < 13; i=i+2) //hier wird dauernd bis fünf gezählt 13????? { if (i==1) PROTB= 0x08; if (i==2) PROTB= 0x24; if (i==3) PROTB= 0x2C; if (i==4) PROTB= 0xA5; if (i==5) PROTB= 0xAD; if (i==6) PROTB= 0xE7; rprintfCLRF(); rprintf("Hurra! Du hast eine %x gewürfelt",i); rprintfCLRF(); timerPause(5); loop_until_bit_is_set(PINA,PINA3); timerPause(5); //wartezeit zum Entprellen PORTB= 0; } } }