Forum: Mikrocontroller und Digitale Elektronik Atmega138PA mit Arduino bzw. Atmel Studio


von Stefan (Gast)


Lesenswert?

Hallo alle.

Ich benutze Atmel Studio um damit auf Arduino ebene meine uC zu 
programmieren.

Bisher waren Tiny84 / 85 und Atmega328 dabei... keine Probleme
Sowohl bei der Arduino IDE als auch bei Atmel Studio mit diesem "Arduino 
Plugin" nenn ich das mal.

So nun habe ich einen Atmega168PA..

Arduino IDE...  Compiling Ok.... aber upload geht nicht....


beim Atmel Studio... ein "Blink" programm kann ich drauf laden.
Aber sobald ich das nehme was eigentlich drauf soll, spuckt der jede 
menge Fehler raus.... nur wenn meine SPI.h einbinde


This build would be faster if you upgraded to Visual Micro Gold Edition 
+ USB debugger http://www.visualmicro.com
Please wait ...
Compiling 'TEEEEST' for 'ATmega168PA on a breadboard (8 MHz internal 
clock)'
SPI.h:In static member function 'static byte SPIClass::transfer(byte)'
SPI.h:56: error: 'SPDR' was not declared in this scope
SPI.h:57: error: 'SPSR' was not declared in this scope
SPI.h:57: error: 'SPIF' was not declared in this scope
SPI.h:In static member function 'static void 
SPIClass::attachInterrupt()'
SPI.h:63: error: 'SPCR' was not declared in this scope
SPI.h:63: error: 'SPIE' was not declared in this scope
SPI.h:In static member function 'static void 
SPIClass::detachInterrupt()'
SPI.h:67: error: 'SPCR' was not declared in this scope
SPI.h:67: error: 'SPIE' was not declared in this scope
SPI.h:In static member function 'static byte SPIClass::transfer(byte)'
SPI.h:56: error: 'SPDR' was not declared in this scope
SPI.h:57: error: 'SPSR' was not declared in this scope
SPI.h:57: error: 'SPIF' was not declared in this scope
SPI.h:In static member function 'static void 
SPIClass::attachInterrupt()'
SPI.h:63: error: 'SPCR' was not declared in this scope
SPI.h:63: error: 'SPIE' was not declared in this scope
SPI.h:In static member function 'static void 
SPIClass::detachInterrupt()'
SPI.h:67: error: 'SPCR' was not declared in this scope
SPI.h:67: error: 'SPIE' was not declared in this scope
SPI.cpp:In static member function 'static void SPIClass::begin()'
SPI.cpp:29: error: 'SPCR' was not declared in this scope
SPI.cpp:29: error: 'MSTR' was not declared in this scope
SPI.cpp:30: error: 'SPE' was not declared in this scope
SPI.cpp:In static member function 'static void SPIClass::end()'
SPI.cpp:44: error: 'SPCR' was not declared in this scope
SPI.cpp:44: error: 'SPE' was not declared in this scope
SPI.cpp:In static member function 'static void 
SPIClass::setBitOrder(uint8_t)'
SPI.cpp:50: error: 'SPCR' was not declared in this scope
SPI.cpp:50: error: 'DORD' was not declared in this scope
SPI.cpp:52: error: 'SPCR' was not declared in this scope
SPI.cpp:52: error: 'DORD' was not declared in this scope
SPI.cpp:In static member function 'static void 
SPIClass::setDataMode(uint8_t)'
SPI.cpp:58: error: 'SPCR' was not declared in this scope
SPI.cpp:In static member function 'static void 
SPIClass::setClockDivider(uint8_t)'
SPI.cpp:63: error: 'SPCR' was not declared in this scope
SPI.cpp:64: error: 'SPSR' was not declared in this scope

von Mein grosses V. (vorbild)


Lesenswert?

Stefan schrieb:
> So nun habe ich einen Atmega168PA..

Versuche es mal mit Atmega168p.

Die iotm168pa.h wird offenbar nicht von der io.h eingebunden. Sowas 
passiert hin und wieder, wenn die AVR-GCC-Jungs vergessen haben, das 
entsprechend in io.h einzubinden. Dafür gibt es aber auch eine Warnung.

von Stefan (Gast)


Lesenswert?

Hi, danke aber leider nicht...
habe mal als board den originalen Arduino ausgewählt... in der Arduino 
IDE.. keine Probleme

und im Atmel stuio... das oberere Schauspiel

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.