What needs to be connected on a 32u4 to program with USBTiny?

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
vputz
 
Posts: 79
Joined: Mon May 03, 2010 5:43 am

What needs to be connected on a 32u4 to program with USBTiny?

Post by vputz »

I made a minimal board to program the good old 328P, and I didn't need anything more than a 6-pin header and a ZIF socket.

But now my kit needs a 32u4; I'd like to ship people a board with a programmed 32u4 on it and all the other components they can add themselves. But I'm having a devil of a time doing this. I've successfully programmed the 32u4 with the USBTiny twice before, but the boards were completely made up. So I'm not sure what needs to be on board for the thing to work... and once again I've got a prototype made up, and all the right pins seem to be connected, and USBTiny is pouting. I tried adding a 16MHz crystal, and still get the "initialization failed, rc=-1" message.

I think eventually I'm headed for a pogopin-based solution where the fresh board sits on a pin array with all the relevant bits connected, but this is excruciating... between solder bridges and programming troubles, this project will never be profitable unless I get my build process much much more reliable.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: What needs to be connected on a 32u4 to program with USBTiny?

Post by adafruit_support_mike »

To program a chip from the ICSP interface, you need the programmer and a chip. The programmer supplies all the necessary support hardware, and the blank microcontroller just sits there and accepts the signals the programmer sends it.

If you need to program or reprogram the chip after you've built it into your circuit, that's where you throw in a set of ICSP pins like the 2x3 stand of pin header on an Arduino, a set of vias you can set on pogo pins, or just a set of pads you can press needles into.

User avatar
vputz
 
Posts: 79
Joined: Mon May 03, 2010 5:43 am

Re: What needs to be connected on a 32u4 to program with USBTiny?

Post by vputz »

So just to confirm, you're saying the 32u4 does NOT need any support hardware (like a crystal, etc)--it should be programmable solely through the 6-pin ICSP header connected to the USBTiny? Sorry to seem so dense; I'm having a devil of a time diagnosing this silly thing. The connections look good and seem to test well with a multimeter, but I keep getting this -1 error, and I don't want to populate any more of the board than I need to until at least the programming seems to work OK.

User avatar
vputz
 
Posts: 79
Joined: Mon May 03, 2010 5:43 am

Re: What needs to be connected on a 32u4 to program with USBTiny?

Post by vputz »

Uh, just to return to this topic... you TOTALLY need a crystal to program the 32u4 with an ISP, at least the ones I got from Farnell. I tried programming just connecting the 6-pin ISP header to the USBTiny via pogopins, 100% failures... I added pogos to connect a crystal+caps in the pogopin test jig... 100% successes. Maybe if you know more AVRDude-fu than I you could program the fuses to work, but all I can say is this worked for me.

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”