From: hackbard Date: Mon, 8 Dec 2003 17:20:23 +0000 (+0000) Subject: wunderschoen kommentierte version ;) X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=3350913ef383746d74f2917600dd2a0ec8f5f312;p=my-code%2Fatmel.git wunderschoen kommentierte version ;) --- diff --git a/beginners/test_int.asm b/beginners/test_int.asm index 6329fcf..ba2317d 100644 --- a/beginners/test_int.asm +++ b/beginners/test_int.asm @@ -1,7 +1,7 @@ ; -; portd 3-7 blinken lights ;) +; portd 3-7 lauflicht mit UART-RX masked byte anzeige ; -; author: hackbard@hackdaworld.dyndns.org +; by Hunz ;) ; .include "../include/2313def.inc" @@ -40,42 +40,59 @@ reti reti T1_OVF1: +; toggle LED out DDRD, r17 +; next LED rol r17 +; skip next operation if beyond last LED sbrs r17, 7 -reti +reti ; we return if not beyond last LED +; reset LED counter to first LED ldi r17, 4 reti UART_RX: +; read received byte to r16 in r16, UDR +; mask with valid LED bits andi r16, $7C +; echo masked byte out UDR, r16 +; set LEDs according to masked byte out DDRD, r16 reti INIT: +; Stackpointer setzen ldi r16, Low(RAMEND) out SPL, r16 ; baudrate einstellen ldi r16, 11 ; "38400 bps wert" in r16 out UBRR, r16 ; write to uart baudrate register + +; enable TX, RX, Interrupt on RX ldi r16, ((1<