First Look at Arduino Nano Every

I just received two Arduino Nano Every boards with the ATmega4809 microcontroller. Here are my first observations studying the boards. Next post I will show how I am handling the digital I/O pins and will talk about the compatibility layer that (attempts to) makes the Nano Every behave like a Nano.

The Arduino Nano Every is designed to mimic as closely as possible the functionality of the Arduino Nano, but using the more modern ATmega4809 microcontroller. This is sad because the ATmega4809 has so much more to offer than the ATmega328P in the older Arduino Nano. Let’s look at the major distinctions between the two. The older Nano in parenthesis.

  • 6KB (2KB) RAM
  • 48KB (32KB) Flash ROM (program memory)
  • 256B (1024B) EEPROM
  • Effectively Von-Neumann (Harvard) architecture, so no more special handling of data in program memory.
  • Programmed via new interface, not requiring the USART. USB interface chip changed to a SAM microcontroller from an AVR.
  • Possible 20MHz (16MHz) operation. No longer uses or needs an external crystal.
  • All the peripheral interfaces are of new designs, so function differently. The Arduino Library hides this.
  • Arduino Nano Every is half the price of the Arduino Nano. However clones of the Nano are about a third of the price of the Arduino Nano Every. There are no clones of the Arduino Nano Every  (yet).
  • “Pin for pin compatible”, but this isn’t necessarily a good thing, nor is it quite true. 
    • Nano Every is missing PWM capability on D11.
    • Pins A6 and A7 can be used as digital I/O pins on the Nano Every.
    • SPI SS is on pin 8 on Nano Every, pin 10 on Nano.
    • External interrupts allowed on all pins, not just 2 and 3 (although readers of   Far Inside The Arduino know about pin change interrupts for all pins, it’s just not part of the Arduino Library.)

In order to maximize compatibility with the Nano, some capabilities of the ATmega4809 are effectively hidden.

  • The Nano Every can be configured (by modifications to the board.txt file) to run at 20MHz, but by default is configured to run at 16MHz for compatibility, thus reducing performance by 20%.
  • The board wastes two pins that could be used to bring out additional digital pins. Instead one pin is unassigned and another is a duplicate of the reset pin.
  • Digital pins 3, 6, 8, 11, 12, and 13 can also be used as inputs to the analog to digital converter (they are inputs 15, 14, 11, 8, 9, and 10, respectively) . In fact the analog pins 0 through 7 on the Nano Every don’t connect to ADC inputs 0 through 7 respectively but to 3, 2, 1, 0, 12, 13, 4, and 5. You basically need a translation table and there are 14 (of 16) analog inputs actually available.
  • There are four USARTs. The USB connected USART is USART3. This becomes unit Serial in the Arduino library. The serial port on pins 0 and 1 are USART1 on unit Serial1. The other two USARTs are not handled by the Arduino Library but exist on pins 2 (TX) and 7 (RX) for USART0 and pins 6 (TX) and 3 (RX) for USART2. To access USART2 requires changing a pin assignment.
  • There is one “type A” 16-bit Timer/Counter. It has three compare channels which provide PWM on pins 5, 9, and 10 on channels 2, 0 and 1 respectively.
  • There are four “type B” 16-bit Timer/Counters each of which can run as 8-bit PWM generators. TCB0 provides PWM on pin 6 and TCB1 provides PWM on pin 3. The two other channels are not accessible on the Nano Every board. However TCB3 is used to implement the Arduino Library timer functions.

Features available but not used or presented by the Arduino library include: input capture (on type B Timer/Counters), 16-bit Real Time Counter and Programmable Interrupt Timer, Analog Comparator, Watchdog Timer, Event System, Configurable Custom Logic, sleep modes. All peripherals have additional features over those in the ATmega328P. Not all of the features are fully available because of pins not brought out on the board.