Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino Nano Every support #123

Open
KyleLomen opened this issue Mar 12, 2022 · 1 comment
Open

Arduino Nano Every support #123

KyleLomen opened this issue Mar 12, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@KyleLomen
Copy link

Are there any plans to support the Arduino Nano Every? I just got one and was annoyed that FastAccelStepper doesn't work on it (I somehow did not notice that it uses a different processor from the Arduino Nano). From the quick research that I did, it will not be an easy change as the architecture is very different.

It uses the ATMega4809 (megaAVR architecture) and assuming that I understand the datasheet correctly, it has 1 "type A" and 4 "type B" timers. The Arduino Core seems to use the "type A" and 2 of the "type B" timers for PWM, but it also might use the other "type B" timers for something else? The code is not clear. The timer can generate an "event" that can trigger the MUX to control an output pin, the available output pins for the events are: PA2 (A4), PA7 (none), PB2 (D5), PC2 (none), PC7 (none), PD2 (A1), PD7 (none), PE2 (D13), PF2 (also A4?).

The more I look into this, the more it seems like a huge process and I would not know where to start. Perhaps this might help someone else in the future.

@gin66
Copy link
Owner

gin66 commented Mar 13, 2022

I have created a branch for AVRmega4809, which does not compile. The hope was, that the Timer type A is similar enough to the AVRs. But even, if the module is similar, the register/bit naming does not fit. So it will need much more time to get it going and ideally a board, too. Both I do not have and simavr apparently does not support that device, too. So in the near future, I cannot provide AVRmega4809 support. Sorry for this.

If someone likes to work on that port, then this branch is a good start. What needs to be done:

  • fix the correct pin assignment in AVRStepperPins.h
  • Adapt the register/bit names and/or adapt to different timer module

From what I have seen, the arduino core uses Timer type A only for analogwrite and only if the corresponding pins are in use. Curious, what the core uses as timebase.

@gin66 gin66 added enhancement New feature or request help wanted Extra attention is needed labels Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants