Path: Home => AVR-Overview => new    (Diese Seite in Deutsch: Flag DE) Logo
STK with LCD Tutorial for learning assembly language for the
AVR-Single-Chip-Processors
(AT90S, ATtiny, ATmega and ATxmega) from ATMEL with practical examples.
The Single-Chip-processors of ATMEL are excellent for homebrewing every kind of processor-driven electronics. The only problem is that assembly has to be learned in order to program these devices. After having done these first steps the assembly language provides very fast, lean and effective code, by which every task can be accomodated. These pages are for beginners and help in learning the first steps.
Sitemap, all files Sitemap, HTML only avr-source

New on this page

since:Description and linkSource code
24.03.2023 Thermometers with ATtiny45 which transmit their results over infrared to a converter that connects to a laptop via an RS232 interface, with many hard- and software features (under
construction)
13.03.2023 Infrared transmitters with variable frequency, 30 to 60 kHz, with crystals, transistorized constant-high-current-LED-driver, LibreOffice spreadsheet, potentiometer and ON/OFF switch tn25 version
tn24 version
30.01.2023 A thermometer with the built-in thermo-sensor of an ATtiny24, with 8-character LCD, adjustable with trim potentiometers or by software, selectable output in K, °C or °F, accuracy up to one tenth of a degree thermometer_tn24_v1
03.01.2023 8 up to 57 tones of the gamut played with a crystal-driven ATtiny25, with a versatile spreadsheet in LibreOffice-calc to configure the tones and the resistors of the switch encoder (See text)
20.12.2022 Crystal divider in 16 stages to produce exact rectangle frequencies (normal and inverted) derived from a crystal with an ATtiny25, with selection- and assembler-programming-spreadsheet xtaldiv_tn25_v1
07.12.2022 Learning the most relevant assembler instructions first, a structured list of instructions sorted by popularity = usage in source codes on this webpage, in a 7-days- or two-weeks-schedule -
23.11.2022 Added two more examples to the fixed-dot calculation page, demonstrating measuring 0..30 V with an ADC and with an internal reference voltage of 1.1 V here and measuring +/-15 V with the ADC here. (in the text)
19.11.2022 Egg-timer with 10 LEDs, 10 melodies, a speaker and an ATtiny24, battery operation optimized eggtimer_tn24_v2
24.09.2022 Comparing high-level languages with assembler - a page advocating for using assembler in microcontrollers and showing the differences and similarities - providing arguments for converting high-level-language-freaks to learn something really new (in the text)
16.09.2022 New version 2.8 of the AVR-assembler-simulator avr_sim with lots of new features and corrections, and new version 5.4 of the command line assembler gavrasm released, which repairs several bugs in older versions Lazarus-
source code
23.08.2022 All about timers: their use, their modes of operation, their interrupts, their frequency and time control, their use as counters: just about anything to know and understand long time tn24
29.07.2022 Floating point math: Multiplication of mantissas of two 56-bit mantissas, for math freaks and for extensive use of the internal hardware multiplicator in AVR-mega float64_mult
16.07.2022 New version 2.7 of the AVR-assembler-simulator avr_sim with lots of new features and corrections, and new version 5.3 of the command line assembler gavrasm released, which repairs a minor bug in the Linux version Lazarus-
source code
03.07.2022 A power supply scanner that tests those devices with increasing currents, writes results and reads commands via a serial interface, either with an ATmega48 or an ATmega324PA with additional LCD (under construction)
24.05.2022 New on the beginner tutorial: How to create and handle a Ring-buffer, which one can add data or text to from two or more sources in the code and from which the stored data and/or text can be read from (and transmitted, e.g.) Ring-buffer
14.05.2022 New version 2.6 of the AVR-assembler-simulator avr_sim and new version 5.2 of the command line assembler gavrasm released Lazarus-
source code
18.04.2022 An ATtiny25 produces seconds, minutes and hour pulses, works with nearly any commercially available crystal, with LibreOffice_calc spreadsheet for adapting the crystal second_tn25
16.03.2022 A text ticker with 2mm-LEDs plus a boosted version plus design software -
04.02.2022 A clock with 60 plus 4 LEDs, eight 4094 shiftregisters and an ATmega48 (under construction)
12.12.2021 New version 2.5 of the AVR-assembler-simulator avr_sim and new version 5.1 of the command line assembler gavrasm released Lazarus-
source code
08.12.2021 Hysteresis on AVR input pins, use and practical measurement methods hyst INTn tn13
hyst PCINTn tn13
23.11.2021 16-bit randoms with the next version of avr_sim and a powerful analysis tool for those in Lazarus-Pascal Random 16 bit
10.11.2021 How-To article on AVR type selection -
25.10.2021 32 LEDs in a circle as programmable light circle or as a clock, utilizes an ATmega324PA Light circle
as a clock
21.09.2021 New beginner pages on adressing memory locations in SRAM, port registers, EEPROM and flash memory 32bit_flowlight
26.07.2021 gavrasm assembler in historic version 5.0 and new version 2.4 of the AVR-Assembler-Simulator avr_sim with lots of changes, additions and error corrections released (FPC and Lazarus-
source code)
23.07.2021 Another egg timer with an ATmega8, eight duo LEDs and a speaker Eggtimer m8
03.07.2021 Converting decimal number strings to 48-bit binary floats, now included here as an intelligent delay routine instead of simple loops, uses the new div10 routine to accelerate the loop execution float40_d2b
29.06.2021
18.06.2021
A clever and very fast new method to divide binaries by 10 is described here, for dividing by constants N for 8 and 16 bit binaries here, exclusively devellopped for and on this webpage div10_16rd
div10
(further sources linked)
06.05.2021Handling fractional numbers in assembler: their format and how to convert binary floats to a decimal ASCII string float_conv16
30.03.2021A long timer with an ATtiny25, a duo-LED and a speaker longtimer tn25
17.03.2021A long timer with an ATtiny13 and a duo-LED longtimer tn13
06.01.2021Version 4.9 of the command line assembler gavrasm (Free Pascal
source code)
05.01.2021 New version 2.3 of the AVR assembler simulator avr_sim with many new features, changes and corrections (Lazarus-
source
04.01.2021A new receiver concept for the German Date/Time Transmitter DCF77 with a regulated OpAmp and an ATtiny25, from the lab, in the making (under construction)
31.08.2020AVR assembler course in 11 lectures, introduction with questions and tasks at the end of each lecture -
23.07.2020Two sine generators, a simple one with an ATtiny24 and a sophisticated one with LCD and an ATmega324 sine_tn24
sine_m324
05.07.2020Version 4.8 of the command line assembler gavrasm and version 2.2 of the AVR assembler simulator fixes a serious error in register handling of gavrasm (Free Pascal
Lazarus
source code)
26.06.2020Version 4.7 of the command line assembler gavrasm and version 2.1 of the AVR assembler simulator with new features and several improvements (Free Pascal
Lazarus
source code)
08.05.2020A rectifier for DCF77-HF and 32.768 kHz IF with an ATtiny25 dcf77_am_tn25
02.04.2020Version 2.0 of the AVR assembler simulator with simulation of the watchdog timer (Free Pascal
Lazarus
source code)
27.02.2020Version 4.6 of the command line assembler gavrasm and version 1.9 of the AVR assembler simulator with new features and several improvements (Free Pascal
Lazarus
source code)
18.01.2020 Random number generation, display and analysis with an ATtiny13 in assembler, including a RS232 transmitter by software random_tn13
random_test_tn13
random_analysis_tn13_v1
27.12.2019 Eggtimer with 11 RGB LEDs and an ATmega8515, with 512 colors and a crystal clock Eggtimer
20.11.2019Version 4.5 of the command line assembler gavrasm and version 1.8 of the AVR assembler simulator with a comfortable device selector released, (Free Pascal
Lazarus
source code)
27.10.2019Version 4.4 of the command line assembler gavrasm released, corrects several minor errors and adds the new option -z for adding date information to the binary code (Free Pascal
source code)
02.09.2019 Interrupts for starters, how to get interrupts to work, how they change your program design and make your spaghetti code a little more structured -
03.08.2019 New starter course using the simulator to demonstrate the effect of instructions on the hardware of micro-controllers, also available as one PDF My first int
24.07.2019 Added a page on timing loops, their source code, their calculation and all necessary stuff to understand how those work (see article)
18.07.2019 Improved Version 1.6 of the AVR assembler simulator available with several corrections (Lazarus
source code)
11.07.2019Version 4.3 of the command line assembler gavrasm released, corrects several minor errors (Free Pascal
source code)
19.06.2019 Added a 64 bit math page in the calculation section 64 bit math
25.04.2019 ATtiny clocked with crystal, generates accurate rectangles with a desired frequency, with lots of hints for clocking ATtiny devices with crystals and with an ultimate tool for calculating dividers and selecting crystals Tiny xtal tn25
25.03.2019 Improved Version 1.5 of the AVR assembler simulator available with several corrections (Lazarus
source code)
24.03.2019Version 4.2 of the command line assembler gavrasm released, corrects several minor errors (Free Pascal
source code)
21.03.2019 BCD encoded watch with an ATmega16, 20 RGB LEDs, brightness control and two-key time adjustment RGB BCD
12.03.2019 DCF77 signal analysis, analyses DCF77 receiver modules for signal duration with an ATtiny24 and a 4-by-20 LCD module as display, with data export and import to an OpenOffice spreadsheet DCF signals
04.03.2019 Large watch with 114 LEDs, intensity regulation with potentiometer or foto transistor, time setting with two keys and the potentiometer or with a DCF77 receiver attached Large watch
28.12.2018 Improved Version 1.4 of the AVR assembler simulator available with several corrections and improved features (Lazarus
source code)
28.12.2018Version 4.1 of the command line assembler gavrasm released, removes minor errors and adds new features (Free Pascal
source code)
20.10.2018 Spotlight with 198 LEDs, intensity regulation and battery control LED with an ATtiny13 Spotlight
09.09.2018 Improved Version 1.3 of the AVR assembler simulator available with several corrections and improved features (Lazarus
source code)
25.09.2018 Added pages that provide links to source code on this website that uses internal hardware of the AVRs and software algorithms in assembler -
24.09.2018 Signal generator ATmega16 with sine, saw-tooth, triangle and rectangle from 2 Hz to 20 kHz siggen_m16_v1
wavetab
lcd.inc
28.08.2018 DCF77 synchronized alarm clock with an ATmega16 and an LCD, a home-brewed high-performance DCF77 superhet receiver and comprehensive documentation of the assembler software clock source
plus 3 include files
16.08.2018 Multitimer with an ATtiny24, downcount time from 5 to 420 seconds in 12 stages Multitimer
09.08.2018 Stopwatches with AVRs, with two examples: a four channel stopwatch with an ATmega8 and a three-staged stopwatch with an ATtiny24 Stopwatch m8
Stopwatch th24
05.08.2018 LCDs on AVRs - theory, programming, and a universal include routine for applications, with two examples lcd.inc
Example 8 bit
Example 4 bit
04.07.2018 Improved Version 1.2 of the AVR assembler simulator available with several corrections and improved features (Lazarus
source code)
29.06.2018Version 3.9 of the command line assembler gavrasm released, removes minor errors and adds new features (Free Pascal
source code)
17.06.2018Nkey Connecting multiple keys to an AD converter input pin - with resistors decode_key
12.06.2018Improved Version 1.1 of the AVR assembler simulator available with several corrections of errors in older versions and with simulation of High-Speed-PWM in ATtiny25/45/85 (Lazarus
source code)
04.04.2018 Audio sensor with an electret microphone on an ATtiny45 Follow me
26.03.2018Improved Version 1.0 of the AVR assembler simulator available with several corrections of errors in older versions (Lazarus
source code)
18.03.2018 Servomotor controller for model railroad crossing gates with an ATtiny24 Gate tn24
16.03.2018 A controller for the stepper motor 28BYJ-48 with an ATtiny24 with assembler software source Stepper tn24
27.02.2018Improved Version 0.9 of the AVR assembler simulator available with several new featuresand improved simulation of older AVR device types (Lazarus
source code)
22.02.2018 Experimental board with an ATtiny24/44/84 and an LCD, with include routines for accessing the LCD, for converting and displaying binary values and for generating and displaying special characters on LCD Include routine
Example linear
Example interrupts
14.02.2018Improved Version 0.8 of the AVR assembler simulator available with scope display of digital and analog signals and several bugs in older versions corrected (Lazarus
source code)
27.12.2017Improved Version 0.7 of the AVR assembler simulator available with AD conversion simulation and a 12/16 key resistor matrix as analog input (Lazarus
source code)
22.12.2017Double dice with two 7-segment displays and an ATtiny24, with dice counters in EEPROM and Lazarus Pascal analysis software dice2_tn24_v1.asm
plus Lazarus code
10.11.2017Improved Version 0.4 of the AVR assembler simulator available with AD conversion simulation and a 12/16 key resistor matrix as analog input (Lazarus
source code)
03.11.2017Improved Version 0.3 of the AVR assembler simulator available with EEPROM simulation (Lazarus
source code)
28.10.2017Improved Version 0.2a of the AVR assembler simulator available (Lazarus
source code)
24.10.2017Improved Version 0.2 of the AVR assembler simulator available (Lazarus
source code)
14.10.2017Version 0.1 beta of the AVR assembler simulator available (Lazarus
source code)
07.10.2017New version 3.7 of the command line assembler gavrasm. (Free Pascal
source code)
30.08.2017 How-to articles on how to assemble external source code files and how-to convert code for a different AVR type -
13.08.2017 Magic circle with 13 LEDs and an ATtiny2313 Magic circle
Constants
11.08.2017 Binary watch with 20 LEDs and an ATmega8 Binary watch
02.08.2017 192 LED text tigger with an ATmega16 Ticker
Tickertable
16.06.2017 Edited and moved the R/2R DAC converter page to a new location, added a calculation page for the R/2R network, added a RC filter page with software to simulate RC filter combinations (Lazarus
source code)
10.04.2017 An introduction to binary numbers and binary math for assembler coders, with adding, subtracting, multipying and dividing of numbers of any sizes (embedded)
04.04.2017 An overview on AVRs and their hardware, with a tool to select device types (Lazarus
source code)
28.03.2017 Audio level meter with an ATtiny24 and a 4 line LCD Level meter
02.02.2017 A tumbling double dice with an ATmega16 Dice_M16
12.01.2017 A course with 14 lectures to learn AVR controller hard- and software in assembler -
05.01.2017 New version 3.6 of the command line assembler gavrasm. -
25.11.2016 Infrared receiver and three channel switch, self-learning, with an ATtiny13 switch
22.12.2015New version 3.5 of the command line assembler gavrasm.-
05.01.2015A graphical software tool to design different keypad resistor matrices -
27.12.2014A new introduction to gavrasm with extended batch and shell script chapters using the newly introduced return code feature of gavrasm
26.12.2014New version 3.4 of the command line assembler gavrasm.-
20.12.2014Connecting a 12 or 16 keypad to an AVR using an ADC, with sotware to calulate the resistor matrix-
18.05.2012gavrasm New version 3.3 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win (and via an external link for MAC OS X), in german, englisch, french and turkish, now more efficient.-
18.05.2012gavrasm New version 3.2 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win (and via an external link for MAC OS X), in german, englisch, french and turkish for 216 AVR device types, corrects some errors and improves some features.-
29.04.2012 Adjustable LED chain sequencer with an ATtiny13 ledlight_tn13_v1
Controlling the intensity of two LED lines with potentiometers utilizing an ATtiny13 ledline_tn13_v1
Tumbling dice with an ATtiny13 dice_tn13_v1
05.03.2011Digital clock and alarm timer with an ATmega16 digiclock
05.02.2011All about IR remote control, measuring signals, analysing data results, transmitting and receiving ir_remote
tn45_tx
ircsb
10.01.20118-by-8 LED matrix display with an ATmega16 LED grave
09.01.2011gavrasm New version 2.8 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win (and via an external link for MAC OS X), in german, englisch and french for 178 AVR device types), corrects errors for some ATtiny types -
31.10.2010gavrasm New version 2.7 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win (and via an external link for MAC OS X), in german, englisch and french for 178 AVR device types), corrects an error in the symbol table output in version 2.6-
25.02.2010gavrasm New version 2.5 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win, in german, englisch and french for 159 AVR device types), corrects a serios error in version 2.4-
16.01.2010New version 2.4 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win, in german, englisch and french for 159 AVR device types)
03.10.2009UV-LED array with an ATtiny2313 as exposure timer Timer
25.05.2009New version 2.3 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win, in german, englisch and french for 115 AVR device types), corrects two serious errors -
14.04.2009 Reworked the page on structuring source code, windows program for generating source code frame files with a standard design and all necessary sections header_tn13.asm
avr_head.zip
23.03.2009 Portuguese version of the beginner course in one pdf document-
10.01.2009Frequency counter with ATmega8, nine modes, LCD, 16 MHz xtal fcountV03
28.12.2008 Updated version of the beginner course in one pdf document-
23.12.2008New version 2.2 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win, in german, englisch and french for 115 AVR device types) -
28.09.2008Added 16-by-24-bit hardware multiplication-
20.01.2008Hardware multiplication with ATmega-
28.06.2007Steppermotor controller/driver with an ATtiny13 stepper.asm
02.12.2006New version 2.1 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win)-
05.11.2006An eggtimer with a ATtiny2313 as a gift eggtimer.asm
29.09.2006New version 2.0 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win)-
13.08.2006New version 1.9 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win)-
16.07.2006New version 1.8 of the command line assembler gavrasm (free Assembler for Linux, Dos and Win)
Persian version of the beginner's course on the new Download page
-
25.05.2006An adjustable digital signal generator with LCD Zipped
sources
04.05.2006New version 1.7 of gavrasm (free AVR assembler for download). Corrects a bug in the ELIF directive.-
17.04.2006Added a sitemap of the whole site-
17.04.2006Page on connecting a 4*3 keypad to an AVR-
28.12.2005New version 1.6 of gavrasm (free AVR assembler for download). Adds support for new CAN-, Tiny- and one new Mega-Type.-
27.09.2005New version 1.5 of gavrasm (free AVR assembler for download). Corrected two minor bugs. -
28.03.2005Accu cell loader hardware and assembler software applying an ATmega16 akkuload.asm
zipped
28.03.2005Added a description of advanced directives like conditional assembly and on left shift of port bits in the beginner course.-
27.03.2005New version 1.3 of gavrasm (free AVR assembler for download). Corrected false EEPROM capacity of two ATmega and added support for the new types ATmega 640, 1280, 1281, 2560 and 2561.-
08.03.2005New version 1.2 of gavrasm (free AVR assembler for download). Corrected some minor bugs and added support for the new types ATtiny25, 45 and 85.-
06.01.2005New version 1.1 of gavrasm (free AVR assembler for download). Corrected some minor bugs in the MACRO treatment, finally added support for the historic program counter PC. -
03.01.2005Applying an R/2R resistor network for Digital-to-Analog conversion and generating waveforms sawtooth1
sawtooth2
triangle
sinewave and
wavetable music
09.10.2004New version 1.0 of gavrasm (free AVR assembler for download. Added support for ATmega325 etc., an extra error file and others.
New version of the window caller, assimilated to gavrasm 1.0
-
28.03.2003gavrasm (Free AVR assembler) in improved version 0.9 for download. Added support for ATmega48/88/168 now.-
15.02.2004gavrasm (Free AVR assembler) in improved version 0.8 for download. Corrects some minor errors. Also, a new version of the convenient window caller for the command line assembler for free download. -
30.12.2003Beginner course as complete PDF file for download available-
20.10.2003gavrasm (Free AVR assembler) in improved version 0.7 for download. Corrects an error with AT90S1200, adds the new AVR type ATtiny2313, provides IFDEVICE directive for type-specific code.-
09.09.2003New version of the convenient window caller for the command line assembler, improved editor for include files, viewing the list file, error finder, etc. for free download here. -
03.09.2003gavrasm (Free AVR assembler) in improved version 0.6 for download. Corrects an error with negative numbers, adds several AVR types, provides nested IF/ELSE/ENDIF.-
26.08.2003Convenient window caller for the command line assembler, simple editor for the source file, viewing the list file, etc. for free download here. -
16.08.2003gavrasm (Free AVR assembler) in improved version 0.5 for download. Corrects an error in the instruction set of AT90S1200 in previous versions.-
21.07.2003gavrasm (Free AVR assembler) in improved version 0.4 for download. For convenient calling the assembler I have a window caller for free download.-
14.06.2003gavrasm (Free AVR assembler) in improved version 0.3 for download.-
31.05.2003gavrasm (Free AVR assembler) in improved version 0.2 for download-
17.05.2003Analog-to-Digital-Conversion using the analog comparator and timer/counter 1 of the AT90S8515 on board a STK500 ADC8.asm
09.05.2003Fixed decimal point numbers 8-Bit ADC
10-Bit ADC
24.12.2002Free AVR assembler for download -
14.09.2002 Introduction to Studio Version 4 -
23.08.2002 Hardware programming equipment for the beginner -
11.08.2002Creating tables in the program flash memory-
13.04.2002Connecting a 2-line-LCD to a STK500 port, with a date/time software clockLcd4IncE.asm
Lcd4IncCE.asm
02.02.2002All instructions and many terms in the assembler source files (HTML format) of the example pages are now linked to the description in the beginner course, so you can easily have more explanation on them.-
02.02.2002Added a page on assembler directives and expressions-
06.01.2002Added number format conversion tutorial and routines and restructured the calculation pages, removed several minor HTML syntax errors.CONVERT.asm
03.01.2002Renewed all assembler source files: commands in lower case letters to be more compatible with the editor from ATMEL (which still is not as advanced - compared to Tan's -, let me know if you need the Linux FPK or Win-Delphi Pascal sources for the self-written software if you have a similiar job to do), added a new index page to all source files source
file
index
16.12.2001Binary math
(multiplication and division)
MULT8E.asm
DIV8E.asm
01.12.2001Moved these pages from http://www.dg4fac.de to this new location at http://www.avr-asm-tutorial.net due to elevated traffic.-
10.07.2001Structure of asm source code8515STD.asm
24.09.2001Intro to the studio version 3.52-
12.08.2001Beginner's introduction to AVR assembler language-
14.01.2001DCF synchronised clock with serial interface in a 2313CLOCK.asm
Echoes serial characters back as hex, for the STK200 board SIOHEX.asm
23.12.2000Small application page -
PCM to Analogue Decoder for remote control systems PCM2PWG4.asm
Terminal controlled pulse generator PWGSIO2.asm
09.12.2000Examples for the use of macros in assembler language!TESTMAC1.asm
TESTMAC2.asm
TESTMAC3.asm


Top of page Sitemap Error list avr-source


©2002-2022 by http://www.avr-asm-tutorial.net
You may use, copy and distribute these pages as long as you keep the copyright information with it.