.EQU	K19200=25	;xtal=8MHz ;BaudRate=19200

Init_Uart:			
	Ldi	R16,K19200	; set baud rate
	Out	UBRR,R16	
	Ldi	R16,$18	;RXEN=1, TXEN=1
	Out	UCR,R16	
	Ret		

Init_Uart1:			
	Ldi	R16,K19200	; set baud rate
	Out	UBRR,R16	
	Ldi	R16,$98		;RXEN=1, TXEN=1
	Out	UCR,R16		;RXCIE=1
	Ret		

Uart_ISR:			
	Push	R16		;save CPU status
	In	R16,SREG	
	Push	R16	
	In	R16,UDR		;get character
	Sts	RECBUF,R16	;save it
	Ldi	R16,$FF	
	Sts	QUART,R16	;true QUART
	Pop	R16		;restore status
	Out	SREG,R16	
	Pop	R16	
	Reti			;return to main
