Come Learn About New ATtiny Generations

Showing a new generation ATTiny on an SMD breakout plugged into a breadboard, being programmed

As the chip shortage hit, a lot of the familiar ATtiny chips have become unavailable and overpriced, and it mostly stayed the same since then. If you ever searched for “ATtiny” on your favourite electronics component retailer website, however, you’d notice that there’s quite a few ATtiny chips in stock most of the time – just that they’re from a much newer generation than we commonly see, with incompatible pinouts, slightly different architecture and longer model numbers like 412 and 3227. [David Johnson-Davies] from [technoblogy] is here to clarify things, and provide a summary of what the new ATtiny generations have to offer.

In 2019, he posted about 0- and 1-series ATtiny chips, comparing them to the ATtiny series we knew, decyphering the part numbering scheme for us, and providing a comparison table. Now, he’s returned to tell us about the 2- series ATtiny chips, merging the comparison tables together so that you can quickly evaluate available parts by their ROM/RAM size and the SMD package used. He also describes which peripherals are available on which series, as well as nuances in peripheral operation between the three generations. In the end, he reminds us of a simple way to program all these new parts – as it stands, you only need a USB-UART adapter and a 4.7K resistor.

Over the last decades, we’ve seen plenty of inspiring ATtiny projects – squeezing out everything we could out of 5 GPIOs, or slightly more for larger-package ATtiny chips. [David] has been setting an example for us, bringing projects like this function generator, this continuity tester, or an IR receiver with an OLED screen for diagnostics – all with an ATtiny85. It’s not the just pin count that’s a constraint, but the RAM and flash amounts as well – nevertheless, people have fit machine learning and an entire graphics stack into these chips before. If you’re stuck at home unable to do anything, like many of us were during lockdowns, you can always breadboard an ATtiny and see just how much you can get done with it.

