C: Developing in C on the AVR ATmega328P


A set of entries which comprise a course for learning how develop C programs for the AVR family and specifically the ATmega328P.

As of January 24th, 2022, I have two releases on the Github AVR_C site:

  • Initial Release v0.5.0 is for the ATmega328PB Xplained Mini board.
  • Tested with Arduino Uno v0.6.0 is for the Arduino Uno.

If you aren’t using git, the easiest thing to do is to click on the Assets triangle and download one of the two formats, zip or tar.gz. Expand them and you may begin to use the code as described in this tutorial.

Content Types (in increasing complexity)

  • Developing in C for the ATmega328P: Entries are intended to help someone replace the Arduino C/C++/Custom software framework with a Standard C approach. The value of this approach is it can make learning C a little more approachable as the ATmega328P is a “relatively” simple microcontroller.
  • AVR Datasheet Note: Entries dive a little more deeply into the technical aspects of the ATmega328P chip. This content is intended to help somone understand how to use the datasheet to implement a specific function using the ATmega328P.
  • AVR-gcc Note: Entries focused on specifically using the AVR-gcc library or examples from the library.
  • Hardware Debugging Use Bloom, gdb, debugWIRE, a hardware debugger such as the Microchip SNAP or the one on the ATmega328PB Xplained Mini board to debug programs on the microcontroller.


Developing in C for the ATmega328P

  1. Developing in C for the ATmega328P: Getting Started
  2. Developing in C for the ATmega328P: Setup Introduction
  3. Developing in C for the ATmega328P: Linux Setup
  4. Developing in C for the ATmega328P: macOS Setup
  5. Developing in C for the ATmega328P: Windows Setup
  6. Developing in C for the ATmega328P: Standard C Framework
  7. Developing in C for the ATmega328: Multitasking

AVR Datasheet Note

  1. AVR Datasheet Note: Blink
  2. AVR Datasheet Note: PWM
  3. AVR Datasheet Note: analogWrite

AVR-gcc Note

  1. AVR-gcc Note: Simple Project

Hardware Debugging

  1. Hardware Debug: Using gdb to debug
  2. Hardware Debug: Setup Bloom and gdb to Debug
  3. Hardware Debug: Examples of Bloom with gdb to Debug
  4. Hardware Debug: Hints on Solving Issues Bloom and gdb
  5. Hardware Debug: Exploring the ATmega328PB Xplained Mini

Comments powered by Talkyard.