Arduino communication with AtMega 32 problem

I made 2 separate codes for my Arduino mega 2560 & my atmega 32 for serial communication. I connected TX1 of arduino with RX of Atmega 32(& also shorted their grounds).The code was for simple led blining with atmega connected to B0 & B1. But it’s not working. I’m using Arduino only for a few days & I want to communicate with Atmega using Arduino.please someone help me. I’m attaching the Arduino code & the Atmega code…

serial_test.ino (146 Bytes)

UART receive test.c (663 Bytes)

Do you know that the ATmega32 is working? Is it really running at 1MHz?

BTW: At 9600 baud you get an bit rate error of over 10% (at 1MHz). Have you tried with 4800 baud, there the bit rate error is below 1%.

Thanks for the advice@pylon. The Atmega is okay & it’s running at 1MHz (i adjusted the low fuse bits & in code F_CPU is also the same).But 4800 baud rate is not working either. :~
Further advices, sample code & web link (tutorial) is expected.

The Atmega is okay

How do you know that? How did you check?

Have you run the blinking LED example? Does it blink with 1 sec interval?

Do you have a scope or logic analyzer to check what's going on?