The microcontrollers in Adafruit products

With the general information out of the way, let's run through the microcontrollers used in Adafruit development boards, from the simplest to the most complex:

8-bit Microcontrollers:

8-bit microcontrollers can only be programmed with the Arduino IDE. They are not powerful enough for MakeCode or CircuitPython.

Note the cost differential between 8-bit and the more capable 32-bit processors has narrowed quite a bit in the last two years such that the small cost difference may be worth the increased functionality 32-bit boards provide.

The ATtiny85

Small and simple, the ATtiny85 is an 8-bit CPU in an 8-pin package. It runs at 8MHz and has 6 GPIO pins.

The ATtiny85 is low cost but we don't recommend it anymore because the bit-bang USB is annoying to use. Consider the Trinket M0 and Gemma M0 as 32-bit upgades!

It has 8 kilobytes of Flash to hold firmware, 512 bytes of RAM, and 512 bytes of EEPROM that you can read and write from code.

 

For peripherals, it has two 8-bit timers that can generate PWM signals, a Universal Serial Interface that can be configured to speak I2C or SPI, an analog voltage comparator, and a 10-bit ADC.

 

Adafruit uses it in the original Trinket and Gemma.

The ATtiny85 a good chip for very small jobs like reading three or four inputs and deciding what output to produce, or for generating time delays. A soft power module for a Raspberry Pi would be one example: pushing the button once turns power on. When you push the button again, the microcontroller generates a signal that tells the RasPi to do an orderly shutdown, waits a while, then cuts the power after the RasPi has shut down completely.

You could build that circuit from logic gates, but it would get cumbersome. You could also use a bigger microcontroller, but that's more money and physical space for a chip with lots of features you don't use. The ATtiny85 is smaller and less expensive than either option.

The ATmega328P

This is the chip the Arduino Uno made famous. It's an 8-bit microcontroller that normally runs at 16MHz and has 23 GPIO pins.

It has 32K of Flash program memory, 2K of RAM, and 1K of EEPROM.

 

For peripherals, it has two 8-bit timers and one 16-bit timer, six PWM channels, a 10-bit ADC, and separate hardware Serial, I2C, and SPI interfaces.

 

We use it in the Metro 328P, Feather 328P, and Pro Trinket.

 

It's a good all-around chip for programmable hardware projects, as demonstrated by the thousands of projects people have built around the Arduino Uno. It has enough data pins to read several input signals, gather information from external I2C or SPI sensors, control an LCD or TFT display, and send information back to a computer through its USB serial port.

The ATmega32u4

The 32u4 is mostly comparable to the 328P, but is also a full-speed (12Mbps) USB device. It's an 8-bit microcontroller that usually runs at 16MHz and has 26 GPIO pins. The big benefit is the native USB, which makes it possible for the 32u4 to act like a USB mouse, keyboard, MIDI etc. The remaining overall peripherals are nearly identical to the 328P.

The 32u4 is used in the Arduino Leonardo and many compatibles.

It has 32K of program Flash and 1K of EEPROM like the 328P, but has 2.5K of RAM.

 

For peripherals, it has one 8-bit timer, one 10-bit timer, two 16-bit timers, fourteen PWM channels, a hardware Serial interface that can also be configured as an SPI interface, separate I2C and SPI interfaces, a 10-bit ADC, and (obviously) a 12Mbps USB interface.

 

Adafruit uses it in the Pro TrinketFlora, 32u4 Feather, 32u4 ItsyBitsy, and Circuit Playground Classic.

The USB peripheral gives the ATmega32u4 two major differences from the ATmega328P:

  1. The 32u4 bootloader doesn't need to use another hardware serial interface chip, so those pins are free to communicate with external devices or other microcontrollers.
  2. You can program it to act like different kinds of USB devices, like a keyboard and mouse, or a MIDI controller.

That makes the 32u4 a good choice for projects that need to communicate with a computer and where you want to keep some '328P code-compatibilities

32-bit Microcontrollers:

32-bits is more than 8-bits! This makes these boards faster, and more powerful. Along with 32-bit math, you can also expect a lot more Flash memory, RAM memory, and clock speed.

The world is turning to using 32-bit for all microcontrollers. Adafruit likes the ARM Cortex M0 and M4 series, these are very popular cores with good compiler support. (Compared to the 8-bit cores which are proprietary to Atmel only!)

The price of the M0 based boards have come down to the same levels as most 8-bit boards, so cost is often not a consideration.

These chips are fast and powerful so they can run MakeCode and CircuitPython as well as Arduino.

The SAMD21G

The SAMD21G uses an ARM Cortex M0+ microcontroller, which is about as small and simple as you get with 32-bit devices.

It runs at 48MHz, usually stabilized by an external 32,768Hz crystal oscillator, and has 38 GPIO pins.

 

