projects
/
my-code
/
atmel.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
some hdw-tank stuff at gergos place ...
[my-code/atmel.git]
/
hdw-tank
/
uart.asm
1
; uart functions
2
3
UART_INIT:
4
5
; baudrate
6
ldi tmp,
7
out UBRRH,tmp
8
ldi tmp,
9
out UBRRL,tmp
10
11
; enable
12
ldi tmp,(1<<RXEN)|(1<<TXEN)
13
out UCSRB,tmp
14
15
; frame format
16
17
ret
18
19
UART_RX:
20
21
; get/store received byte
22
sbis UCSRA,RXC
23
rjmp UART_RX
24
in tmp,UDR0
25
26
ret
27
28
UART_TX:
29
30
; transmit content of tmp
31
sbis UCSRA,UDRE
32
rjmp UART_TX
33
out UDR0,tmp
34
35
ret
36