Ein kurzes Programm in C soll einen ATmega328PB@20MHz dazu bringen auf dem PORTD den PD1 ein- und wieder auszuschalten.
Es gibt zahlreiche Fehlermeldungen:Code:uint8_t i; // DDRD = 0b00111111; // -> siehe Schaltplan PORTD = 0b11000011; // Pins/Pull Ups aktivieren // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - for(i=0; i<100; i++) // LED1(PD1) blinken lassen PORTD |= (1<<PD1); // PD1 ein wms(3); // ###>>> HeartbeatLEDs schalten Aode -<|- Portpin <<<### PORTD &= ~(1<<PD1); // PD1 aus wms(97); // } // Ende von for(i=0; i<100; i++)
Code:Severity Code Description Project File Line Error (Each undeclared identifier is reported only once C_m328pbtst D:\D_pro-fils\compu_MC\C7\C_m328pbtst\C_m328pbtst\main.c 117 Warning #warning "device type not defined" C_m328pbtst c:\winavr-20100110\avr\include\avr\io.h 404 Error MCU 'atmega328pb' supported for assembler only C_m328pbtst D:\D_pro-fils\compu_MC\C7\C_m328pbtst\C_m328pbtst\main.c 1 Warning unused variable 'abc' C_m328pbtst D:\D_pro-fils\compu_MC\C7\C_m328pbtst\C_m328pbtst\main.c 43 Error 'DDRD' undeclared (first use in this function) C_m328pbtst D:\D_pro-fils\compu_MC\C7\C_m328pbtst\C_m328pbtst\main.c 117 Error for each function it appears in.) C_m328pbtst D:\D_pro-fils\compu_MC\C7\C_m328pbtst\C_m328pbtst\main.c 117 Error 'PORTD' undeclared (first use in this function) C_m328pbtst D:\D_pro-fils\compu_MC\C7\C_m328pbtst\C_m328pbtst\main.c 118 Error 'PD1' undeclared (first use in this function) C_m328pbtst D:\D_pro-fils\compu_MC\C7\C_m328pbtst\C_m328pbtst\main.c 123 Error 'PD' undeclared (first use in this function) C_m328pbtst D:\D_pro-fils\compu_MC\C7\C_m328pbtst\C_m328pbtst\main.c 128 Error recipe for target 'main.o' failed C_m328pbtst D:\D_pro-fils\compu_MC\C7\C_m328pbtst\C_m328pbtst\Debug\Makefile 79
Die auffälligste ist für mich :
Error MCU 'atmega328pb' supported for assembler only
Ist es so (kann das sein), dass der mega328PB mit Studio7 nur in Assembler programmierbar ist? Dann müsste ich für diesen Chip ne andere IDE besorgen?
Danke für die Hilfe.







Zitieren

Lesezeichen