A controller I’ve been looking at for several weeks now is the Atmel ATtiny24A. What is this and why am I interested in it? I’m glad you asked!
The ATtiny24A is the tiny little brother of the bigger ATmega328 and ATmega168 used on most Arduino boards. It’s smaller and weaker, but just like your little 1-week old baby brother, it still has all the same functioning parts and speaks the same language (well, if babies could speak). How tiny is it? If you get one in surface-mount packaging, it can be as little as 3mm square, or about the thickness of two nickles.
(not the actual ATtiny24A, but close)
That smallness is important, because a side project I’m working on, a pocket-sized Ethercon cable tester, only allows a PCB of 20mm square, on which I need to fit most of the electronics.
Fine, it’s little, but what does it DO?
- 8-bit AVR
- 20 Mhz
- 2 Kbytes Flash memory
- 12 I/O pins
Compared to the ATmega chips used in Arduino boards, the primary differences are less flash memory and fewer I/O pins. The code required for my tester is minimal, and I need 9, possibly 10 I/O pins.
Out of all the chips out there, why am I picking this particular chip? Because it’s an AVR chip, and can use the same code as the Arduino, and can even use the same Arduino compiler for programming the chip, if you follow instructions listed here and here. Is it the *best* chip to use? Probably not – it’s capable of doing more than is needed and costs 3 times as much (ATtiny24A chips can be had for 60-70 cents in quantities of 100, while smaller chips can be had for under 20 cents). But, those smaller chips would require me to learn assembly, and I don’t have time for that right now. I already know Arduino programming, somewhat, so, I’m using what I know.