Skip to content

Little bare-metal example to blinks built-in LED and demo use of UART on an Arduino MEGA2560 board

License

Notifications You must be signed in to change notification settings

maehw/arduino-mega2560-bare-metal-uart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Usage

This example blinks the built-in LED (Arduino pin 13) connected to an Arduino MEGA2560 (which is based on an ATmega2560 MCU). Additionally, it also sends "hello\n" and "world\n" messages via UART0. These serial messages can received on the PC-side via the USB CDC thanks to the additional ATmega 16U2 on the Arduino board.

This code is not using the Arduino IDE and libraries, but the gcc-avr toolchain, avr-libc libraries, a pretty bare-metal C program and avrdude to flash it to the target.

  • make: to compile and link main.c

  • make program: to flash the program with avrdude

Dependencies

  • Installation of gcc-avr
  • Installation of avr-libc
  • Installation of avrdude
  • Installation of make

About

Little bare-metal example to blinks built-in LED and demo use of UART on an Arduino MEGA2560 board

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages