Programming in C – from nothing to software#

Author#

This tutorial was written by Dr Ben Clifford for EG-151 Microcintrollers in 2022.

Introduction#

This part provides a detailed worked example of writing code in C language to run on the Atmel ATmega328 microcontroller, including why each line of code is written and where any additional information comes from and how it can be found.

These pages start with a description of some desired functionality written in the form of a task to be completed.

The pages go through the thought process a programmer should follow to plan and ultimately write the software to achieve this task. The first version is focussed on using the Arduino IDE with the predefined functions such as pinMode() and digitalWrite() before looking at writing the same program in pure C.

Contents#