Two different MCU , different output but none was right?
ATmega32 fuse bits are enabled JTAG interface on PC2...PC5 by default.
If you want to use PC2...PC5 in your project, you should disable JTAG by unprogrammed JTAGEN fuse bit.