Introduction
Authors: Cristina Ionescu, Cristian Săbiuţă, Microchip Technology Inc. |
This technical brief provides the recommended steps to successfully program the AVR® microcontrollers (MCUs) and to define coding guidelines to help writing more readable and reusable code.
High-level programming languages have become a necessity due to the imposed short development time and high-quality requirements. They make it easier to maintain and reuse code due to better portability and readability than the low-level instructions specific for each microcontroller architecture.
Programming language alone does not ensure high readability and reusability, but good coding style does. Therefore, the AVR MCU peripherals, header files and drivers are designed according to this presumption.
The most widely used high-level language for AVR microcontrollers is C, so this document will focus on C programming. To ensure compatibility with most AVR C compilers, the code examples in this document are written using ANSI C coding standard.
This document contains code examples developed with the Atmel Studio Integrated Development Environment (IDE). Most code examples are compatible with other IDEs, presented in Section 5: Further Steps.