This article is the use of ETT‘s ET-BASE AVR EASU4809 board based on Microchip’s ATMEGA4809 microcontroller, which is used as an Arduino board running at 20MHz with 40KB FLASH ROM, 256 bytes EEPROM, 6KB of RAM, and a 10-bit ADC, which is said to have significantly higher features than the ATmega 368P used with the Arduino Uno or Arduino Nano. In addition, the board selected this time has more features than basic Arduino boards which you can read further from the web page of the board.
ATmega4809
The ATmega4809 microcontroller is an 8-bit microcontroller based on RISC architecture and the features are:
- Flash ROM 48KB, writable/erasable 10,000 times
- SRAM 6KB
- Writable/erasable 100,000 times
- 4 channels UART
- SPI channel
- i2C channel
- 11 channels PWM
- 16 channels Input Capture
- 5 channels 16-bit Timer
- 16 channels 10-bit ADC
- 8 channels Even System
- 41 pins GPIO
- PA0..PA7
- PB0..PB5
- PC0..PC7
- PD0..PD7
- PE0..PE3
- PF0..PF6
- 10 sources Asynchronous external interrupts
- 3 Sleep mode eg. Idle, Standby and Power-down
Board installation
The steps for installing board information to use with Arduino IDE are as follows.
- Go to File/Preferences menu. Add the following items of MCUdude
https://mcudude.github.io/MegaCoreX/package_MCUdude_MegaCoreX_index.json - Go to Tools/Board:xxx/Board Manager …
- Search for MegaCoreX and install as shown in Figure 2.
- Select the board list as MegaCoreX/ATmega4809 as shown in Figure 3.
- Ready to use as shown in the Figure 4 but make sure that the following values are correct.
- clock is internal 20 MHz
- Bootloader เป็น Optiboot (UART0 default pins)
- Port connected to the board
Example Code
An example code that comes with Board ET-BASE AVR EASY4809 of ETT is as follows:
- Examples of ADC usage
- ADC 0-7
- ADC 8-11
- ADC 12-15
- Example of Blink LED on board
- Examples of various data transmissions.
- LED Moving ALL
- LED Moving D0-D7
- LED Moving D8-D13
- LED Moving D14-D21
- LED Moving D22-D29
- LED Moving D30-D33
- LED Moving D34-D40
- RS232 CH1 communication example.
- RS485 communication example
- RS485 CH1
- RS485 CH2
Example of finding Prime Number from numbers 2-2,000 as illustrated in article LGT8F328P. The result is as shown in Figure 5, which is considered with a speed increase of 4MHz from 16MHz to 20MHz, making the speed much better. Compared to the LGT8F328P, which operates at 32MHz but is slower, the ATmega4809 is an interesting 8-bit microcontroller.
Conclusion
From this article, you will find that Microchip has continued to develop the AVR family of microcontrollers. In this version, there is a noticeably higher potential. And can be used with a wide range of Arduino class libraries, and the ET-BASE AVR EASY4809 board has fully enabled the pins of this chip. Since we see that this chip is put in the Arduino Nano’s frame, the I/O is not fully used. In addition, the board also has a connection to external devices for ease of use. Finally, have fun with programming.
If you want to discuss or talk with us, feel free to leave comments below!
(C) 2020-2021, By Jarut Busarathid and Danai Jedsadathitikul
Updated 2021-10-11