► Games

► Sound & Music

► Watches & Clocks


► Power Supplies

► Computers

► Graphics

► Thermometers

► Wearables

► Test Equipment

► Tutorials

► Libraries

► PCB-Based Projects

By processor

AVR ATtiny

► ATtiny10

► ATtiny2313

► ATtiny84

► ATtiny841

► ATtiny85

► ATtiny861

► ATtiny88

AVR ATmega

► ATmega328

► ATmega1284

AVR 0-series and 1-series

► ATmega4809

► ATtiny1604

► ATtiny1614

► ATtiny3216

► ATtiny3227

► ATtiny402

► ATtiny404

► ATtiny414

► ATtiny814

AVR DA/DB-series

► AVR128DA28

► AVR128DA32

► AVR128DA48

► AVR128DB28



► RP2040

► RA4M1

About me

  • About me
  • Twitter
  • Mastodon


RSS feed

On Bytes and Pins

25th April 2022

Have you noticed that to get a microcontroller with more bytes of RAM you usually have to select a package with more pins?

After a long wait, this week I received my order of a few ATtiny3224 microcontrollers [1]. It's a member of the new ATtiny 2-series with 14 pins, 3Kbytes of RAM, and 32Kbytes of program memory:


One of the things I especially like about it is that it has an unusually high RAM bytes-to-pins ratio. Let me explain.

Getting more RAM

If you're choosing a microcontroller for a project, and you don't need a lot of I/O lines, you'd naturally choose one with a small number of pins. Such packages tend to be more compact and easier to wire up. However, for some applications you need as much RAM as possible; for example, programs that do graphics or music processing, or to run a language such as my Lisp interpreter, uLisp. But there seems to be an unwritten rule with chip manufacturers that to get more RAM you have to buy a package with more pins.

To investigate this I plotted a graph showing the size of RAM vs. number of pins, both on log scales, for the range of AVR processors from Microchip:


For simplicity I've only included the top member of each family; for example, I show the 8-pin ATtiny85 but not the ATtiny45 or ATtiny25, which are identical apart from the amount of flash memory and RAM.

The straight line on the above graph represents the line log(bytes)/log(pins) = 3. For example, the ATtiny85 has 512 bytes of RAM and 8 pins. 512 is 2^9 and 8 is 2^3. 9/3 is 3.

This line seems to represent a glass ceiling: there are no processors to the left of the line. For example, 14-pin processors with more than 3Kbytes of RAM, or 8-pin processors with more than 512 bytes of RAM. The two processors lying on the line are my old favourite, the ATtiny85, and the newest addition to my collection, the ATtiny3224.

I'm looking forward to trying it out in some applications – watch this space!


25th August 2022: Have added the recently released AVR32DD14 to the graph: this gives 4Kbytes in a 14-pin package, and so breaks through my glass ceiling! Also added the AVR32DD20, AVR64DD28, and AVR32DD32.

  1. ^ ATtiny3224 on

blog comments powered by Disqus