first time

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
strombezahler
 
Posts: 5
Joined: Wed Apr 09, 2008 12:25 pm

first time

Post by strombezahler »

Hello all!
I've just assembled my UsbtinyISP programmer. Now, how can I program my mega16? I have no developing board and I have no intention of buying it. I tried to wire the 6-pin connector to the protoboard with mega16 (according to some shematic found on this forum) but I get RC=-1 error. I'm not using external XTL and no external power supply (I guess this is no go).
I'm total newb in this programing busines. If anyone could be so kind to explain me what (and how) I need to do.

Much apreciated!

Thank you.

Hazard
 
Posts: 196
Joined: Tue Oct 30, 2007 7:27 am

Post by Hazard »

You should get a crystal and stick it to mega16. If your mega16 is fresh, as: never touched like it came from factory, you won't need a crystal. But if by any reason the fuses are programmed to use a crystal, it is already there :P
And you can get the power to mega16 from usbtinyisp.

strombezahler
 
Posts: 5
Joined: Wed Apr 09, 2008 12:25 pm

Post by strombezahler »

Yes, it's fresh from the store, my little BANNED. :wink: I just don't know how to hook it up to the programmer.

Hazard
 
Posts: 196
Joined: Tue Oct 30, 2007 7:27 am

Post by Hazard »

Look at the pin names in the programmer conector. Look at the pins with the same names in the mega16 datasheet.
Connect the pins with the same name :P
Image
(The pin position in that conector is not correct, look at ladyadas schematic instead)
Image
Make sure you set USBtinyISP to provide 5V, if don't power your mega16 externaly.

strombezahler
 
Posts: 5
Joined: Wed Apr 09, 2008 12:25 pm

Post by strombezahler »

Aha, thanks! What about the oscilator, should I ground those pins or leave them open?

ps. Where can I find the schematics?

tnx

Zero
 
Posts: 30
Joined: Thu Jul 12, 2007 3:47 am

Post by Zero »

First off check out: http://www.evilmadscientist.com/article ... rgetboards

And you should probably not tie unused pins to ground unless you have a damn good reason or you read somewhere in a whitepaper or datasheet that you need too. Leaving the pins unconnected (floating) is perfectly fine for what I know. Of course if you are in fact leaving pins unconnected then you are actually just wasting perfectly good pins, which means you should do things like add meaningless LED status lamps that don't really indicate anything in particular or buttons that when pressed have no practical correlation or function to your application. Using those really bright blue LED's that BANNED with your eyes when you look at them gets you industry bonus points, especially if you move to Korea.

If you are still having problems getting your JTAG to work I'll tell you right now with 99% certainty your pin configuration is incorrect. Depending on what direction you have your pins coming at you you may have totally reversed your configuration from the schematics you are reading. It seems quite a few beginners tend to end up with the pins flipped lengthwise across the connector (ie MISO and VCC flipped). Just remember this, the red line indicates VCC (+), so at the least you know VCC is on that end. If you actually installed the cable incorrectly and you have VCC and Ground reversed then your chip will get real hot real fast. If that's the case disconnect it immediately. Checking things out with a multimeter to determine which end is positive and which is negative beforehand is always a good idea. Multimeters can also be incredible sources of fun if placed in the wrong hands. Ever wondered how resistive a cubic centimeter of peanut butter is? Well now is your chance to find out. Those probes are sharp so be sure and ask an adult to help you. Also, never run with un-sleeved probes.

If you've shuffled your pins around a billion times and still can't get it to work it is perfectly possible the programmer was improperly built or damaged. Double check your connections, and remember that IC's and micro controllers can be damaged by static, moisture, hammers, swords, guns, and molten lava; but are immune to poison and curse as long as your fuse bits are set properly. Please avoid building your circuit in the middle of the open rain forest, under the ocean, or on the surface of the sun.

strombezahler
 
Posts: 5
Joined: Wed Apr 09, 2008 12:25 pm

Post by strombezahler »

:lol: Thanks for your post! I was wondering about those pins on the connector. But I think I got it alright, the red line matches the one with 10 pins (which came prebulit in the package). All I need is to make a target board like the one in your link. I'll get to it today, hope I can make it. :roll:

Thanks again for your useful (and funny) post. 8)

cheers!

Zero
 
Posts: 30
Joined: Thu Jul 12, 2007 3:47 am

Post by Zero »

I just re-read your above post, do you mean you are using an external crystal oscillator? If that is the case then you do in fact need to ground it AND ballast with capacitors. If you are not using an external oscillator then you do not need to ground the clock input pins (XTAL 1 and XTAL 2). Sorry, I hope I did not mislead you.

strombezahler
 
Posts: 5
Joined: Wed Apr 09, 2008 12:25 pm

Post by strombezahler »

No prob, I'm not total newb to electronics - just to programming this damn things.

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

Return to “USBtinyISP”