Bare Metal Micro

AVR Digital I/O

2. Prerequisites

While it is possible to read through this tutorial without running any of the examples, I would recommend that you try them out and modify them to get a solid understanding of the concepts introduced. This tutorial will be discussing the digital I/O pins specifically in relation to the ATmega328P, however, the concepts apply to most ATmega AVRs. All the information provided by this tutorial and many more details can be found in the ATmega328P datasheet. I suggest you become very familiar with this document. This tutorial focuses on chapters 13 and 14 of the datasheet.

In order to run the examples provided, you will need the following: