Ben Heck Can Program The Smallest Microcontroller
Microcontrollers are small, no one is arguing that. On a silicon wafer the size of a grain of rice, you can connect a GPS tracker to the Internet. Put that in a package, and you can put the Internet of Things into something the size of a postage stamp. There’s one microcontroller that’s smaller than all the others. It’s the ATtiny10, and its brethren the ATtiny4, 5, and 9. It comes in an SOT-23-6 package, a size that’s more often seen in packages for single transistors. It’s not very capable, but it is very small. It’s also very weird, with a programming scheme that’s not found in other chips from the Atmel/Microchip motherbrain. Now, finally, we have a great tutorial on using the ATtiny10, and it comes from none other than [Ben Heck].
The key difference between the ATtiny10 and other AVRs is that the tiny10 doesn’t use the standard AVR ISP protocol for programming. Instead of six pins for power, ground, MISO, MOSI, SCK, and RST, this is a high-voltage programming scheme that needs 12 Volts. The normal AVR programmer can do it, but you need to build an adapter. That’s exactly what [Ben] did, using a single-sided perf board, a lot of solder, and some headers. It looks like a lot, but there’s really not much to this programmer board. There’s a transistor and an optocoupler. The only thing that could make this programmer better is an SOT-23 ZIF socket. This would allow bare tiny10s to be programmed without first soldering them to a breakout board, but ZIF sockets are expensive to begin with, and the prices on SOT-23 sockets are absurd.
Programming the device was a matter of loading Atmel Studio and going through the usual AVR rigamarole, but Ben was eventually able to connect a light sensor to the tiny10 and have it output a value over serial. This was all done on a device with only 32 Bytes of RAM. That’s impressive, and one of the cool things about the smallest microcontroller you can buy.
20 thoughts on “Ben Heck Can Program The Smallest Microcontroller”
The antenna’s probably bigger than the controller.
DIY SIT23 ZIF here, using re-purposed RJ45 socket contacts. Probably an excellent use for 3D printing, but this one uses wood. https://www.eevblog.com/forum/projects/diy-sot23-zif-socket/
Similar idea using magnets but i’m not sure of the use case – programming it before i solder it just sounds like cruising for a bruising. easier to adapt your operating circuit to accommodate a couple of extra programming connections. I have never regretted building programmability into a circuit
http://notanumber.net/archives/142/simple-reusable-zif-socket-smd-parts
What is the typical case for these small uC’s? PWM a led (only 2 PWM channels so no RGB? Or some small control loops (it has an ADC and PWM)?
BTW: PIC10f family is also available in sot23-6 package for quite some time..
I don’t know what the killer app for these would be, but I could see using it to drive a stepper motor type automotive gauge from an analog input, a simple sequencer for timing a camera shutter, or some sort of smart nightlight.
It could probably replace a 555 timer in a lot of applications and add some smarts.A 555Duino?
Waveform generators, small logic cells, some authentication, temp controllers, very basic stuff where making it analog would be big and more expensive.
I did use PIC10F202 to generate noise with LFSR. I designed a PCB that fits behind standard beeper…
They are also used as single panel touch sensors (see AT42QT1010).
*single channel (not panel)
You can find breakout boards here https://www.tindie.com/products/Rabujan/attiny10-breakout-board/
I used one in a Z80 build to generate an interrupt pulse once a millisecond to keep a timebase. When I was a kid I built crystal radios to fit in ballpoint pen bodies. There must be some amusement to be had by having a computer in your pen or ring. The UI would have to be something like a touch point and LED (or maybe voice?)
https://olduino.wordpress.com/2016/01/15/millisecond-clock-using-attiny10/
The programmer you referred to is way simpler than Ben’s! https://junkplusarduino.blogspot.com/p/attiny10-resources.html
@Brian – do you really need 12 volts? That seems very unlikely and i have programmed these things.
A quick look in the datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/atmel-8127-avr-8-bit-microcontroller-attiny4-attiny5-attiny9-attiny10_datasheet.pdf , 15.3.1 Enabling) reveals: No, you don’t *need* 12V. There’s two methods of resetting the chip into the programming mode, and one of them is applying 12V to the reset pin.
You can set a fuse in the chip that redefines the reset pin for an additional I/O pin. If you set this fuse then the reset pin won’t reset the chip any more, but putting 12V on it will. So if you need the additional I/O pin, you have to use the high voltage programming mode.
I deadbugged a PIC10 with 0603 r,g,b LEDs to make a simple blinky with several selectable modes https://twitter.com/LEDSuit/status/156138376423145474?s=09
I soldered on magnet wire to program it
What, no love for the WLCSP?
Something like the ATtiny20-UUR has more pins and is even smaller. Though at that point I’m pretty sure you’d be soldering with a needle or something.Why do people use YouTube to *document* projects like this, it’s about the least useful form other than interpretive dance ffs.
Leave a Reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.