The Arduino family of boards mostly use microcontrollers made by the company Microchip. They all have similar hardware design principles and, with the exception of the microcontrollers used in the Due and other ARM-based Arduinos such as the Zero, they have similar designs
ATmega328
The ATmega328 is the microcontroller used in the Arduino Uno and its predecessor the Duemilanove. In fact, the ATmega168 that was used in the first Arduino boards is basically an ATmega328 but with half of each type of memory. The full datasheet is available from www.microchip.com/wwwproducts/ en/ATmega328 and is worth browsing through to learn more about the inner workings of this device.
The central processing unit (CPU) is where all the action takes place. The CPU reads instructions (compiled sketch code) from the flash mem- ory one instruction at a time. This process is different from a conventional computer where programs are stored on disk and loaded into random access memory (RAM) before they can be run. Variables that you use in your programs are stored separately in the static RAM (SRAM). Unlike the flash memory containing the program code, the RAM is volatile and loses its contents when you turn off the power, so the current value of any variables will be lost when you turn off the power.
To allow the nonvolatile storage of data that remains even after the device is powered off, a third type of memory called Electrically Erasable Programmable Read Only Memory (EEPROM) is used. Another area of interest is the Watchdog Timer and Power Supervision unit. These give the microcontroller the capability to do a number of things that are normally hidden by the simplified Arduino layer, including clever tricks like putting the chip to sleep and then setting a timer to wake it up periodically.

The remainder of the block diagram is concerned with the analog-to- digital conversion, the input/output ports, and the three types of serial interfaces supported by the chip: UART – Serial, SPI, and TWI (I2C).
ATmega32u4
The ATmega32u4 is used in the Arduino Leonardo and also in the Arduino Micro and Arduino Nano. This processor is similar to the ATmega328, but it is a more modern chip with a few enhancements over the ATmega328:
- A built-in USB interface, so there’s no need for extra USB hardware.
- More of the pins are PWM capable.
- There are two serial ports.
- Dedicated pins for I2C (these pins are shared with the analog pins on the Arduino Uno).
- There is 0.5 kB more SRAM.
The ATmega32u4 used in the Leonardo is in a surface-mount package, which means it is soldered directly to the Arduino board, whereas the ATmega328 is in a DIL package fitted into an IC socket for the Arduino Uno.
ATmega2560
The ATmega2560 is used in the Arduino Mega 2560 and the Arduino Mega ADK. It is no faster than the other ATmega chips, but it does have far more of every type of memory (256K flash, 8K SRAM, and 4K of EEPROM) and many more I/O pins.
AT91SAM3X8E
This is the chip at the heart of the Arduino Due. It is much faster than the ATmega chips I have discussed so far, being clocked at 84 MHz, rather than the normal 16 MHz of the ATmegas. It has 512K of flash and 96 kB of SRAM. The microcontroller does not have any EEPROM. Instead, to savepersistent data, you need to provide your own additional hardware, either in the form of an SD card holder and SD card or flash or EEPROM storage ICs. The chip itself has many advanced features including two analog out- puts that make it ideal for sound generation.