Quite possible. ISP is for low level programming. I've used it to burn the bootloader into black ATMega328 chips.
Dave
Can't reprogram Trinket
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dbetz
- Posts: 49
- Joined: Thu Jul 10, 2008 7:21 pm
Re: Can't reprogram Trinket
I definitely must have trashed the bootloader since the red LED doesn't do anything when I press reset. How do I re-flash it? Just using the "Burn boot loader" option in the Arduino IDE doesn't seem to work.
- dastels
- Posts: 15674
- Joined: Tue Oct 20, 2015 3:22 pm
- dbetz
- Posts: 49
- Joined: Thu Jul 10, 2008 7:21 pm
Re: Can't reprogram Trinket
I saw that but I was hoping there was a way to do it with the AVRISP mkII directly rather than having to wire up an Arduino UNO. Surely an Atmel programmer can write the boot loader.
- dastels
- Posts: 15674
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Can't reprogram Trinket
Agreed. I assume any ISCP programmer could.
Dave
Dave
- dbetz
- Posts: 49
- Joined: Thu Jul 10, 2008 7:21 pm
Re: Can't reprogram Trinket
Is an ISCP programmer different from an ISP programmer?
- dastels
- Posts: 15674
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Can't reprogram Trinket
No.. and I have it wrong as well. It's an ICSP connector. In any case it's that 2x3 header on an Arduino UNO (and the like). SPI connector for low level programming.
Dave
Dave
- dbetz
- Posts: 49
- Joined: Thu Jul 10, 2008 7:21 pm
Re: Can't reprogram Trinket
That's what the AVRISP mkII has. I'm going to see if I can find the source code for that Arduino app that flashes the boot loader to see if I can extract the boot loader code from it. Or maybe I'll just bite the bullet and dig out an Arduino to use the code as is. I'm a little confused about why the Arduino IDE overwrote the boot loader when I used it to program my sketch though. It should only have written to the application area.
- dastels
- Posts: 15674
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Can't reprogram Trinket
The Trinket's bootloader isn't protect from overwriting... it's a pretty simplistic MCU. And ICSP is for flashing at thgat level... i.e. flashing the bootloader.
Dave
Dave
- dbetz
- Posts: 49
- Joined: Thu Jul 10, 2008 7:21 pm
Re: Can't reprogram Trinket
I broke down and used an Arduino Uno to reflash the boot loader and I'm now able to use the AVRISP mkII to program new sketches into the Trinket. My ornament is now working and my Christmas tree is still up so there is still time to enjoy it. Thanks for your help! I've attached the code in case anyone is interested. It uses a 16 LED NeoPixel ring.
- Attachments
-
[The extension ino has been deactivated and can no longer be displayed.]
- dastels
- Posts: 15674
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Can't reprogram Trinket
That is great to hear!
Dave
Dave
Please be positive and constructive with your questions and comments.