Main Content

Explore AVR assembly language

Let’s learn about the AVR microcontroller and the assembly language. We create an assembly program to blink the LED on an Arduino Uno board.

Assember programming is hardware level, we use a simple set of commands to perform mathematics and move bits around. At this level we turn circuits on and off with our commands.

Avrasm2 is the program from Atmel (now MicroChip) for their AVR products. You install it on Windows computers when you setup MicroChip Studio IDE or an older Atmel Studio Suite. The manual for AVRASM2 is online.

In this project I will be using the Avra assembler on Linux. We will use a text editor for our source file and the terminal window CLI. Do not use MSWord, WordPad or OpenOffice because these will add unseen formatting characters to the text.

Let’s Code
We are going to use this program, below. About once a second the sixth pin on PORTB of the microcontroller chip will toggle the Arduino Uno board LED on and off.”

Link to article