Skip to content

Nano Every #21

@2of5aliasmaik

Description

@2of5aliasmaik

I replaced the Nano with a Nano Every and get the error messages listed below when compiling Main.c. Is the Nano Every with its 4809 so different than the Nano with the 328. Yes, some pins have different names, but if they are adjusted it should work, right?
If I use a Uno for testing purposes, compiling and uploading works without any problems, the same chip is installed here and the pin assignment is identical.
I hope someone can explain this to me or, best of all, adapt the Main.c to the Every.

D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino: In function 'int main()':
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:34:5: error: 'SPCR' was not declared in this scope
SPCR = (1 << SPE) | (1 << MSTR) | (1 << SPR1) | (1 << SPR0);
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:34:5: note: suggested alternative: 'SCL'
SPCR = (1 << SPE) | (1 << MSTR) | (1 << SPR1) | (1 << SPR0);
^~~~
SCL
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:34:18: error: 'SPE' was not declared in this scope
SPCR = (1 << SPE) | (1 << MSTR) | (1 << SPR1) | (1 << SPR0);
^~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:34:18: note: suggested alternative: 'PE'
SPCR = (1 << SPE) | (1 << MSTR) | (1 << SPR1) | (1 << SPR0);
^~~
PE
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:34:31: error: 'MSTR' was not declared in this scope
SPCR = (1 << SPE) | (1 << MSTR) | (1 << SPR1) | (1 << SPR0);
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:34:31: note: suggested alternative: 'PSTR'
SPCR = (1 << SPE) | (1 << MSTR) | (1 << SPR1) | (1 << SPR0);
^~~~
PSTR
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:34:45: error: 'SPR1' was not declared in this scope
SPCR = (1 << SPE) | (1 << MSTR) | (1 << SPR1) | (1 << SPR0);
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:34:45: note: suggested alternative: 'SPI0'
SPCR = (1 << SPE) | (1 << MSTR) | (1 << SPR1) | (1 << SPR0);
^~~~
SPI0
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:34:59: error: 'SPR0' was not declared in this scope
SPCR = (1 << SPE) | (1 << MSTR) | (1 << SPR1) | (1 << SPR0);
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:34:59: note: suggested alternative: 'SPI0'
SPCR = (1 << SPE) | (1 << MSTR) | (1 << SPR1) | (1 << SPR0);
^~~~
SPI0
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:35:5: error: 'SPSR' was not declared in this scope
SPSR |= (1 << SPI2X);
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:35:5: note: suggested alternative: 'SS'
SPSR |= (1 << SPI2X);
^~~~
SS
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:35:19: error: 'SPI2X' was not declared in this scope
SPSR |= (1 << SPI2X);
^~~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:35:19: note: suggested alternative: 'SPI_t'
SPSR |= (1 << SPI2X);
^~~~~
SPI_t
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:50:9: error: 'PIND' was not declared in this scope
if (PIND & (1 << CLOCK_BIT))
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:50:9: note: suggested alternative: 'PIN0'
if (PIND & (1 << CLOCK_BIT))
^~~~
PIN0
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:61:11: error: 'PIND' was not declared in this scope
if (!(PIND & 0x80))
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:61:11: note: suggested alternative: 'PIN0'
if (!(PIND & 0x80))
^~~~
PIN0
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:69:9: error: 'PIND' was not declared in this scope
v = PIND;
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:69:9: note: suggested alternative: 'PIN0'
v = PIND;
^~~~
PIN0
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:70:9: error: 'PINC' was not declared in this scope
w = PINC;
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:70:9: note: suggested alternative: 'PIN0'
w = PINC;
^~~~
PIN0
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:109:5: error: 'SPDR' was not declared in this scope
SPDR = 0xff;
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:109:5: note: suggested alternative: 'SDA'
SPDR = 0xff;
^~~~
SDA
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:120:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & (1 << SPIF)))
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:120:27: note: suggested alternative: 'SPI0'
while (!(SPSR & (1 << SPIF)))
^~~~
SPI0
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:190:27: error: 'SPIF' was not declared in this scope
while (!(SPSR & (1 << SPIF)))
^~~~
D:\Daten\Dokumente\Arduino\Sketch_SDBox\Sketch_SDBox.ino:190:27: note: suggested alternative: 'SPI0'
while (!(SPSR & (1 << SPIF)))
^~~~
SPI0

exit status 1

Compilation error: 'SPCR' was not declared in this scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions