More in the series of comparisons between similar yet functionally different AVR microcontrollers, this is a look at the ATmega16/ATmega32 vs the ATmega164 and it's variations.
Atmel considers the ATmega164 family to be upgrades to the ATmega16 family. They are pin compatible and source code compatible, unless you use a feature of the ATmega16/ATmega32 that has been expanded on the ATmega164 family. The register names are changed to accomodate the new features. An example is the USART, which has registers named like UDR in the ATmega16 and ATmega32, but UDR0, and UDR1 in the ATmega1284, ATmega644, ATmega324 and ATmega164.
| Device | ATmega16A | ATmega32A | ATmega164P | ATmega324P | ATmega644P | ATmega1284P |
|---|---|---|---|---|---|---|
| Flash | 16384 | 32768 | 16384 | 32768 | 65536 | 131072 |
| SRAM | 1024 | 2048 | 1024 | 2048 | 4096 | 16384 |
| EEPROM | 512 | 1024 | 512 | 1024 | 2048 | 4096 |
| PWM | 4 | 4 | 6 | 6 | 6 | 6 |
| Ext Interrupts | 3 | 3 | 32 | 32 | 32 | 32 |
| Max Freq | 16 | 16 | 20 | 20 | 20 | 20 |
| SPI | 1 | 1 | 3 | 3 | 3 | 3 |
| USART | 1 | 1 | 2 | 2 | 2 | 2 |
| picoPower | N | N | Y | Y | Y | Y |
| OC Chnls | 4 | 4 | 6 | 6 | 6 | 6 |
| VCC | 2.7 to 5.5 | 2.7 to 5.5 | 1.8 to 5.5 | 1.8 to 5.5 | 1.8 to 5.5 | 1.8 to 5.5 |
| Price | $3.40 | $4.48 | $3.93 | $5.03 | $5.76 | $5.82 |
Notes: