; **********************************************************
; * Mehr Action: LED-Blinker mit Verzoegerung              *
; * (C)2005 by info@avr-asm-tutorial.net                   *
; **********************************************************
;
.INCLUDE "tn12def.inc"
;
; Schaltbild:
;                   ATMEL ATtiny13
;                     ___   ____
;            ___    1/   |_|    |8
;+5 Volt O--|___|----|Res    Vcc|----O + 5 Volt
;                    |          |
;                    |PB3    PB2|
;                    |          |6  ___
;                    |PB4    PB1|--|___|--|<|--O + 5 Volt
;                   4|          |   330   LED
;        0 Volt O----|Gnd    PB0|
;                    |__________|
;
; Benutzte Register
;
; ZH:ZL (R31:R30) ist Zaehlregister fuer Verzoegerung
;
; Programm
;
	sbi DDRB,0 ; PB1 ist Ausgang
loop:
	sbi PORTB,0 ; Ausgang auf Eins (LED ist aus)
loop1:
	sbiw ZL,1 ; Ziehe von ZH:ZL eine 1 ab 
	brne loop1 ; wenn noch nicht Null, wiederhole
	cbi PORTB,0 ; Ausgang auf Null (LED ist an)
loop2:
	sbiw ZL,1 ; Ziehe von ZH:ZL eine 1 ab
	brne loop2 ; wenn noch nicht Null, wiederhole
	rjmp loop ; und das Ganze von vorne
;
; End of source code
;