Closed bogrol2003 closed 2 months ago
Despite the marketing claims, the Nano Every is not very similar the older Nano. It uses a new microcontroller with very different port mappings. It uses four different ports just to map the D0..D7 bits. Your best bet might be to just get an original Nano board for your programmer.
Here's a good article on the Nano Every and why it isn't a good match for original Nano projects: https://emalliab.wordpress.com/2021/12/15/getting-to-know-the-arduino-nano-every/
Greetings!
I have been trying very hard to port your code the newer Nano version but I am not sure what to use in place of port variables, which are not compatible with this AVR version and official documentation or forum resources are quite sparse.
I tried substituting the following:
PORTB
asPORTB.OUT
andPORTB.IN
such asPORTB = (PORTB & 0xfc) | (data >> 6);
becomesPORTB.OUT = (PORTB.IN & 0xfc) | (data >> 6);
PINB
asPB
DDRB
asPORTB.DIR
thusDDRB |= 0x03;
is rewritten asPORTB.DIR |= 0x03;
... and various other combinations.
For example, using the Dff or A7ff commands, no data or address lines change state, I suspect due to above being incorrect. I would be exceptionally grateful if such support were to be released and tested by the developer as my experience with Arduino is limited.