It has 256K of Flash memory and 32K of RAM. It doesn't have any EEPROM, but you can read and write sections of the Flash array from code.

 

Unlike 8-bit microcontrollers, a 32-bit microcontroller can have multiple copies of a peripheral that are called 'instances'.

The SAMD21G has:

  • three instances of a basic timer, each of which can be configured with 8. 16, or 24 bits and can generate two PWM waveforms.
  • three instances of an advanced timer, two 24-bit and one 16-bit, each of which can generate up to eight PWM waveforms.
  • six instances of a Serial Communication Interface (SERCOM), each of which can be configured as a Serial, I2C, or SPI interface.
  • one I2S interface for digital audio.
  • one 12-bit ADC that can take input from any of 14 pins
  • one 10-bit DAC
  • one Peripheral Touch Controller that can read a 12x10 matrix of capacitive touch sensors
  • one full-speed (12Mbps) USB interface

It also has an Event system which allows peripherals to talk to each other directly, and a 12-channel Direct Memory Access (DMA) system that can copy data from one peripheral to another without making the CPU read and write the bytes directly.

We use it in the Feather M0, Metro M0 Express, ItsyBitsy M0 Express, and Circuit Playground Express.

It's a device made for crunching numbers and passing around large amounts of data. It's good for projects where you want to control a large number of programmable LEDs or do basic audio and video processing.

It also has enough processing power to run a Python interpreter, so it's our base platform for CircuitPython.

The SAMD21E

The SAMD21E is a slightly smaller version of the SADM21G, with 32 GPIO pins.

It has most of the same specs as the SAMD21G, but:

 

  • Its advanced counters can generate six PWM signals per instance instead of eight
  • It has four SERCOMs instead of six
  • Its ADC can read 10 pins instead of 14
  • Its PTC can handle a 10x6 matrix instead of 12x10

We use it in the Trinket M0 and Gemma M0, where almost none of the GPIO pins or their peripherals are broken out to the edge of the board. In those forms, they're primarily small CircuitPython devices.

99% of code that runs on the SAMD21G18 will run on the 'E18 since its just a shrunken down version!

The SAMD51

The SAMD51 is a new device family from Atmel-now-Microchip, built around a very fast ARM Cortex M4 microcontroller. It's a super-powerful upgrade. At this time we have CircuitPython and Arduino support. Hopefully MakeCode will come around too, but as of this writing it isn't yet!

The '51 is an upgrade to the '21 so there are many similarities. Most code for the '21 will run on a '51, but 6x faster. However it is a different core so its not a simple upgrade.

It's more complex and faster than the M0+, and includes a hardware floating-point math unit and digital signal processing array (one command applies a math operation to a whole block of data).

 

It has 512K of Flash memory and 192K of RAM. It runs at 120MHz and has 51 GPIO pins.

For peripherals, it has:

  • six 8/16/24-bit timer instances, each with two PWM outputs
  • two 24-bit and three 16-bit advanced counter instances, each with eight PWM outputs 
  • six SERCOM instances
  • two 12-bit ADC instances
  • two 12-bit DAC instances
  • one I2S interface
  • one full-speed (12MBps) USB interface
  • one quadrature Position Decoder (for reading rotary encoders)
  • one QSPI interface (for using high-speed SPI Flash chips)
  • one 10-bit Parallel Capture Controller (for reading video input)
  • a set of cryptogtraphy devices including a true-random-number generator, an AES block, and a public key block
  • four Configurable Custom Logic instances (basically mini-FPGAs)

It has 32 DMA channels and its PTC can read a 256x32 matrix of capacitive touch sensors.

We use it in the Metro M4, Feather M4, and ItsyBitsy M4, and the NeoTrellis M4.

This chip is made for digital signal processing: calculating FFTs of audio input in real time, and generating/mixing audio or video signals. It has features like memory protection that would let it operate as a full-scale computer, but that would be kind of a waste of its abilities. Without the overhead of an operating system, it can outperform a Raspberry Pi Zero for some real-time signal processing.

System-On-a-Chip (SOCs)

The STM32F205

This is the main chip from the WICED Feather. Its CPU is a 32-bit microcontroller designed by ST Microelectronics, one of the major chip manufacturers.

It runs at 120MHz and the raw microcontroller has 1MB of Flash and 128K of RAM. You can only program it with Arduino

You can't use most of that though, because the board comes preloaded with the WICED operating system for Wifi controllers. Your code gets 128K of Flash for program storage and 16K of RAM.

 

For peripherals, it has:

  • 12 GPIO pins
  • one SPI interface
  • one I2C interface
  • three Serial interfaces
  • one 12-bit ADC
  • two 12-bit DACs
  • one Wifi radio

