With the inclusion of a functional AVRISP MKII (and PDI!) programmer in LUFA, I thought it would be fun to make a programmer board to take advantage of it.
This is an programmer "shield" for the Teensy2. Solder on some headers, plug in your Teensy, flash it with the LUFA AVRISPMKII code, and you have a functional ISP programmer.
This also works as a Serial, SPI, and i2c breakout board, since those pins are brought out into convenient headers.
Put a jumper on the "PGM" pins, and you can use the ISP pins to flash program the teensy itself. Useful if you've lost your bootloader somehow.
The EAGLE board files are released under a Creative Commons Attribution-Share Alike 3.0 United States License.
| Attachment | Size |
|---|---|
| teensy-isp-shield.zip | 17.78 KB |
Comments
Hi, Laen- Cool idea. I
Hi, Laen-
Cool idea. I wouldn't mind having such a board.
Have you successfully used the LUFA code on a teensy 2 to program an AVR? I made a quick try at it a few weeks back and never got it to work with avrdude. I compiled the LUFA AVRISP code for atmega32u4 and set things in the makefile as I thought they should be and I got something which showed up on the USB as LUFA AVRISP MkII Clone Programmer. avrdude could find it and open it but failed in writing commands to the target chip (a 168).
I'm pretty sure I had all the signals wired up correctly and the target chip was in a carrier board I've used before to program chips so I think it was OK. So if you have it working, I'd love to see your makefile to get a working .hex for teensy 2.
Also, on your breakout board design, I think there may be a problem with the RST line. According to the docs in AVRISP.txt, you can't use the AVR /SS line for RST. In fact, the default in the makefile for the RST output is PB4 (see the RESET_LINE_* options in the makefile).
-Scott
Thanks for the tips!
I haven't tried it yet (mostly for want of a Teensy 2). I'll give it a shot with my Teensy++ and see what happens.
Thanks for catching that on the breakout design. I'll switch that to another pin.
..And I'll put a couple extras of the board in the February 2nd board order for you.
Nice! The
Nice!
The soon-to-be-released Arduino 0018 will include an AVRISP example. I tested it recently and it works great on Teensy (by only editing the 4 pin numbers, as SPI is on pins 10-13 on Arduino). Looks like it will work nicely with this little board.
Yes that one works
I tried the AVRISP sketch a little while back. I'm pretty sure it is the same one that paul mentioned. It works fine on a teensy 2 with only pin number changes to the code. But, IIRC, it does avrisp (not avrisp2) and is pretty bare bones. It works fine with avrdude in my trials but I wasn't able to get AVR Studio to use if (if that matters to you). The LUFA avrisp2 is supposed to work with AVR Studio and looks to be a more complete emulation so it might still be worth trying to get it to work on a teensy.
For most things, like loading a boot loader into a 168/328 via Arduino or avrdude, the avrisp sketch should do the job fine. It is a pretty simple way to use a teensy as a programmer, particularly with Laen's board to help with the wiring.