SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By rgsparber
#198326
I really enjoy playing with devices that are tiny, intricate, and low in cost. The ATTiny85 certainly fits that description. It is an entire computer system that easily rests on a fingernail and can be bought for under $1.50. So what's not to like? Well, with the tiny package comes a tiny number of Input/Output pins. This is fine if that is what the application needs but sure makes debugging code difficult.

In my present application, I was able to borrow a single pin on the ATTiny85 in order to send out debugging information. This article describes the software that runs inside the ATTiny85 plus software that runs on a companion Pro Micro. Together they let me send bytes out this single pin and have them show up on my laptop.

For those of you with far more experience programming Arduinos, I welcome suggestions on how to make the code on the ATTiny85 smaller and use less real time. I would also like to speed up the throughput of the Pro Micro.

If you are interested, please see

http://rick.sparber.org/SPrint.pdf

Your comments are welcome. All of us are smarter than any one of us.

Thanks,

Rick
By wilykat
#198379
Nice guide, downloaded for future use. ATTiny weren't made with serial communication in mind so they were a bit tricky to get to talk with a host computer.

If you think ATTiny85 is tiny, look up ATTiny10. Only 6 pins total (2 for power, 4 analog and digital IO), and they come only in small SMD package so the chip is about the size of a rice. ATTiny 4, 5, 9, and 10 all costs about 30 cents each and they differ only in how much flash memory and presence or absence of ADC:
ATtiny10 has 1k flash and ADC.
ATtiny9 has 1k flash and no ADC.
ATtiny5 has 512 byte flash and ADC.
ATtiny4 has 512 byte flash and no ADC.
All has same amount of SRAM, and no EEPROM thus it can't be used to save data internally.

ATTiny10 can't use regular ICSP connection, it needs a slightly different form using 5 wires total for programming. Considering it's tiny and dirt cheap, I had considered using it for prank: deadbug wiring with piezo and battery, program it to wait xx minutes after power on then make noise, use paper tab on battery to keep it powered off until I am ready, pull tab and hide it. Or deadbug it with RGB LED for some pretty blinky colors and drop em into jar full of glass beads.