Driving +5V to a digital pin configured as output on the Atmega32
ATmega32 maximum permitted DC current is 40mA per pin. 

Here's a graph of sink current vs pin voltage. Note that it only goes up to 2V, at which point the pin is already sinking over 60mA. At 5V it could be 80mA or more. 

40mA x 1V = 40mW. 80mA x 5V = 400mW, 10 times higher. If applied continuously it will probably destroy the output transistor, and could also damage other parts of the chip.