Home ==> Microprocessor course

Course for learning microcontroller techniques

This website provides 14 lectures to understand the hard- and software of AVR microcontrollers. By experiments on a breadboard relevant electronic, controlling and programming technologies are learned and practically tested. The necessary homebrewed software demonstrates how the hardware can be adjusted to own purposes and needs.


This website uses intensively selected copies from device databooks. The copyright for those copies is with ATMEL.


Programming is not learned as a theoretical stock but always in close interaction with the hardware of the controller. The experiments are carefully selected and designed to cover all relevant hardware internals. Those who prefer systematic learning can switch to the website with this address. Theoretical knowledge on the assembler language without any hardware application can be learned there.

The concept to learn hard- and software in parallel requires programming in assembler. Those who really understand how the controller works, what goes and what does not work should use assembler intensively. It is the only language that the controller understands and speaks himself.

Required for the experiments are a few electronic components that can be bought from electronics stores. Those are, by lecture, listed in this table. The given price information is, of course, subject to change.


LectLinkHardware skillsSoftware skills
1 Programmer-Interface To interface an ATtiny13 to an ISP programmer, to access the fuses -
2 To switch on a LED To manipulate port pins, to enable port drivers, to drive a LED with current, to switch a LED on and off Assembling source code, listings and hex files, program execution, infinite loop
3 To blink a LED To switch a led on and off Nested loops, counting loops, execution time of instructions, zero flag, exact timing loops
4 To blink a LED with the timer Timer internals, prescaler, compare match ports, port pin clear/set/toggling To configure the timer, start and stop of the timer, timer modes normal and CTC, sleep mode
5 To regulate a LED's intensity with the timer To configure the timer as fast and phase correct pulse width generator Mathmatical expressions in assembler
6 To blink/regulate a LED with a timer interrupt Interrupt mechanism and processing, reset- and interrupt-vector table, stack storage Interrupt programming, timer interrupt, interrupt service routines
7 To start a red/green blink sequence with a key External interrupts, pull-up resistors, INT0 interrupt sequence Flow diagrams for sequence planning, handle INT0 and CTC interrupts
8 To measure voltages on an input pin and regulate intensity, changes of intensities and colors of a LED AD converter, ADC ready interrupts, external pin interrupts PCINT Flow diagrams, key debouncing, OC0A and OC0B programming
9 To generate tones, a gamut tone generator and playing a melody OC0A output pin toggle, CTC frequency generation Tables, gamut table, multiplication 8 by 8 bit
10 Driving a LCD with an ATtiny24 ATtiny24 hardware, port as a bus driver with write and read, controlling and configuring an LCD Exact delay loops, init procedure for LCDs
11 Reading and writing EEPROM content and displaying 8 and 16 bit numbers in decimal on LCD EEPROM, read and write access Conversion of 8 and 16 bit binaries to decimal ASCII
12 Receiving, analyzing and transmitting infrared signals for remote control systems Controlling an IR receiver module Display binaries in hex format, signal time measuring, use of .if, .else and .endif directives to assemble specific versions of a software
13 Measuring and displaying of the frequency on a digital and an analog input and measuring the inductivities of coils Counting PCINT signals on inputs, using the analog comparator 24/32/40 bit decimal conversion, 24 bit multiplication, 40-by-40 bit division
14 Measuring and displaying voltages, currents and the temperature ADC measuring modes such as amplified differential voltages and the on-chip temperature sensor Extensive multiplication and pseudo-floating point math
- Drawing conclusions from the lectures - -

Source code files

Here all links to assembler source files are available.

Assembler directives and instructions

All assembler directives are here, all assembler instructions are listed here.

Downloads of PDF versions of the website

Here you can download the whole course in one single PDF document. Two versions are available:
  1. anything including the assembler source code listings, 281 pages, 13 MB,
  2. anything but no assembler source listings, 160 pages, 9.8 MB.

©2017 by http://www.avr-asm-tutorial.net