Developing in C on the AVR ATmega328P
Introduction
While the Arduino IDE and software framework is outstanding for quickly developing a working prototype, it does so with a combination of the C++ language and Arduino-only objects. This can become an issue if you are at a college or university which expects standards-based C language proficiency. This set of entries for designed for learning how develop embedded ANSI C programs for the AVR family and specifically the ATmega328P (Arduino Uno).
Pages of Significant Interest
- Writings - always shows latest entries, very important to review for new content!
- Developing in C on the AVR ATmega328P: Frequently Asked Questions (FAQ) Like all FAQ’s, if you have a question, check here first.
- Developing in C on the AVR ATmega328P: Frequently Found Errors (FFE) Similar to an FAQ, describes errors found while creating code, best place to check when you have an error you do not understand.
- Developing in C for the ATmega328P: Example Code Example code for all of the functions, if you have a problem with a function, review the example!
Course Material
Developing in C for the ATmega328P
Beginning tutorial using Labs_10C_Class content to help someone replace the Arduino C++ software framework with a Standard C approach.
- Developing in C for the ATmega328P: Notes
- Developing in C for the ATmega328P: Getting Started
- Developing in C for the ATmega328P: Setup Introduction
- Developing in C for the ATmega328P: Using git
- Developing in C for the ATmega328P: Edit
- Developing in C for the ATmega328P: Build
- Developing in C for the ATmega328P: Upload
- Developing in C for the ATmega328P: AVR_C Library Functions
- Developing in C for the ATmega328P: Using a Serial Monitor
- Developing in C for the ATmega328P: Functions - Serial input/output
- Developing in C for the ATmega328P: Function - analogWrite()
- Developing in C for the ATmega328P: Functions - Serial input/output
- Developing in C for the ATmega328P: Function - digitalWrite()
- Developing in C for the ATmega328P: Function - pinMode()
- Developing in C for the ATmega328P: Function - digitalRead()
- Developing in C for the ATmega328P: Struct - buttons[]
- Developing in C for the ATmega328P: Function - analogRead()
- Developing in C for the ATmega328P: Hints
- Developing in C for the ATmega328P: Mapping Values
- Developing in C for the ATmega328P: Using Data Types and Math
- Developing in C for the ATmega328P: Marking Time and Measuring Time
- Developing in C for the ATmega328P: User Functions
- Developing in C for the ATmega328P: Multi-tasking the Arduino - Part 1
- Developing in C for the ATmega328P: Function - tone()
- Developing in C for the ATmega328P: Using PROGMEM
- Developing in C for the ATmega328P: structures
- Developing in C for the ATmega328P: Code vs. Cost
- Developing in C for the ATmega328P: Pointers
- Developing in C for the ATmega328P: Servos
- Developing in C for the ATmega328P: I/O Ports
- Developing in C for the ATmega328P: Make, Makefile and env.make
- Developing in C for the ATmega328P: Better Serial Input
- Developing in C for the ATmega328P: Using the GNU Linker to Enhance printf()
AVR Datasheet Notes
Technical tutorial using specific capabilities 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.
Programming Examples
Intermediate tutorials focused on using the AVR-gcc library or examples from the library.
- AVR-gcc Note: Simple Project
- Using the Standard C Framework
- Writing Multitasking Programs
- Using Makefiles to Automate Development
Hardware Debugging
Technical tutorials on using 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.
- Hardware Debug: Using gdb to debug
- Hardware Debug: Setup Bloom and gdb to Debug
- Hardware Debug: Examples of Bloom with gdb to Debug
- Hardware Debug: Hints on Solving Issues Bloom and gdb
- Hardware Debug: Exploring the ATmega328PB Xplained Mini
- Hardware Debug: Command and Configuration Reference for Bloom and gdb
Reference Content on C
Reference books which are important for understanding C
- The C Programming Language Kernighan and Ritchie - available in PDF and paper copy
- Barr Group: Embedded C Coding Standard
- SEI CERT C Coding Standard
- Arduino Resources page
- comp.lang.c FAQ
Comments powered by Talkyard.