From: hackbard Date: Thu, 4 Dec 2003 23:24:24 +0000 (+0000) Subject: added beginners directory, test_uart.asm X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=238f9858dcb3b72ccf1b570333f8c82ca18c8811;p=my-code%2Fatmel.git added beginners directory, test_uart.asm --- 238f9858dcb3b72ccf1b570333f8c82ca18c8811 diff --git a/beginners/test_uart.asm b/beginners/test_uart.asm new file mode 100644 index 0000000..c785c36 --- /dev/null +++ b/beginners/test_uart.asm @@ -0,0 +1,17 @@ +; specify device +.DEVICE AT90S2313 + +; baudrate einstellen +ldi r16, 11 ; "38400 bps wert" in r16 +out UBRR, r16 ; write to uart baudrate register +sbi UCR, TXEN ; enable tx at uart control register + +; transmit 0x23 all the fucking time ... +ldi r16, 0x23 ; load 0x23 to register +out UDR, r16 ; write that to uart data register port +LOOP: +sbis USR, UDRE +rjmp LOOP +out UDR, r16 +rjmp LOOP +