Large errors in ATMEGA8 ADC readings
I have set the reference of the SAR ADC as the default internal 2.56 V. As I understand it, the 8 bit ADC is supposed to give me 0 (Ox00) at 0 V and 255 (OxFF) at 5 V.


No that is not the case. a result of 0 represents \$ V_{in}= \frac {ADC \times 2.56V}{256} =0\$ and a result of 255 represents \$ V_{in}= \frac {ADC \times 2.56V}{256} =2.55V\$

Of course in this case to get the voltage representation you can simply divide the ADC result by 100 (255 becomes 2.55 V), or you can multiply by 10 to get the result in mV (255 becomes 2550 mV).

In the code you have provided you have commented the line that sets the ADC clock prescaler which means that the ADC clock is set to 1MHz and may reduce the accuracy.

//|(1&lt;&lt;ADPS2) |(1&lt;&lt;ADPS1) |(1&lt;&lt;ADPS0); 


Also note that the selected prescaler in case you use the above line is 128 which will result to 1MHz/128= 7.8KHz which is too low. You should try to be in the range of 50KHz-200KHz. You can use a value of 8 which results to 125KHz.  

(0&lt;&lt;ADPS2) | (1&lt;&lt;ADPS1) | (1&lt;&lt;ADPS0)


Also when using the internal reference voltage you should add an capacitor to AREF pin.



According to the datasheet the error for a baudrate of 9600  when the AVR runs at 1MHz is too high, so the transfered data may be corrupt. Try to use 4800.