CC-BY-SA 3.0

Recommend Projects

ATmega4808 Development Board M

10 months ago 2456
  • Description
  • Documents
  • BOM
  • Attachments
  • Members
  • Comments


ATmega4808 Development Board

Development board for the new ATmega4808 series with integrated USB-to-serial converter, 32.768 kHz crystal for the RTC, 3.3V voltage regulator, support for bootloader and Arduino IDE. Due to a similar pinout, the board also works with the new AVR DA/DB family of microcontrollers.


Features of the megaAVR

The ATmega4808 microcontrollers are part of the megaAVR 0-series, which uses the AVR processor with hardware multiplier running at up to 20 MHz from the internal calibrated oscillator. The series uses the latest technologies from Microchip with a flexible and low-power architecture, including Event System and SleepWalking, accurate analog features, and advanced peripherals.

The following microcontrollers (TQFP-32 package) can be used with this development board:

Controller Flash SRAM EEPROM
ATmega808 8 KB 1 KB 256 B
ATmega1608 16 KB 2 KB 256 B
ATmega3208 32 KB 4 KB 256 B
ATmega4808 48 KB 6 KB 256 B

All microcontrollers have the following features:

  • 27 General purpose I/O
  • One 16-bit Timer/Counter type A (TCA) with a dedicated period register and three compare channels
  • Three 16-bit Timer/Counters type B (TCB) with input capture
  • One 16-bit Real-Time Counter (RTC) running from an external crystal or an internal RC oscillator
  • Three USARTs with fractional baud rate generator, auto-baud, and start-of-frame detection
  • Master/slave Serial Peripheral Interface (SPI)
  • Master/slave TWI (I²C) with dual address match,
    • can operate simultaneously as master and slave
    • Standard mode (Sm, 100 kHz)
    • Fast mode (Fm, 400 kHz)
    • Fast mode plus (Fm+, 1 MHz)
  • Event System for core independent and predictable inter-peripheral signaling
  • Configurable Custom Logic (CCL) with up to four programmable Look-up Tables (LUT)
  • One Analog Comparator (AC) with a scalable reference input
  • One 10-bit 150 ksps Analog-to-Digital Converter (ADC) with 12 channels
  • Five selectable internal voltage references: 0.55V, 1.1V, 1.5V, 2.5V, and 4.3V
  • Watchdog Timer (WDT) with Window mode, with a separate on-chip oscillator
  • External interrupt on all general purpose pins



Preparing Arduino IDE and Installing Bootloader

  • Install MegaCoreX
  • Open the Arduino IDE
  • Go to "Tools" -> "Board" -> "MegaCoreX" -> "ATmega4808"
  • Go to "Tools" and set the following board options:
    • Clock: "Internal 20 MHz"
    • Pinout: "32 pin standard"
    • Reset pin: "Reset"
    • Bootloader: "Optiboot (UART0 default pins)"
    • Programmer: "jtag2updi(megaTinyCore)"
  • Connect the UPDI programmer to the UPDI header on the development board. You can find such programmers in my projects or you can use an Arduino Uno as a UPDI programmer. Do NOT use high voltage programming!
  • Go to "Tools" -> "Burn Bootloader"
  • Disconnect the UPDI programmer and connect the development board via USB to your computer
  • Open one of the example sketches and click the "Upload" button

Example Sketches

To test the board and to learn a thing or two about the new megaAVR, four small example sketches are attached.

Sketch Name Description
ATmega4808_Hello_World.ino This sketch flashes the built-in LED at 1 Hz and sends a message once per second via the serial interface, which can be displayed on the serial monitor at 9600 baud.
ATmega4808_RTC.ino This sketch implements a real-time clock using the external 32.768 kHz crystal. Every five seconds the current time and date is sent via the serial interface, which can be displayed on the serial monitor at 9600 baud.
ATmega4808_Blink_PIT.ino One of the new features is the Periodic Interrupt Timer (PIT), which can run on the internal ultra low-power 32.768 kHz oscillator while the CPU is in sleep mode power down. In this sketch, the PIT wakes the sleeping CPU twice per second in order to toggle the built-in LED.
ATmega4808_Blink_CIP.ino One of the coolest new features are the Core Independent Peripherals (CIPs). Peripherals can be connected directly to one another via the Event System (EVSYS) and thus work independently of the CPU. In this example, the built-in LED is flashing while the CPU is in sleep mode power down all the time ... without ever waking up.

Using the AVR DA/DB Family of Microcontrollers

The even more powerful AVR DA/DB family of microcontrollers (TQFP-32 package) can also be used with this board. Some of their features (depending on the model):

  • Up to 128 KB of flash and 16 KB of SRAM
  • Running at up to 24 MHz with internal oscillator (or even more with overclocking)
  • 12-bit Differential Analog-to-Digital Converter (ADC) with 14 channels
  • 10-bit Digital-to-Analog Converter (DAC)
  • 3 Analog Comparators (AC)
  • 2 independent OpAmps with integrated feedback resistor network
  • Zero-Cross Detector (ZCD)
  • Peripheral Touch Controller (PTC) with 22 self-capacitance and 121 mutual capacitance touch channels
  • 4 Multi-Voltage I/O channels capable of bi-directional communication with external devices running at a higher or lower voltage than the MCU itself
  • 3 UART, 2 SPI, 2 I2C
  • 4 16-bit timers
  • Configurable Custom Logic (CCL)
  • Event System (EVSYS)
  • Watchdog Timer (WDT) with Window Mode

