Hier in Ruhe. Die Leds sind so schnell, dass man nicht sieht wie sie leuchten.
Bild hier
Code:;********************************************************** .include "2313def.inc" ; Definitionen für AT90S2323 .org 0x000 ; kommt ganz an den Anfang des Speichers rjmp RESET ; Reset Handle ;********************************************************** RESET: .def temp = r16 ; temp als Universalregister definieren ldi temp,low(RAMEND) ; Stackpointer initialisieren out SPL,temp ser temp ; temp = FF out DDRB,temp ; Datenrichtungsregister für Port B auf Ausgang schalten Text: ldi temp, $C0 out PORTB,temp rcall wait ldi temp, $FF out PORTB,temp rcall wait ldi temp, $C0 out PORTB,temp rcall wait ldi temp, $FF out PORTB,temp rcall wait ldi temp, $03 out PORTB,temp rcall wait ldi temp, $FF out PORTB,temp rcall wait ldi temp, $C0 out PORTB,temp rcall wait ldi temp, $FF out PORTB,temp rcall wait ldi temp, $C0 out PORTB,temp rcall wait ldi temp, $FF out PORTB,temp rcall wait ldi temp, $00 out PORTB,temp rcall wait rcall wait rjmp Text wait: ; ============================= ; Warteschleifen-Generator ; 80000 Zyklen: ; ----------------------------- ; warte 79998 Zyklen: ldi R17, $86 WGLOOP0: ldi R18, $C6 WGLOOP1: dec R18 brne WGLOOP1 dec R17 brne WGLOOP0 ; ----------------------------- ; warte 2 Zyklen: nop nop ; ============================= ret







Zitieren

Lesezeichen