From 238f9858dcb3b72ccf1b570333f8c82ca18c8811 Mon Sep 17 00:00:00 2001 From: hackbard Date: Thu, 4 Dec 2003 23:24:24 +0000 Subject: [PATCH 1/1] added beginners directory, test_uart.asm --- beginners/test_uart.asm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 beginners/test_uart.asm 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 + -- 2.39.2