In order to be able to use the AVR DA/DB microcontrollers with the Arduino IDE, DxCore must be installed.

References, Links and Notes

  1. MegaCoreX by MCUdude
  2. megaAVR 0-series Family Data Sheet
  3. ATmega4808 Datasheet
  4. TB3262: Getting Started with Writing C-Code for AVR MCUs
  5. TB3213: Getting Started with RTC
  6. AN2451: Getting Started with Core Independent Peripherals
  7. AN2515: AVR Low-Power Techniques
  8. AN2543: Temperature Logger with ATtiny817 and SD Card
  9. Core Independent Peripherals Video by Microchip




This work is licensed under Creative Commons Attribution-ShareAlike 3.0 Unported License. (





ID Name Designator Footprint Quantity BOM_Supplier BOM_Supplier Part
1 CH330N U2 SOP-8_150MIL 1 LCSC C108996
2 HDR H2,H1 210S-15X1/2.54 2 LCSC C124373
3 1k R3,R2,R5,R1,R6 0603 5 LCSC C21190
4 UPDI H3 210S-3X1/2.54 1 LCSC C49257
5 ATMEGA4808-AFR U1 TQFP-32_7X7X08P 1 Digi-Key ATMEGA4808-AFRCT-ND
6 AMS1117-3.3 U3 SOT-223 1 LCSC C6186
7 500mA F1 F0603 1 LCSC C210356
8 RESET KEY1 KEY-3.0*6.0 1 LCSC C46491
9 4u7 C9,C12 0603 2 LCSC C19666
10 100n C6,C1,C7,C2,C8 0603 5 LCSC C14663
11 18p C5,C4 0603 2 LCSC C1647
12 1u C10,C11 0603 2 LCSC C15849
13 47u C3 1206 1 LCSC C30300
14 PWR LED1 LED0603 1 LCSC C72041
15 BI LED2 LED0603 1 LCSC C72041
16 Micro USB 5P USB1 MICRO-USB-16-LONG 1 LCSC C21377
17 32.768KHz X1 OSC-SMD_3215 1 LCSC C409356
18 5817 D2 SCHOTTKY-SOD-123 1 LCSC C727113


Filename Download
The owner does not allow comments in this project now

Comments (9)

Miraculix200 Reply

Thanks for the design. It inspired me to create my own one, with FTDI header and optional NRF24L01+ SMD module:

I think I'll use this MCU instead of ATmega328s in the future.

Stefan Wagner Reply

@Miraculix200  Many Thanks. Your project looks very interesting. The ATmega4808 is already better than the ATmega328p. I'm currently trying out the new AVR DA / DB microcontrollers, which are even more powerful. As it stands, they can be used directly with the same board design. Instead of MegaCoreX you then use DxCore in the Arduino IDE.

Miraculix200 Reply

@Stefan Wagner  I also found the DA/DB a few days ago. So I already changed my board a little. The DB has a VDDIO2 pin instead of D12 on the DA though. It needs another capacitor.

Will try DB or DD (probably released in Q1 2020) next year. The 12-bit ADC is interesting. I wonder if it can be used to improve the transistor tester thing you cloned. Was too lazy to look at all that code to find out what it does.

Did you order the DB directly from microchip?

Stefan Wagner Reply

@Miraculix200  Until now I could only get the DA series from digikey. It works so far on the board, although the DxCore sometimes causes problems under Linux.

Miraculix200 Reply

@Stefan Wagner  I've ordered some AVR128DB32s directly from Microchip. The circuit is recommended to be slightly different, e.g. the reset part (1u filter capacitor and 330 Ohm resistor to discharge the filter capacitor). Though I guess it works with your circuit too.

Here's my circuit for this MCU:

Stefan Wagner Reply

@Miraculix200  Cool, I just ordered a couple of 128DB32 on digikey yesterday, they're back in stock. I'm curious.

Miraculix200 Reply

@Stefan Wagner  Nice. Didn't know they have it on digikey. doesn't have it yet.

So far it looks good. Just one silicon bug I needed to fix in my code (needed to disable input buffers for pin PD0 to reduce current draw a little). 12-bit ADC and MVIO level shifter work well.

Miraculix200 Reply

Because I wrote that you need a 1uF filter cap: I don't think it's a strict necessity. And in my case it breaks autoreset throught the DTR pin. Though for your board it probably doesn't matter, as you don't use DTR autoreset, but UPDI only.

Stefan Wagner Reply

@Miraculix200  I think it's mainly there to make the circuit immune to noise. In a normal environment it usually works without it (this is also the case with the "old" ATmegas). My chips arrived today, hopefully I'll find time to try them out over the weekend. In a pinch, I build the filter outside on the breadboard.

如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow
We use cookies to offer you a better experience. Detailed information on the use of cookies on this website is provided in our Privacy Policy. By using this site, you consent to the use of our cookies.