Mega 4808microcontroller

Mega 4808 and Optiboot bootloader

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´t want to make a UPDI Programmer on this board. In this cases you can use a bootloader for programming.

In this post we use the Mega 4808 with the Optiboot bootloader. The bootloader is implemented in the MegaCoreX. If you don´t know how to start with the Mega 4808 and Arduino you can read the Getting started with Mega 4808 and Arduino post.

Lets start. At first choose the Mega 4808 and choose you favorite Mega 4808 settings. Choose also the UART for the bootloader interface. Only over this UART you can programm the Mega 4808 via the bootloader.

The pinout for the UART you can find in Mega 4808 Arduino pin usage / pinout. Now check if you select the correct Programmer. After this connect you UPDI programmer to the Mega 4808. Now we can start to program the bootloader. Click at the burn bootloader button under tools for programming the bootloader on the Mega 4808.

Now we have successfully burned the bootloader on the Mega 4808. Now every time we wanna program the Mega 4808 we must choose the bootloder in the Mega 4808 settings like in the image above. If you choose no bootloader the program overwrites your bootloader and you need to program the bootloader again.

If you wanna program the Mega 4808 via the bootloader you can connect the USB to UART converter, CP2102 or something else, to the Mega 4808 and power it on. Please make sure that the logic voltages from the programmer and Mega 4808 are the same. Choose also the correct COM Port of your USB to UART converter. Now you can program the Mega 4808 via Arduino. You need to reset the microcontroller before programming, because the bootloader only starts after a power on or a reset.

Now you can use your Mega 4808 with the Optiboot bootloader.


Other posts about Mega 4808

Mega 4808 and Optiboot bootloader

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´…

Mega 4808 sleep modes

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.

Mega 4808 Arduino and Serial (UART)

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…

Arduino Mega 4808 minimal board

For testing your code for the Mega 4808 with Arduino you need a board where every pin is accesable.

DIY UPDI Programmer for Mega 4808

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.

Mega 4808 Arduino pin usage / pinout

You wanna use the Mega 4808 with MegaCoreX and Arduino? Then you need the standard pin usage / pinout for it.

Getting started with Arduino and Mega 4808

You wanna get started with the Mega 4808 in Arduino and you do not now how? Here is your answer.

Leave a Reply

Your email address will not be published. Required fields are marked *