12 thoughts on “Come Learn About New ATtiny Generations

  1. You will possibly find that a certain application needs a lot of sensors but millisecond read speed is not essential, therefore you can use one of the simple bus protocols such as I2C etc to daisychain everything, rather than have them directly IO connected.

  2. 2020s will see death of electronics as hobby unless goverments step in to solve chip shortage. Whats the point of studying embedded programming when things like raspberry pi or STM32 chips are either scalped 10x their OG price or totally unaviable? One might as well become profesional football player or race driver instead of reading about transistors, chips and other stuff that once existed but now is limited only to major corporations.

    1. Not that many years ago you could only dream about cheap linux-capable boards. The best you could buy with a hobbyist budget was a wi-fi router to hack up. People still managed to be creative.
      Yes, the chip shortage is a PITA, but our perspective is skewed by recent years of absurdly cheap and abundant electronics.

    2. Atmega328P’s are back to a (somewhat) reasonable price @LCSC, as are many other chips which were not in stock or +1000% the usual price…

      Don’t know where I read it, but as demands drop due to rising inflation rates everywhere the chip shortage seems to slow down…

    3. i am amused rpi has been out of stock all year. there is a real problem.

      but i don’t think it’s really that severe. for example, i’m surprised to see you mention stm32. i have no idea if you can get stm32 today…but if you want an stm32, it’s because you haven’t heard the good news yet! the rp2040 is everything you wanted out of an stm32, and then some! and the rp2040-based pico is in stock at a bunch of vendors at a $5 price.

  3. David Johnson-Davies is incredibly prolofic – he also makes uLisp. If you’re going to use the new attiny chips you’ll want to use Spence Konde’s He also has ATTinyCore for the classic attiny chips and DXCore for the new AVR DA, DB and DD. All highly recommended.

    Also check the guide on making a UDPI programmer

    (a diode works better than a resistor)

    Oh and btw I found that parts availability for the new attiny chips have been reasonable throughout the parts shortage. Especially if you design things to be reasonably flexible around which exact variant you use.

    1. Great comment. Even if you are not very interested in the newer Attinys read the megaTinyCore README on GitHub, there’s interesting stuff about which Arduino IDE is favored and why (no it’s not v2.0) and why NOT to buy certain micros from China (I say the fake chip problem goes beyond the ATMEL parts into the STM32 line as well). On needing a UPDI programmer for the newer ATtiny parts: Google Arduino UPDI Programmer Clone. You can use almost any legacy Arduino board to emulate a UPDI programmer. Here’s one example that uses an Arduino Nano R3:

      * Create Your Own UPDI Programmer

  4. I’ve lost all interest in the attinies. There is too much incompatibility with the atmega’s. They are just not worth putting in that much effort to learn how they work and to rewrite the libraries for the mega’s I’ve already written. Even on the mega’s there is too much incompatibility. For example for timers, they’ve usually got a bunch in a uC, but all of them are different. When I switched to STM32, I had a description of a timer, and then a single line somewhere that said there are 6 of them in the chip. Sure, STM32 has a simple system tick timer, and it may also have “advanced” timers, but the “standard” timer is pretty decent.

    Another big problem for hobbyists are the programmers. For the STM32 you can get an ST-Link clone for a small price and they “just work”. I even think there is some open source software floating around for them. You can also fall back on something like Black magic probe.

    With the attinies, I don’t even know what sort of programming interface they use. The invent another one every handful of years, and programmers are expensive. Debug wire has been (mostly?) reverse engineered, but my point is more that it had to be reverse engineered in the first place because specifications were not available. Why would I invest my time in that? There are plenty of other uC’s to choose from.

    I do like to have some small uC’s, but I would still need at least some 8kB to put in some libraries. Once it gets under 4k it just becomes to cumbersome to use a uC with a C compiler. (A blinking led can be a few hundred bytes in C, but if you want to link in some simple peripheral libraries, it’s just not worth struggling with the software because your uC has too little flash. And most of the tinies are just too memory limited.

    Atmel / Microchip also isn’t the friendliest company towards Open Source. Maybe it’s “less worse” these days, but they used to hide GCC for their stuff in some obscure corner of their website and trying to push their IDE too agressively. They also hardly bother with Linux compatibility. Avr-gcc on my linux box is V5.4.0 and from 2015. Maybe they’ve become “friendlier” lately, but I’ve already decided to not go further, and thus that old compiler is adequate for the old AVR’s I use.

    About chippagedon. The chips seem to come in batches. Half a year ago you could not buy an STM32 anywhere, but at the moment there seem to be more then a hunderd models on stock in a variety of shops. Just before chippagedon I found the STSPIN, which was a STM32 with an SMPS, Gate drivers, shunt resistor amplifiers and specialized peripherals (such as ISR’s on over current) built in. But these days I would be very hesitant to design such an IC into a product even if it was available. Maybe it’s time to resurrect the mechanism of second sources as it was back in the ’80-ies. For STM32, you could also state there are about 8 “second sources” in a diversity of chinese clones. There are small changes between them, and as a hobbyist I don’t bother with them because of that, but for a company it could be used as an extra guarantee they won’t run out of options quickly.

    1. I’ve stopped using attiny (all atmel/microchip MCUs for that matters) very long ago. As you say, they are expensive, closed as hell, complicated to program for, complicated to upload to, the lineup itself is complicated to understand. Very diy-unfriendly. They stay in the old-fashioned way, requiring windows-only paid software and such.

      The only point i’m (very slightly) missing is that in some case it’s useful to have a small footprint (8~12 pins). I hope we’ll soon see some dirty cheap risc-v chips, such as bl602, esp32-c3 or GD32VF103CBT6, but with smaller packages.

  5. @Popelushko 1984 You do realize that the governments stepping in is what caused the shortage in the first place right?
    No idea why you think they would in any way help.
    But anyway, the latest news is that the chip shortages are (almost) over. Let’s see if that pans out.

    1. I wouldn’t be as optimistic. The latest news are that some specific market is easing (consumer IC), some other is worseing (automakers).

      But new problems are already around the corner (mostly around raw material availability and prices), and ‘current’ problems related to chip shortage aren’t resolved yet (Ukraine war, availability of dedicated equipment for all the new foundries in construction).

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.