Hello,
Does sketches made for Arduino Nano work on Arduino nano every?
And also, is Arduino Nano Every more powerful (faster) than Arduino Nano? Because as I saw it is cheaper.
Thank you!
Hello,
Does sketches made for Arduino Nano work on Arduino nano every?
And also, is Arduino Nano Every more powerful (faster) than Arduino Nano? Because as I saw it is cheaper.
Thank you!
Well the official website says it will
Again the website shows it has a different processor run at 20MHz as opposed to the normal 16MHz of the original nano.
It also has more timers than the original one, now called the classic.
Yes it is a more modern design so it will be cheaper, that's how electronics works. The nano classic design is over 10 years old now.
It depends on the 3rd party libraries that you use. There are a number of them that will not compile; one reason can be that the author wrote them with the AVR architecture in mind and not the megaAVR arcitecture. Sometimes easy to fix, sometimes not if you don't have enough experience.
Do you you know if wire library and liquidcrystalLCD library would work? I never had an Every.
Things are quite easy to test, you do not need the board. Install the boards package for the 4809 (Nano Every and Uno WiFi rev2) and compile (verify). If you get errors, it can be looked into.
Wire library is a core library so code that includes it should compile. The LiquidCrystal library is also provided by Arduino (so not 3rd party) so same argument.
If you're referring to an I2C LiquidCrystal library, the story can be different. There are too many of them.
Just compiled my project code for Nano Every, used Nano Classic before. It works as before. I'm using SPI and Wire, but no direct register accesses in the C code. The IDE offers a register compatibility mode for atmega328, supposedly for direct register accesses, which is common when doing timer stuff, but my code is independent of these.
Also tested direct register access for blinking pin 13. The PORT/PIN/DDR registers of atmega328 are a bit modified. as the architecture of the atmega4809, which sits inside the Every, supports single-write modifications of status, instead of read + and/or + write. The advantage is obviously context switches (interrupts) are safe, as single writes are atomic.
I have tested the I2C, and it works exactly as before, both in atmega328 compatibility mode, and in "native" atmega4809 mode.
My main reason for upgrading, is 6 Kb of SRAM, compared to 2 Kb on Classic.
Blinking pin 13 using atomic operations:
void setup() {
PORTE_DIRSET=B00000100;
}
void loop() {
delay(100);
PORTE_OUTSET=B00000100;
delay(100);
PORTE_OUTCLR=B00000100;
}
Could also have used PORTE_OUTTGL to toggle the value in loop()
The Arduino Nano Every runs at 16 MHz by default, if the F_CPU define is to be trusted.
I believe the good old atmega328p also could be clocked to 20MHz at 5V. I haven't fully explored all features of 4809, but there seems to be LOTS more (Extended) I/O registers, and being a newer design, I wouldn't expect it to be any less efficient (per clock) than the classic.
F_CPU=16000000
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.