Skip to content

ATMega4809 support? #858

Closed as not planned
Closed as not planned

Description

@Mnjongen

Is the ATMega4809 (Arduino nano every) going to be supported? I noticed that the Arduino nano IOT was already added but not the nano every.

I tried adding it myself but I couldn't understand the fastpin_avr.h file.

Activity

  1. jvcop commented on Aug 7, 2019

    @jvcop

    Support for the Arduino Nano Every would be wonderful. I'm willing to contribute, but I'm new to these kinds of things.

    So far, I tried reusing the pin definitions of the ATmega328P (Nano v3) as I think the Nano Every can be used as a drop-in replacement. I might be wrong, though. In any case, I ran into a number of follow-up problems that I didn't have time to investigate yet.

  2. Mnjongen commented on Aug 7, 2019

    @Mnjongen
    Author

    I have been trying some things (example: making it look like it's a nano) but still couldn't get it to work. I'll just have to wait for someone with a solution.

  3. focalintent commented on Aug 12, 2019

    @focalintent
    Contributor

    I have a nano every on order and once it gets here I can start looking at getting it supported - I don’t think it is just going to be a new set of pin definitions.

  4. focalintent commented on Aug 15, 2019

    @focalintent
    Contributor

    The ATMega4809 is different enough from the rest of the AVR based boards that FastLED supports that it will effectively be a full port (ARCH_ARDUINO_AVRMEGA vs. ARCH_ARDUINO_AVR). The pin work is done on a branch, but it can't make use of the existing avr asm code for things like the WS2812 output and such, there are enough differences already. I'm going to be re-writing the asm code for both avr and m0 already for the RGBW support - I'll roll in updating the asm for the ATmega4809 into that process, but probably not before then.

  5. jvcop commented on Aug 15, 2019

    @jvcop

    @focalintent Thanks for the update!

    Speaking of WS2812, would the WS2801 be supported as well?

  6. focalintent commented on Aug 19, 2019

    @focalintent
    Contributor

    Yes, although not with hardware SPI - you can check out the branch here https://github.com/FastLED/FastLED/tree/avrmega -- but I won't merge it back into master until I have a solution for WS281x style chips working.

  7. hiduino commented on Aug 29, 2019

    @hiduino

    Using the flat register names you could use the existing fastpin_avr.h class file for the port and pin definitions. I've use this to get the ATtiny series 0/1 and ATmega series 0 to work with DotStar LEDs.

    #if !defined(AVR_ATtinyxy7) && !defined(AVR_ATtinyxy6) && !defined(AVR_ATtinyxy4) && !defined(AVR_ATtinyxy2) && !defined(AVR_ATmega4809)

    #define _FL_IO(L,C) _RD8(DDR ## L); _RD8(PORT ## L); _RD8(PIN ## L); _FL_DEFINE_PORT3(L, C, _R(PORT ## L));
    #define _FL_DEFPIN(_PIN, BIT, L) template<> class FastPin<_PIN> : public _AVRPIN<_PIN, 1<<BIT, _R(PORT ## L), _R(DDR ## L), _R(PIN ## L)> {};

    #else
    // Register name equivalent (using flat names) DDRA as PORTA_DIR, PORTA as PORTA_OUT, PINA as PORTA_IN
    #define _FL_IO(L,C) _RD8(PORT ## L ## _DIR); _RD8(PORT ## L ## _OUT); _RD8(PORT ## L ## _IN); _FL_DEFINE_PORT3(L, C, _R(PORT ## L ## _OUT));
    #define _FL_DEFPIN(_PIN, BIT, L) template<> class FastPin<_PIN> : public _AVRPIN<_PIN, 1<<BIT, _R(PORT ## L ## _OUT), _R(PORT ## L ## _DIR), _R(PORT ## L ## _IN)> {};

    #endif

    Yes, you will still need separate asm code changes for the WS2812 type LEDs.

  8. Rydogdav commented on Nov 2, 2019

    @Rydogdav

    Any further progress on this? I'd really like to be able to use my WS2812Bs. Thanks!

  9. graysonmendenhall commented on Feb 6, 2020

    @graysonmendenhall

    Has there been any more progress on this issue or should I just revert to using a regular Nano?

  10. kriegsman commented on Feb 6, 2020

    @kriegsman
    Member

    Not supported yet but we’re starting to collect relevant info over on #716
    Would love to have help if you have some expertise with the ATmega4809 pin/port mappings, too

  11. ngyl88 commented on Sep 18, 2024

    @ngyl88
    Contributor

    @Mnjongen, @kriegsman or other repo maintainers:
    I suggest we closed this issue as #716 covers both Arduino Uno Wifi Rev. 2, Arduino Nano Every.

    I believe this issue is mostly around Arduino Nano Every, which is the subset of ATmega changes over the recent years.

    We should be able to group and track similar and more recent issue with

  12. Mnjongen commented on Sep 18, 2024

    @Mnjongen
    Author

    I will close the issue as suggested. It seems some development has been done on the every, and newer issues are probably more relevant and detailed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions