Standalone AVR ISP Programmer Shield Kit Question

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
charlies1
 
Posts: 9
Joined: Fri Apr 04, 2014 10:44 pm

Standalone AVR ISP Programmer Shield Kit Question

Post by charlies1 »

Hello!

I just ordered the Standalone AVR ISP Programmer Shield Kit, and I was wondering -

Is there a way I can use the ZIF socket to accommodate other Atmel micro-controllers?

This may be a totally stupid question...but would there be a way to wire differently to be able to program the ATTiny2313?

The reason I ask is I have been having some trouble with the MiniPOV3 kit, and seeing as I will have both of these kits, I was wanting to eliminate the need for my USB to Serial converter that I've purchased as I'm unsure that it's working properly with connecting to the MiniPOV3.

So, I thought maybe I could re-write some code and re-wire the shield kit to accept an ATTiny2313, then load it with the proper program?

I'm relatively new to hobby electronics so please be kind! Thank you

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

Re: Standalone AVR ISP Programmer Shield Kit Question

Post by adafruit_support_mike »

We have a strict "be excellent to each other" policy here, and a community with lots of people who enjoy being beginner-friendly. ;-)

The general answer to your question is, "yeah, that should work." The ZIF socket will accept any chip with the correct number of pins (equal to or less than the number of slots), and all members of the Atmel AT family program pretty much the same way.

You'd need to adjust the MOSI/MISO/etc connections to work for an ATtiny2313 and compile the appropriate firmware to load onto it, but it's very doable.

For a good resource on ATtiny2313 programming, check out Evil Mad Scientist Labs: http://www.evilmadscientist.com/?s=atti ... mit=Search They do a lot of bare-metal microcontroller programming, and the '2313 is one of their favorite chips. The link goes to a search page with three or four items that will probably be relevant to what you're trying to do.

User avatar
charlies1
 
Posts: 9
Joined: Fri Apr 04, 2014 10:44 pm

Re: Standalone AVR ISP Programmer Shield Kit Question

Post by charlies1 »

Hi,

Thank you for the quick reply and for the great link.

So, from what I can tell, I'll just need to compare the two pin-outs for the ATTiny2313 and the ATMega328, then solder in a few jumper wires to make sure that SCK, MOSI/MISO, GND, Vcc, and RESET are all wired correctly - similar to what they've done at Evil Mad Scientist Labs to convert their version of the ISP kit to be able to program an ATTiny45/ATTiny85, shown in this instructable: http://www.evilmadscientist.com/2012/ha ... -attiny85/

I'm hoping this isn't outside the scope of my abilities as far as the programming goes, but I will definitely come back with more questions once my kit comes in. First question that I can already think of though - if I wire up some jumpers, similar to what was shown in the instructable, will the function of the ISP kit be preserved for the ATMega328 still? I'd like to say yes, as the only pins used for programming are the ones I listed above, correct? The others can be wired up extraneously and nothing would happen?

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

Re: Standalone AVR ISP Programmer Shield Kit Question

Post by adafruit_support_mike »

It would be a good idea to change the jumpers when you change between chips with different pinouts.

I can't say for certain that leaving the unused connections would cause problems, but also can't say it would work. Chips are only guaranteed to work for the operating conditions specified in the datasheet, and their behavior under other conditions is undefined. It's generally a good idea to stick to the official standards unless you have a solid reason to do something else.

The good news is that adding and removing jumpers is easy, and good soldering practice.

User avatar
charlies1
 
Posts: 9
Joined: Fri Apr 04, 2014 10:44 pm

Re: Standalone AVR ISP Programmer Shield Kit Question

Post by charlies1 »

OK, great, thank you for the response! I will keep that in mind. I think I might just solder in some headers so I can easily swap a few jumper wires in and out whenever I want to.

In regards to your comment below:
adafruit_support_mike wrote: You'd need to adjust the MOSI/MISO/etc connections to work for an ATtiny2313 and compile the appropriate firmware to load onto it, but it's very doable.
What else can you tell me about compiling the appropriate firmware? Where would I start in order to do that?

Thanks in advance!

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

Re: Standalone AVR ISP Programmer Shield Kit Question

Post by adafruit_support_mike »

The main challenge is getting what's called the 'toolchain' worked out. That's the collection of programs that turn your code into something that can run on a specific microcontroller. There are several steps in the process, so each tool in the chain passes information along to the next.

If you're working with Atmel microcontrollers, the two main options are Atmel Studio (from the makers of the chip) and 'avrdude' (Free/Open software). Each has a complete set of tools that know how to talk to each other, along with all the libraries and "here's how to talk to the chip" information the compiler needs to do its job. The Aduino IDE is built around a version of avrdude tuned for the ATmega chips found in the Arduino.

To tell the truth, you'll find better and more up-to-date information about programming non-Arduino microcontrollers over at http://www.avrfreaks.net/ That's a community of people who program Atmel microcontrollers in general, so they know the latest tools and techniques for working with the whole range of chips.

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

Return to “Arduino Shields from Adafruit”