AVR Embedded C Tutorial

For novices: yet another Embedded C Programming Tutorial based on 8-bit AVR micro-controllers, using Microchip/Atmel Studio (not Arduino IDE).
Here is a self-study tutorial intended as a first course in embedded micro-controller programming using a sub-set of the C language called “C-less” (C language essentials). “C-less” was conceived to provide enough of C to develop “real-world” applications, while avoiding unnecessary complex constructs which novices might find overwhelming.
The software development environment (PC application) used in this tutorial is Microchip/Atmel Studio IDE. This is a free download from Microchip's website. Don't be intimidated by Atmel Studio. Although it is a far more professional IDE than Arduino, it is not much more difficult to learn.
Coding examples and exercises are targeted towards Atmel 8-bit AVR micro-controller devices, specifically the ATmega328P, as fitted on the author’s “AVR-BED / Nano" and Microchip "AVR X-mini" boards. Arduino Uno and Nano boards are also supported. Appendix A of the tutorial describes various options for a suitable hardware platform.
Many of the program examples in this tutorial use a pre-built function library to facilitate access to peripheral devices such as displays, timers, push-buttons, analogue inputs, UARTs, etc. This approach avoids the need for a detailed understanding of peripheral driver code in the early stages of learning when the focus is on C language syntax.
Prerequisite Knowledge & Skills:
The course assumes a rudimentary knowledge of Boolean logic and binary arithmetic. Practical skills in digital electronic circuits and systems incorporating micro-controllers, peripheral devices, etc, will be beneficial to learning embedded programming.
The software development environment (PC application) used in this tutorial is Microchip/Atmel Studio IDE. This is a free download from Microchip's website. Don't be intimidated by Atmel Studio. Although it is a far more professional IDE than Arduino, it is not much more difficult to learn.
Coding examples and exercises are targeted towards Atmel 8-bit AVR micro-controller devices, specifically the ATmega328P, as fitted on the author’s “AVR-BED / Nano" and Microchip "AVR X-mini" boards. Arduino Uno and Nano boards are also supported. Appendix A of the tutorial describes various options for a suitable hardware platform.
Many of the program examples in this tutorial use a pre-built function library to facilitate access to peripheral devices such as displays, timers, push-buttons, analogue inputs, UARTs, etc. This approach avoids the need for a detailed understanding of peripheral driver code in the early stages of learning when the focus is on C language syntax.
Prerequisite Knowledge & Skills:
The course assumes a rudimentary knowledge of Boolean logic and binary arithmetic. Practical skills in digital electronic circuits and systems incorporating micro-controllers, peripheral devices, etc, will be beneficial to learning embedded programming.
Updates vom Autor
M J Bauer vor 2 Jahren
Their course is targeted toward beginners "without much experience in electronics and programming languages". The attraction of Arduino is that it hides the complexity of microcontroller on-chip peripherals and the program code necessary to drive them. While this is wonderful at the beginner level, there is no "upgrade path" to a more in-depth understanding.
My AVR tutorial is also aimed at beginners, initially using a code library to simplify the handling of peripherals. However, the tutorial gradually introduces more of the inner workings of the ATmega328 MCU peripherals and the library functions which drive them. After working through the tutorial, a student should have a solid foundation on which to advance to a higher level.
So why not "man up" and give Arduino the flick? Learn to use a professional IDE (Microchip Studio IDE for AVR and SAM Devices) and understand how to drive MCU peripherals (timers, etc) from reading the datasheet!
Note 1: Training platforms used in the tutorial can be assembled for much lower expense than the Elektor-Arduino training board. You will also have the satisfaction of building it yourself. (The option based on Microchip's AVR "X-mini" board involves a minimal amount of soldering.)
Note 2: Training platforms based on the Arduino Nano or Microchip AVR "X-mini" board do not require any additional programming tool to install program code into the MCU. (See PDF doc in 'Project Elements / Other".)