Hello,
I need to directly access registers within the Nano Every ATMEGA4809 (reference voltage options and similar; not covered by existing libraries). I'm guessing there's a header file somewhere with all the registers - could someone point me to it please?
Apologies in advance if this is an old subject.
Thanks - Paul.
The analog reference's shown here for the megaAVR boards will apply to the Nano Every.
Arduino megaAVR Boards (Uno WiFi Rev2)
DEFAULT: a built-in 0.55V reference
INTERNAL: a built-in 0.55V reference
VDD: Vdd of the ATmega4809. 5V on the Uno WiFi Rev2
INTERNAL0V55: a built-in 0.55V reference
INTERNAL1V1: a built-in 1.1V reference
INTERNAL1V5: a built-in 1.5V reference
INTERNAL2V5: a built-in 2.5V reference
INTERNAL4V3: a built-in 4.3V reference
EXTERNAL: the voltage applied to the AREF pin (0 to 5V only) is used as the reference
https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/
I’m using the standard Arduino IDE. It recognises common IO registers such as PORTB but not the VREF CTRLA & CTRLB ones, for example.
Thanks, I’ll try those although I’d still be interested in a general header for all ATMEGA4809 registers.
Make sure for Registers Emulation Atmega 328 you select "None"
You may want to try [MegaCoreX] (GitHub - MCUdude/MegaCoreX: An Arduino hardware package for ATmega4809, ATmega4808, ATmega3209, ATmega3208, ATmega1609, ATmega1608, ATmega809 and ATmega808 )
instead of the megaAvr core. It has more features, is better maintained, and certainly supports all the register syntax of the AT4809.
Thanks again - I'll certainly take a look
westfw
February 22, 2024, 9:56am
8
Typically you'd want C:\Users\*YourUserName*\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\iom4809.h
1 Like
system
Closed
August 20, 2024, 9:57am
9
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.