Last week I noticed a project on hackster.io that used an ATtiny. But it wasn’t an ATtiny85 like I had used, but an ATtiny10. Still, it had the same amount of pins, the project describes how you build an ATtiny10 Binary Thermometer, so similar to what you would expect with an ATtiny85. While the difference in the numberpart of the name 10 versus 85 would suggest big differences.
My curiosity had been triggered and I started searching around.
For those that also wonder about the ATtiny part of the name: it is part of the AVR family, an 8 bit-RISC-microcontroller (µC) originally developed by a company called Atmel (AT) in 1996. Atmel got acquired by Microchip Technology in 2016 but the name of the chip stayed of course. One branch of the AVR family are the megaAVR or ATmega microcontrollers. The Arduino UNO uses an ATmega328 as its engine and many other members of the family are used on the other Arduino boards.
The ATtiny is part of the tinyAVR branch of the family, they have less on-chip memory, less pins, a less extensive peripheral set than their Mega siblings, but are really cheap, and easy to use in small project.
Note: actually, you can buy an ATmega328 at AliExpress at the moment of writing even slightly cheaper than an ATtiny85 (€1,06 for the ATmega328 versus €1,53 for the ATtiny 85 incl. shipping). Both microcontrollers need more than the bare controller to program them, but both can work on their own, without needing any additional parts. Both are happy with both a coin cell battery or 5V. The socket for the ATmega328 might be a bit more expensive (but you’re talking cents differences) and of course you might simply don’t want to waste the space on your board if you don’t need 28 I/O pins.
What about the numbers?
The first digit of the number that comes after the designation ATtiny makes sense, it is the amount of flash memory in kibibyte (KiB), so an ATtiny85 has 8KiB of flash memory. The second digit is the mdoel type. There you would expect newer models or more powerful models to have higher numbers. But so far I have not found a page that can explain the logic behind the numbering. If you look at the timeline of release (see below, source) you can see that they are not chronological.
And the other stuff?
Often, the designation of the chip stops there. A project would describe that it used an ATtiny85 or (like metnioned) an ATtiny10. But if you want to buy them online the package type also is important. For example, the ATtiny85 is available as:
If you search for the ATtiny85 on AliExpress for example you will find both ones that have pins and ones that are meant for surface mounting.
In the image on the left, the top was has ATTINY85-20PU DIP-8 in the description. The 20 means it can run on 20Mhz, the DIP-8 indicates the DIP package. There also exist (more expensive) 10PU chips, often indicated as ATtiny85V-10PU that run on lower frequency and are even more power efficient. Lowest price I could find on AliExpress was about 4 euro a piece.
The second one mentions TINY85 SOP8 and, combined with the image, tells you that it is the package meant for surface mounting.
In general there are two things to do if you want the figure out what a specific ATtiny can do. The Wikipedia page for the ATtiny is really helpful. It was filled by someone who had a similar question as I had, but more time. (Thank you!). And the Microchip site has all the datasheets for their microcontrollers. Reading the documentation can be very useful (as always 🙂 )
A lot of people complain that the info is not consistent, and I agree. Take for example the image at the top of this post for the AT tiny 402 – SSFR. It was taken from this official PDF for the ATtiny202/402 .
It says that the first digit is the amount of flash (consistant), the second the feature set (?) and the third the number of pins (6=20 pins, 4=14 pins, 2=8 pins), but why then not add that digit for all chips?
Carrier Type, Temperature Range, Package Type are also not always provided in that way.
If you download the PDF for the ATtiny85 (and 25, 45), you won’t find that info (there are more files here, I haven’t gone through them all).
I have to admit, I’m not really satisfied with this post yet. I’ve got the idea that there still are more variations of ATtiny chips than I have been able to explain here. And also, I still am not convinced myself that ATtiny85 is the most optimal choice for the projects that I’ve been building. But at least I hope I’ve given you some idea of what to look out for if you want to buy them yourself.
Additions? Corrections? Please leave them in the comments below!