adafruit / Adafruit_CircuitPython_AVRprog

program AVR chips right from CircuitPython!
MIT License
31 stars 20 forks source link

Add support to program ATtiny13a #9

Closed aaronaverill closed 5 years ago

aaronaverill commented 5 years ago

I love this piece of code to program my attiny85 and atmega328 with my feather. On a lark I got some attiny13a from the maker space in a DIP-8 - same pinout as tiny85, plugged it into a breadboard to see what it could do. Found the page size, flash size, signature ect, no problem.

I was able to read the signature and set fuses but not program the chip. I traced it to program_file() calling begin() with the default cock=FAST_CLOCK. When I tweaked this to use the SLOW_CLOCK value everything works great.

Suggestion: Add a parameter to the chip array that allows the caller to set the clock to fast or slow for programming. Check the chip['clock_speed'] option, if it's not empty, use that for programming the chip thru SPI.

Voila, now you will support ATtiny13a

ladyada commented 5 years ago

ya that sounds good. wanna add such a thing as a PR? :)

aaronaverill commented 5 years ago

bwahaha. squeaky wheel. lol... do I want to? meh. will I? absolutely I can do this, and I've got all the chips for testing. thanks for consideration. i'll cook it up tonite <3

ladyada commented 5 years ago

awesome! can't wait :)

aaronaverill commented 5 years ago

https://github.com/adafruit/Adafruit_CircuitPython_AVRprog/pull/10