Mind's Forge |
Notes »
Programming the ATtiny10Programming ATtiny10 with USBASP and avrdudeNotes on programming a small (SOT-23-6) and cheap (44-46 cents at qty 1) microcontroller, the Microchip ATtiny10 in a Linux environment using C and a USBASP programmer. The ATtiny series uses TPI (Tiny Programming Interface) instead of ISP (In System Programming) so I couldn't use my Adafruit ISP programmer. These videos helped a lot: Connecting to the USBASP and Compiling and uploading Compile with avr-gcc:
Upload with avrdude:
This code showed me how to enable the PWM. Reference LinksProgramming ATtiny10 with HVSP (High Voltage Serial Programming)I've been working on a project that expanded to use all four pins of the ATtiny10. One of the pins is the reset (RST) pin which can only be used as a (weak) GPIO if you program using 12vdc. Here are my notes trying to figure that out. Reference Links
The design partially works, I am able to enable the HV reset, the board outputs 12.2v, and I'm able to disable the RST pin by writing 0xFE to the fuse byte (by default it's 0xFF, the lsb is changed to 0 to disable reset, RSTDISBL) I did this by using avrdude to read the fuse byte to a file, changed it with hexedit and then programmed the ATtiny10 with it, disabling the low enabled RST. The RSTDISBL file attached above is what I used with this command:
but when I flash the memory it fails to verify, every time, with different bytes not being read back correctly. So there must be some noise issue somewhere. I was afraid of this and even tried to route the data traces in such a way to keep them away from the boost IC and inductor. |
Page last modified on September 28, 2023, at 11:33 pm |