init_uart:
	
	ldi	tmp1,f_baud
	out	ubrr,r16	 ;la un quartz 8mhz baud=9600
	ldi	tmp1,(1<<TXEN)|(1<<RXEN) ; initialize UART for TX and RX
	out	UCR,tmp1
	sbi	ddrd,2	; mode out
	sbi	portd,2	; state 1 - 75176 receive enabled
	ret

get_uart:
	clc
	sbis	usr,rxc		; test if character has been received
	ret
	in	tmp1,udr	; Read byte from the UART
	sec
	ret
put_uart:
	clc
	sbis	usr,udre	;test for TX register empty
	ret	
	out	udr,tmp1	;send the byte
	sec
	ret

