Nano Every use ATmega4808

Go To Last Post
66 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It seems Thinary Nano Every is still sold at:  https://www.aliexpress.com/item/4000427291663.html?spm=a2g0s.9042311.0.0.6f624c4d6RRSRE  . By reading the QR code you find a link to load Thinary Arduino IDE core. 

Thanks about debugWire info, it has been a while ago my attempts, maybe this time more luck. I will risk another UNO.  But as we said, UPDI on 4808 really works well. 

 

Andrej

 

Andrej M

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the link.   

 

9898 pieces available

 

It looks as if they manufactured a batch of 10000 in August 2019.   And have sold 192 so far.   Hence the attractive $4.89 price.

 

to United Kingdom via Cainiao Super Economy Global

Estimated Delivery: 30-50 days

 

Horrifies me.    Mind you,   Chinese packets generally take 8-18 days to get to the UK.   You might have to wait 50 days for a "no delivery".

If you are buying several boards it is worth paying for tracked shipping.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can use regular Arduino Serial comms:

#if defined(__AVR_ATmega4808__)
#define Serial Serial1
#endif

If you possess an ATMEL-ICE select Tool in Arduino IDE.  e.g. Programmer: Atmel-ICE UPDI

Then you can Sketch->Upload via Programmer (ctl-shift-U)

 

In AS7.0 you build, debug, run via the UPDI interface.   It works nicely.

 

Current versions of Adafruit_GFX library will not build on Thinary.    GFX is no problem.  It is all the other dross that Adafruit declares as "dependent"

Downgrade to v1.7.x

 

I am not sure what the Thinary "bootload problem" is.     Avrdude bootload works fine with the genuine Nano-Every both from AS7.0 or Arduino IDE.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It would be nice to have a feature in JTAG2UPDI that caused it to switch to some sort of Serial Passthough mode after you were done programming the chip, until some sort of signal were received that put it back into UPDI mode.

This is what the SAMD11 on the genuine "Every" does, except that it has USB on one side, whereas it'd be nice to have a defined method with serial on both sides.  (heh. Rx/Tx/DTR on one side, Rx/Tx/UPDI on the other.)  I assume that this is essentially what the Thinary board is doing with its mystery chip...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My Thinary has a N76E003AQ20 Nuvoton microcontroller,  CH340E910 USB-Serial, ATmega4808 Atmel microcontroller.  i.e. no "secret" chips.

Meanwhile the Mega4808 works quite nicely with ATMEL-ICE but obviously not as nicely as the Curiosity 4809.

 

El Tangas can probably explain how it works.   And how to recover the bootloader functionality.   After all,  not everyone has an Atmel-Ice.

 

I still reckon that a regular Optiboot-style bootloader would just need one CH340 and one Mega4808.   You would lose 512 bytes of Flash memory but Chinese could knock the boards out cheaply.

 

As far as I know,  the SAMD10 on the genuine Nano-Every does nothing more than USB-Serial and USB-UPDI programming.    The SAMD10 does NOT provide full UPDI debugging.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@david,

 

The trick "#define Serial Serial1" really works on Thinary Atmega4808.  Thankyou for the advice. Now programming, debugging and Serial.print in AS7 works with the help of UPDI and Atmel ICE.  I haven't try the Arduino IDE yet. 

I haven't try to restore and use the bootloader, but would be convenient too for programming, when you do not need debug. 

 

best regards, 

Andrej

 

 

Andrej M

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

my previous message was somehow lost, so I am repeating. 

 

The question is, has anyone suceedeed using LCD20x4 on Thinary Nano Every using I2C interface?

I connected A5 - SCL, A4 - SDA, as usual for Nano. 

 

I am using AS7 + Visual Micro Plugin for Arduino.

Downloading and debugging via UPDI works. The program loops in Wire.c library, function lcd.init().

 

The sentence is line 327:

        /* Arduino requires blocking function */
        while(master_result == TWIM_RESULT_UNKNOWN) {}
 

Any idea? 

 

Best regards, Andrej

 

Andrej M

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

amla11 wrote:
my previous message was somehow lost

No, it's been split to a thread of its own - here: https://www.avrfreaks.net/forum/...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, everybody

 

I try to draw pinout of this board

Could you check it and tell me what's wrong? or  what should be add

Timers, interrupts (but don't know its names and pinouts  )

 

Last Edited: Thu. Sep 10, 2020 - 01:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


 

Well google says:

 

 

so I'd start by comparing to that perhaps?

 

EDIT: actually more comprehensive is:

 

 

I go to that from the very interesting thread at:

 

https://forum.arduino.cc/index.php?topic=644395.0

 

Last Edited: Thu. Sep 10, 2020 - 03:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note that the Arduino pin numbers will depend on the core being used, and may vary from implementation to implementation, as will the pins for peripherals that are selectable via the pin mux.

 

The port pin numbers are of course fixed, per the datasheet, as are power and programming pins.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I try to draw pinout of this board

Could you check it and tell me what's wrong?

I would only label pins with functions provided by your boards.txt file.

For example, you have Ain8-Ain12 in the diagram, but your boards.txt only maps A0-A7.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How can you see, the arduino original nano every has Atmega4909. But in this topick we discussed chinese  board with Atmega 4808   

These are different boards. That's why I am trying to figure out a Chinese craft.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please read #53 and other messages in this thread.

 

Yes,  the Thinary board works.   The Arduino "Thinary" core has a few problems.   It has never been updated.   Look at the GitHub repository.

Thinary do not seem to respond to Issues or Pull Requests.

Note that the pin usage is very different to the genuine Nano-Every.

You can see the usage from the pins_arduino.h and variant.cpp files

 

It is probably worth the current $4.89 sale price if you know what you are going to do with it.

And it would help Thinary to recoup some of the cost of assembling their first batch of boards.

 

It is unlikely that they will ever be able to shift the whole batch unless the "Thinary Core" worked 100%.

So there is little point in making a nice graphic for the pinout.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi!

 

Testing your board with Arduino environment. One bug found in package_thinary_index.json file, which declares the architecture of the chip. It is declared as AVR whereas it should be MEGAAVR. It has effect on many thing. In addition to that you must override A.BUILD.ARCH build variable from AVR to MEGAAVR. Otherwise AVR libraries does not work. Also, since 4808 has only 3 timers, one must play some timer swapping game with certain libraries. 4809 based board worked without modifications. Anyway, it is just what it is.

 

Another issue is that for some reason PA1 (D3) pin does not go from HIGH (+5V) to LOW (0V), but it goes from +5V to +2.5V and from there it fades to +2.2V like it is draining some capacitor. I have LEDs in PA2, PA4-PA7 and these pins works correctly. The foil on the Nano Every board goes directly from pin to pin. The pin operates like it is analog pin in sort, but it is GPIO digital only pin. At least it should be. I have tested this with couple of boards, which are not attached to other electronics. Any ideas?

 

BTW. This is good board with way better design than similar Arduino board has. It is EMC hell. 

Pages