From: hackbard Date: Wed, 25 Oct 2006 20:40:05 +0000 (+0000) Subject: /* no comment */ X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=435321341893d026b0b2b194df52d79891c4528a;p=my-code%2Fatmel.git /* no comment */ --- diff --git a/beginners/light_control.asm b/beginners/light_control.asm index 432ca7d..2c70736 100644 --- a/beginners/light_control.asm +++ b/beginners/light_control.asm @@ -7,14 +7,17 @@ ; specify device .include "../include/2313def.inc" +; for register/bit definitions compatibility +.include "./s90_to_tiny.inc" + ; ------------------ ; interrupt vectors: ; ------------------ ; reset -rjmp RESET +rjmp INIT ; int0 -reti +rjmp INT_ROUTINE ; int1 reti ; timer 1 capture @@ -54,47 +57,89 @@ reti ; code: ; ----- -RESET: +INIT: ; set stackpointer ldi r16,low(RAMEND) ; write top of ramend (lowbyte) out SPL,r16 ; to stackpointer ; rs232 init - ldi r16,12 ; "38.4k bps @ 8 mhz" in r16 - out UBRR,r16 ; write to uart baudrate register + ldi r16,0 + out UBRRH,r16 + ldi r16,12 ; "38.4k bps @ 8 mhz" / "4.8k bps @ 1 mhz" + out UBRRL,r16 ; write to uart baudrate register ldi r16,(1<