I used to use a USBtinyISP, until that broke.
Then, I got a Pololu programmer, which worked fine for 5V, but not for 3.3V.
Then, I got an actual AVRISPv2 from Digi-Key, which could do both.
But, today both of them stopped working, coincidentally (?) after I had them hooked up to a board that has my new H-bridge connected (which in turn is connected to a motor.)
I tried both of them with avrdude from the command line, on a plain Atmega328p on a plain Uno R3 board with nothing connected, and they still fail. The ISPv2 is telling me all three tests fail (MOSI, RST, SCK) and that the connector is inserted wrong, no matter which way I attach it.


I can only assume that the problem is that spikes/transients on the power line from the motors are frying the programmers. It's kind-of weird, though, because this is pretty well filtered. There's a 1 uF ceramic across the input, which comes from a 2S LiPo. This branches off to the H-bridge and motor, and to an LM350 regulator. Out from the regulator is 6" power cables, that enter the AVR board to a 10 uF tantalum electrolytic. The AVR itself is further de-coupled with a 0.1 uF ceramic, and the analog voltage has another 1 uF ceramic across it (although on the other end of a 1 uH inductor.) So I kind-of wonder how those spikes could really make it to the AVR and ICSP header, but that's the best theory I have to go on.


Of course this happens a Friday night, and Jameco is closed over the week-end, and it's too late to order Saturday delivery from Amazon (or Digi-Key or whatever). I actually have enough parts at home that I could build a USBtiny -- if only I could program it! So, I find myself stranded without a programmer again :-( Perhaps I'll pick up a fresh Uno from Radio Shack and hot-wire that...


So, when I get/make my next programmer, what should I do to protect it? TVS-es across power/ground, as well as each signal line? An additional Zener across 5V on the AVR board? Any other ideas?