Whenever I look at integrating avrdude into a software solution I find myself thinking about how useless the “Phillip”s bit on a Leatherman(tm) tool is and how many times I have hurt myself using it when it was the tool on hand. (This is the precursor to the next few blog entries).
| Attachment | Size |
|---|---|
| spi4r2.tgz | 23.95 KB |
Comments
spi4r2: Following up on my 3 year old post.
When I first designed my arduino programmer I chose to expose only one port of the at90usb162 because the usart on the avr did both spi and serial. Then I wrote a blog (http://dorkbotpdx.org/blog/feurig/spi4_usb_to_spi_converter) demonstrating the use of the usart in spi mode. At that point for me all of the interesting parts were worked out and all that was left was drudgery so I fleshed it out until I was able to brick a couple of avr's by programming their fuses willy nilly and then I let it sit.
Recently I went back to this code using paul stoffregons usb serial code ( http://pjrc.com/teensy/usb_serial.html ) since lately I have been referencing all of my usb avr code off of paul's code due to years of instability issues in certain other unnamed libraries and since I want to do a hid an midi based programmer in the near future. (the bonus is that apparently now all of my problems become paul's problems. :) ).
It isn't pretty and at the moment it is linux only but it works. So for all of you who have been pestering me for a benito based programer here it is.
ArduinoISP
If you were to splice that UART-as-SPI into the ArduinoISP code (within Arduino, menu File > Examples > ArduinoISP, maybe somewhere around line 132...), then you'd have an AVRDUDE compatible programmer which works on all 3 platforms.
Yeah, I know you probably don't care, or maybe you hate Arduino now, but in any case, there it is.
Actually that was the whole point.
In my original spi4 code. I just wanted to demonstrate the capabilities of the usart and then anyone could have finished it.
But as I left it as an exercise to the interested, it sat for 3 years ....
?
What was the point again... making an ISP programmer, or waiting 3 years to see if someone else would do it for you?
I just worked out the technical details
And demonstrated that it worked. After that I left it to see if anyone else would put the two together. And no one other than yourself did. At the time, I was more interested in the avr isp mechanism outside of avrdude or avr910 which are cumbersome at best.
I probably own some of that smarmy comment.
Thanks.