Skip to content

An Arduino hardware package for ATmega8515 and ATmega162

License

Notifications You must be signed in to change notification settings

MCUdude/MajorCore

Repository files navigation

MajorCore

Build Status

An Arduino core for large, 8051 pin compatible, breadboard friendly AVRs, all running the Urboot bootloader. This core requires at least Arduino IDE v1.8, where v1.8.9 or newer is recommended. IDE 2.x should also work.

From MajorCore version 3 and onwards, the Optiboot bootloader has been replaced by the superior Urboot bootloader. It's smaller, faster, and has automatic baud rate detection, and can read and write to EEPROM. Other cool features the bootloader provides but are not utilized by MajorCore are user program metadata stored in flash (that can easily be viewed by Avrdude -xshowall) and chip-erase functionality. If you already have Optiboot installed and don't want to replace it with Urboot, you can still upload programs without any compatibility issues. However, if you're burning a bootloader to a new chip, Urboot is the way to go.

Table of contents

Supported microcontrollers

  • ATmega162
  • ATmega8515

Supported clock frequencies

MajorCore supports a variety of different clock frequencies. Select the microcontroller in the boards menu, then select the clock frequency. You will have to hit "Burn bootloader" in order to set the correct fuses and upload the correct bootloader. This also has to be done if you want to change any of the fuse settings (BOD and EEPROM settings) regardless if a bootloader is installed or not.

Make sure you connect an ISP programmer, and select the correct one in the "Programmers" menu. For time-critical operations, an external crystal/oscillator is recommended. The Urboot bootloader has automatic baud rate detection, so UART uploads should work fine even though the oscillator is a little too fast or too slow.

Frequency Oscillator type Default upload speed
(bootloader has auto-baud)
Comment
16 MHz External crystal/oscillator 115200 Default clock on most AVR based Arduino boards
20 MHz External crystal/oscillator 115200
18.4320 MHz External crystal/oscillator 115200 Great clock for UART communication with no error
14.7456 MHz  External crystal/oscillator 115200 Great clock for UART communication with no error
12 MHz External crystal/oscillator 57600
11.0592 MHz External crystal/oscillator 115200 Great clock for UART communication with no error
9.216 MHz External crystal/oscillator 115200 Great clock for UART communication with no error
8 MHz External crystal/oscillator 57600 Common clock when working with 3.3V
7.3728 MHz External crystal/oscillator 115200 Great clock for UART communication with no error
6 MHz External crystal/oscillator 57600
4 MHz External crystal/oscillator 9600
3.6864 MHz External crystal/oscillator 115200 Great clock for UART communication with no error
2 MHz External crystal/oscillator 9600
1.8432 MHz External crystal/oscillator 115200 Great clock for UART communication with no error
1 MHz External crystal/oscillator 9600
8 MHz Internal oscillator 38400 Might cause UART upload issues. See comment above
4 MHz Internal oscillator 9600 Derived from the 8 MHz internal oscillator
2 MHz Internal oscillator 9600 Derived from the 8 MHz internal oscillator
1 MHz Internal oscillator 9600 Derived from the 8 MHz internal oscillator

Bootloader option

MajorCore lets you select which serial port you want to use for uploading. UART0 is the default port for all targets, but ATmega162 can also use UART1 for upload. If your application doesn't need or require a bootloader for uploading you can also choose to disable it by selecting No bootloader. This frees 384 bytes of flash memory on ATmega8/88/168/328 and 320 bytes on the ATmega48.

Note that you need to connect a programmer and hit Burn bootloader if you want to change any of the Bootloader settings.

Baud rate option

Since Urboot has automatic baud rate detection, the upload baud rate can be changed without having to re-flash the bootloader. The default baud rate setting will pick a suited baud rate that also works with the legacy Optiboot bootloader used in earlier MajorCore versions. The other baud rate options may or may not work, depending on the clock frequency and accuracy of the clock source. A rule of thumb is that "non-round" baud rates like 230400 works best with "non-round" clock speeds like 18.4320 MHz, while "round" ones like 16 MHz work best with "round" baud rates like 250000.

BOD option

Brown-out detection, or BOD for short lets the microcontroller sense the input voltage and shut down if the voltage goes below the brown-out setting. To change the BOD settings you'll have to connect an ISP programmer and hit "Burn bootloader". Below is a table that shows the available BOD options:

ATmega162 ATmega8515
4.3V 4.0V
2.7V 2.7V
1.8V -
Disabled Disabled

EEPROM option