Path: Home ==> AVR-EN => Micro beginner     Diese Seite in Deutsch (extern): Flag DE Logo
ATtiny13

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.

Note

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

Hardware

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 by itself.

This version includes simulation examples of the assembler source code and how those change internal hardware of the controller. Those pictures demonstrate key software components and how they translate internally.

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.

Lectures

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 (see alternative mounting) 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 (see alternative mounting) 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 (see alternative mounting) 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 (see alternative mounting) 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 (see alternative mounting) 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, instructions and expressions

All assembler directives are here, all assembler instructions are listed here. To calculate, assembler allows to use math expressions, see the Assembler expressions page on this.

Binary and hex introduction

In Bin&Hex intro a brief introduction to binary and hexadecimal numbers is available.

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, 319 pages, 17.1 MB,
  2. anything but no assembler source listings, 202 pages, 13.3 MB.
Note that both documents were updated on December 25, 2017, and layouted and corrected March 2, 2018.

Access statistic

Accesses This website has been online since January 2017. The diagram shows the accesses of users to this website, its lectures and its assembler source code files provided.

The source code downloads Here are the downloads of source code files in the past years.

The most popular source codes This is the popularity of the source code files over the long term. All source codes have nearly the same popularity (by a factor of less than two).

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