Serial communication in Atmega128
According to my reading of your code and the datasheet there are two problems:

Two stop bits

The code here is probably not what you want:

UCSR1C |= (1&lt;&lt;USBS1) | (1 &lt;&lt; UCSZ10) | (1 &lt;&lt; UCSZ11);


This sets 2 stop bits (USBS1 value == 1).  You probably want one stop bit.  I would use a construct like this:

UCSR1C = (0&lt;&lt;USBS1) | (0 &lt;&lt; UCSZ12) | (1 &lt;&lt; UCSZ11) | (1 &lt;&lt; UCSZ10);


just to make it very clear what you are doing.

Baud rate

According to my calculations, your BAUD_PRESCALE is 16000000/9600*16-1 = 26666. According to the datasheet, for 9600 with U2X1 set, the UBRR registers (L and H) need to be set to 207. So to my mind you are not setting the baud rate correctly.

A note on interrupts

In response to David Norman's comment about the interrupts (I think what is meant there is that interrupts would be easier), I beg to differ.


For me, anyway, polling is easier to implement
For many AVR tasks, (such as SPI sends), it has been found that polling is faster than interrupt-driven comms: probably due to the relative high-overhead of jumps (have to touch the stack), enabling/disabling the interrupt bits, etc.


As  David Norman points out, if battery life is a concern, then interrupt-driven comms may be a better solution.