The Wifi interface and WICED operating system are the two biggest features of this board. It was designed to be the core of a Wifi-enabled IoT device.

The nRF52832

This is the main chip from the nRF52 Feather. Its CPU is an ARM Cortex M4 microcontroller running at 120MHz, with a 64MHz floating point unit (FPU).

It has 512K of Flash for program storage, 64K of RAM, and 19 GPIO pins.

This chip has Arduino support and also some CircuitPython support (at the time of this writing, it's Alpha but check to make sure we haven't gotten it to a stable release!)

For peripherals it has:

  • a 12-bit ADC
  • three timer instances that can each generate four PWM waveforms
  • three SPI interfaces
  • two I2C interfaces
  • one Serial interface
  • one I2S audio interface
  • one Pulse Density Modulation audio input
  • cryptography devices including a true-random-number generator and an AES block
  • one quadrature decoder

Those are all relatively minor features though. The big deal for this one is its built-in Bluetooth Low Energy (BLE) radio.

The nRF52 is the only microcontroller Adafruit carries that can operate as a BLE central device. Like the other SOCs in this list, it runs a simple operating system that swaps between your code and the built-in firmware that keeps the BLE radio working.

This one is designed to be the core of a BLE device.

The similar nRF52840 is being designed into next-generation products and looks to be a very capable chip in designs.

The ESP8266

The ESP8266 was something of an internet sensation when it first came out: a microcontroller with built-in Wifi capacity that sold for about $6 in small quantities (less than half what other non-microcontroller WiFi chips cost at the time). There was a catch though: there was absolutely no public documentation.

It also has the least number of GPIO available, special use GPIO, and a 'hidden' operating system that can make some projects and use difficult.

It didn't take long for the combined curiosity of the internet community to unravel most of the chip's mysteries. Then Espressif, the company that makes the ESP8266, began to talk to that community and release official documentation. It may go down as one of the most effective reverse-psychology viral marketing campaigns in history.

 

To reach its amazingly low price point, Espressif sacrificed almost everything else. The microcontroller part is a 32-bit Tenselica L106 Diamond architecture running at 80 MHz.

It has nine GPIO pins, three of which control the way the microcontroller behaves when it boots. User code gets less than 36K of RAM, but the chip has a whopping 4MB of Flash memory.

For peripherals, it has:

  • one SPI interface
  • one I2C interface
  • one I2S interface
  • one serial interface
  • four PWM channels
  • one 10-bit ADC that can read values between 0V and 1V

The big deal for this one is, obviously, its WiFi interface. This chip is made to be the core of simple WiFi IoT devices that don't need to make many physical connections to other devices.

The CPU has enough processing resources to run a Python interpreter. Adafruit carries the Feather HUZZAH with ESP8266 The 4MB Flash makes the ESP8266 a suitable platform for CircuitPython. But, if CircuitPython is a primary consideration, Adafruit recommends more capable chips like the M0 boards for the best experience.

The ESP32

The ESP32 is the most recent chip from Espressif, who also developed the ESP8266.

It's designed to be a one-stop-shopping solution for IoT devices.

 

The microcontroller is a single or dual core Xtensa L6 32-bit microcontroller, running at 160 MHz or 240 MHz.

 

It uses an external fast SPI Flash chip for program storage (up to 16MB, Adafruit uses a 4MB chip). It has 540K of RAM and 34 GPIO pins.

For peripherals, it has:

  • one 16-bit PWM generator with 16 output channels
  • three Serial interfaces
  • three SPI interfaces
  • three I2C interfaces
  • one 12-bit ADC that can read any of 18 pins
  • two 8-bit DAC instances
  • two I2S interfaces
  • ten capacitive touch sensor instances
  • temperature and magnetic field sensors
  • one 8-channel IR interface
  • one 10/100 Mbps Ethernet MAC
  • one SDIO host interface that can read/write data from an SD card
  • one SDIO slave interface that can act like an SD card
  • eight pulse counter instances, each of which can capture 4 signals

But the headline features are WiFi, Bluetooth Classic, and BLE radios. The dual-core processor means the chip doesn't have to spend as much time swapping between the code you upload and the built-in OS that keeps the radios running.

It's an ambitious design, but still a work in progress. There are lots of pieces, and sometimes they interact in unexpected ways. Espressif is finding, fixing, and adjusting those issues, but it's a process of testing options to see how they work in the field. That's normal for any new chip, but Epressif is doing it in public.

Adafruit carries the Espressif ESP32 Developers Board, the Adafruit HUZZAH32 – ESP32 Feather Board, and the Pycom SiPy 1.0 – ESP32 WiFi, BLE and +22dBm SigFox Radio.

This guide was first published on Nov 07, 2018. It was last updated on Nov 07, 2018. This page (The microcontrollers in Adafruit products) was last updated on Sep 21, 2019.