(As of 2021-10-15)
ATtiny10, TPI programming and What worked for me..
First thanks to the links that may not have worked for me, but still pointed me in the direction of now being able to program the ATtiny10 successfully.
https://irq5.io/2010/07/15/programming-the-attiny10/
https://irq5.io/2017/09/09/writing-code-for-the-attiny10/
http://www.technoblogy.com/show?1YQY
Tools Used in my attempts:
USBAsp ( I have 2 of them with updated firmware, by that I mean the 2011 version)
Zadig-2.6 (for updated windows libraries for USBAsp
USBTiny (again, I have 2 of them).
Arduino IDE (2.0 beta) with http://www.technoblogy.com/package_technoblogy_index.json
avrdude
avr-gcc
and of course several Attiny10's
Other Projects after succeeding at this one:
Attempt 1:
Tried to use UsbASP after firmware update, without success. I tried every library (three to select from) in Zadig-2.6. I tested using avrdude command line and in Arduino IDE (with its use of avrdude). It would worked for ATtiny13a, ATtiny85, ATtiny202, ATtiny806, and 1604 just great. Both command line and Arduino IDE. I was close. When I asked it to read, it would show it had 1k of mem but then no luck. When I tried to send it a hex file I would get the dreaded:
avrdude: error: program enable: target doesn't answer.avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.I first tried bread board, but one of the things that can cause above error is a crappy connection.
So I spent about 5 minutes and soldered one together.
It failed to program the little ATtiny10...
Attempt 2:
I while reading up more after the first failures, I ran across darell tan 's article ( https://irq5.io/2010/07/15/programming-the-attiny10/ ) on programming the Attiny10 with an FTDI.. No problem, I've got a few of those.. But as I read through it looked like seeing if avrdude.conf was set up for it since there had been a few versions since. So I did a find for TPI in avrdude.conf and BINGO.. Found this section:
# USBtiny can also be used for TPI programming.# In that case, a resistor of 1 kOhm is needed between MISO and MOSI# pins of the connector, and MISO (pin 1 of the 6-pin connector)# connects to TPIDATA.programmer id = "usbtiny"; desc = "USBtiny simple USB programmer, https://learn.adafruit.com/usbtinyisp"; type = "usbtiny"; connection_type = usb; usbvid = 0x1781; usbpid = 0x0c9f;;Cool!!, so I grabbed the breadboard, wired up with Mosi having a 1k resister to Miso and Miso going to Pin 1 of Attiny10. Like this:
Hooked up the UsbTiny up and fired up avrdude:
avrdude -v -pt10 -cusbtiny -b 9600avrdude: Version 6.3-20201216 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg WunschLooking Better!!
So then I tried loading a hex file (the blink one from http://www.technoblogy.com/show?1YQY )
and I got this:
avrdude -CC:\Users\me\Documents\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf -v -pattiny10 -cusbtiny -Pusb -Uflash:w:blink.hex:iOh yes.. But no blinking light yet. I powered down and powered it back up and ...
GOT BLINKING!! (note this little vid is after a made a more permanent board for programming)
So now I have it running and wondered it I could use Arduino IDE. The best board support I found for it was at: https://github.com/technoblogy/attiny10core
Just use C and you will be fine. But since I'm using the usbtiny to program, I compile then go to command line and load the hex from the temp dir.
Update (Just a few moments later):
I managed to add USPTiny programmer to Arduino IDE in both old and new Beta.
I just located the programmers.txt file ( had it in two locations since I have a separate install for Beta 2.0.0-Beta.12) inside the AppData\Local\Arduino15\packages\ATtiny10Core\hardware\avr\2.1.0 dir. I then added:
Then I saved it then opened up the IDE and I had the programmer now in the IDE.
Now I can write the code and upload in the Arduino IDE. Still using C :)
UPDATE 5/12/2023:
Compile in Microsoft studio with -Og to get smallest file possible. Per:
https://www.avrfreaks.net/s/topic/a5C3l000000UkCKEA0/t190668 (some more of my learning experience with Microchip Studio and ATtiny10)
Hope this little experience helps some one on what to do or not to do with the Attiny10 ..
Enjoy
Sherm