there are following difference b/w both controller.
1. atmega16 have 16kb flash memory and atmega32 have 32kb
2. atmega16 have 1kb sram and atmega32 have 2kb
3. atmega16 have 512byte eeprom and atmega32 have 1kb
4. In the MCUCR Register, the SM2 and SE bits are swapped, i.e., SM2 is bit 7 and SE is bit 6.
5. the interrupt priority table are quite change.e.g TIMER2 COMP have 4th position in table of atmega16 but it stand at 5th position for atmega32. and INT2 is at 4 position for atmega32.
other peripherals are quite same.