I am using an Atmega16 board http://roboshop.nextsapiens.com/index.php?route=product/product&product_id=55 for serial communication.The board has Max232 for voltage level correction. I have correctly connected the Rx and Tx ports of the DB-9 connector with those of Max232. The baud rate settings on both the micro controller and terminal is 9600 operating at 2 Mhz. I am getting the following erroneous situation as depicted in the following image:http://i.stack.imgur.com/dmnJo.png

It appears that you are using some variant of Basic to send chars to the serial port.Your program has no flow control of any kind, so you will be overrunning the chips usart send bufferwhich will produce the garbage results.You need to test the usart before sending a char to make sure that its send buffer is empty.Read the chips spec sheet to learn how to do this.