- Install the MCUdude/MegaCoreX in Arduino
Open Arduino File → Preferences
Type in Additional Boards Manager URLs this URL: https://mcudude.github.io/MegaCoreX/package_MCUdude_MegaCoreX_index.json
Now open Tools → Board → Boardsmanager and search for MegaCoreX and install it.
2. Get a UPDI programmer. You can make it from an Arduino Nano ElTangas/jtag2updi
Here you can read how to build your own UPDI programmer for the megaAVR 0-series.
3. Get a Mega 4808 Board and flash it over the UPDI Pin.
Here you can read how to build your own Mega 4808 minimal board.
Choose the right board under tools and set your configurations
You can set the CPU clock. I use 5 MHz because this is the highest CPU clock which can be selected for a 1.8V Power Supply. You can also enable the BOD (brown out detection) and select the BOD voltage. For the Mega 4808 in a 32 pin package please use 32 pin standard pinout. It is also possible to choose the usage of the reset pin. You can use it as GPIO or reset pin. There is also a bootloader available. You can choose the UART where you want to flash it. To burn the bootloader you need to click on the burn bootloder button. Please choose also the COM Port of your programmer.
Select the JTAG2UPDI programmer if you use the JTAG2UPDI Arduino Nano build.
Connect the 5V Power supply, ground and the UPDI pin of the Mega 4808 to your UPDI Programmer.
Flashing the code over the button upload using programmer
Other posts about Mega 4808
The Mega 4808 can normally programmed over UPDI. The UPDI Interface is great, you need only one data wire and ground, but in some cases you wanna program the microcontroller at your board and you don´…
In most every project your microcontroller does not run all the time. You also don´t want to waste battery capacity, so you should set your microcontroller into a sleep mode.
You wanna use the Arduino serial (UART) with a Mega 4808 board? No, problem. The Mega 4808 has three serial (UART) interfaces. Here you can read on which pins you can use the serial (UART) interface a…
For testing your code for the Mega 4808 with Arduino you need a board where every pin is accesable.
You wanna programm the Mega 4808 or an other megaAVR 0-series microcontroler? Then you need a UPDI programmer. You can buy the Atmel ICE for ~100$ or you can make your own UPDI Programmer.
You wanna use the Mega 4808 with MegaCoreX and Arduino? Then you need the standard pin usage / pinout for it.