Path:
Home =>
AVR-Overview => Course
An assembler course in 11 presentations
Here is an assembler course for starters. It presents both, the hardware of
AVRs and its programming in assembler.
All lectures come as 9-to-22 page long PDF. The lectures include two or
three tasks and questions at the end, by which you can test if you
understood anything correct.
If you have any questions, likes or dislikes feel free to email me at
info( at )avr-asm-tutorial.net.
Links and materials for the assembler course
Lectures
All lectures in one document: here,
207 pages, 2.8 MB.
- Lecture 1: Lecture 1:
Program execution, registers, writing assembler source code with avr_sim
and assembling and simulating it
- Lecture 2: Lecture 2:
Port pins, port registers, port as output and as input, timing of
instructions, scope view in avr_sim, sourcing and sinking current
on outputs, input pin branching
- Lecture 3: Lecture 3:
Types and functions of registers, counting registers up and down,
conditional branching, breakpoints, timing of loops, nested loops,
directives
- Lecture 4: Lecture 4:
Second blinking, 24-bit loops, execution timing, macros, subroutines,
stack, memory addressing, stack use
- Lecture 5: Lecture 5:
In-System-Programming binary code, ISP interface, breadboard application,
Studio 4.19 programmer tool, clocking with a crystal, fuses
- Lecture 6: Lecture 6:
Timers/Counters, prescaler and clocking from input pins, overflow,
comparers, pin toggle with timer, 16-bit timer and tone generation,
CTC mode of timers
- Lecture 7: Lecture 7:
Interrupts, timer interrupts on overflow and compare, interrupts and
stack, interrupt vectors, interrupt service routine, interrupt
priority, interrupt and SREG, timers in PWM mode, digital-to-analog
conversion with PWM
- Lecture 8: Lecture 8:
Analog-to-digital conversion, multiplexing, left-adjust, ADC interrupt,
EEPROM segment, EEPROM reading, EEPROM writing, EEPROM interrupt
- Lecture 9: Lecture 9:
External interrupts, external PCINTs, pin identification, key bouncing,
analog comparers, serial communication
- Lecture 10: Lecture 10:
Integer math, positive and negative integers,
adding/subtracting/multiplying/dividing 8 and 16 bits, software and
hardware multiplication, binary to hex ASCII, binary to decimal ASCII
- Lecture 11: Lecture 11:
Table organization in assembler, reading table content, auto-incrementing
pointers, displaced table content, decimal conversion with tables,
register pairs as pointers
Questions and tasks
The questions and tasks appear at the end of each lecture. Here are the
respective pages naked as PDF.
- Q&T 1: Q&T 1
- Q&T 2: Q&T 2
- Q&T 3: Q&T 3
- Q&T 4: Q&T 4
- Q&T 5: Q&T 5
- Q&T 6: Q&T 6
- Q&T 7: Q&T 7
- Q&T 8: Q&T 8
- Q&T 9: Q&T 9
- Q&T 10: Q&T 10
- Q&T 11: Q&T 11
Materials and Tools
The following links provide materials and tools and some hints on finding
those on the internet.
- ATMEL Studio 4.19: ATMEL packed (encryption
password = 4.19) (ATMEL/Microchip do not provide this any more, so here it is!)
- ATMEL driver bundle: ATMEL packed
(encryption password = drive)
- The internal hardware of AVRs: Use avr sim,
start a new project and click on Device Selector, click types and package types as
desired or needed.
- Finding databooks:
- Use Microchip's website's Search feature at Microchip,
which is a bit chaotic.
- Use the tool provided here
to get direct access links to databooks.
Links
This provides direct links to selected items.
Tutorials
An incomplete list of links to tutorials for AVR assembler programming.
©2020 by http://www.avr-asm-tutorial.net