Oder eine ISR-Lösung:

Code:
volatile uint8_t usart_puffer[25], usart_write=0, usart_read=0, eingabe=0;

#define BAUD_LOW		38400  //Low speed - 38.4 kBaud
#define UBRR_BAUD_LOW	((F_CPU/(16*BAUD_LOW))-1)

UBRRH = UBRR_BAUD_LOW >> 8;	// Baudrate is Low Speed
UBRRL = (uint8_t) UBRR_BAUD_LOW;
UCSRA = 0x00;
UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0);
UCSRB = (1 << TXEN) | (1 << RXEN) | (1 << RXCIE); // Senden, Empfangen und Empfang-ISR einschalten

while(1)
{
   if(eingabe)
   {
		// empfangene Zeichen stehen jetzt in usart_puffer[]
		// ...verarbeiten...

		usart_read=0;
		usart_write=0;
		eingabe=0;
   }
   // Ab hier Hauptprogramm:
}


SIGNAL (SIG_UART_RECV)
{
    usart_puffer[usart_write]=UDR;
    if(usart_puffer[usart_write++] == 13) eingabe=1; // CR empfangen
	 if(usart_write > 24) {usart_write=24; eingabe=2;} // Pufferüberlauf!
}