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:
-
AVR Toolchain
The AVR toolchain is what takes our source code and transforms it into something that we can load onto our AVR. For instructions on installing the AVR toolchain, see the AVR Toolchain Installation tutorial. -
Arduino Uno
Even though we won’t be using the Arduino IDE, the Arduino Uno is the perfect hardware platform to start developing for the AVR. If you are using Windows, you may need to install drivers for the USB-to-Serial interface. Follow the Getting Started with Arduino on Windows instructions for installing the drivers.