avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] how to connect USBasp to attiny2313


From: YuGiOhJCJ Mailing-List
Subject: Re: [avr-chat] how to connect USBasp to attiny2313
Date: Fri, 2 Aug 2013 08:53:02 +0200

On Fri, 02 Aug 2013 08:31:14 +0200
Andreas Graebe <address@hidden> wrote:

> Am Freitag, den 02.08.2013, 07:22 +0200 schrieb YuGiOhJCJ Mailing-List:
> > Hello,
> > 
> > I have just bought a USBasp programmer [1] to program an ATMEL attiny2313 
> > micro-controller [2].
> > I would like to use avrdude to program my micro-controller.
> > 
> > On [1] I can see the schematic of USBasp whereas in [2] I can see the 
> > schematic of attiny2313.
> > But it is not enough because I can't guess how to link the 10 pins of 
> > USBasp with the 20 pins of attiny2313.
> > I can see the VCC and the GND in each of them, so I can imagine that I must 
> > link like this:
> > 
> > USBasp -> attiny2313
> > ---
> > VCC (2) -> VCC (20)
> > GND (10) -> GND (10)
> > ---
> > 
> > But I am not sure.
> > How to know what to do with the 8 other pins of USBasp ?
> > 
> > Thank you.
> > Best regards.
> 
> Hi, that's very simple. As you see in the datasheet, /Reset is on pin 1,
> SCL on 19, MISO on 18, MOSI on 17.
> 
> It is very important that the controller ha a clock signal. By default,
> it is the internal oscillator, with a prescaler by 8. So you have to set
> your programmer to "slow clock" propably.
> If you want to change the clock source, you have to change the
> fuse-bits. This could be a trap; if you set them in a wrong way, the
> controller needs propably an external clock.
> 
> A very good site for the programming of fuse-bytes is
> http://www.engbedded.com/fusecalc they generate the code to change the
> fusebits for avrdude.
> 
> I wish you good luck. Have fun.
> 
> -- 
> Mit freundlichen Grüßen / kind regards
> Andreas Graebe
> 
> 

Yes, in the datasheet we can see for example RST is on pin 1.
But I was wondering how to know the corresponding pin in for the programmer.
It seems to be the pin 5 if we watch this document [1].
So, this problem is resolved now.
But I am wondering now why avrdude output this message:
$ avrdude -p t2313 -c usbasp -U flash:w:main.hex
avrdude: warning: cannot set sck period. please check for usbasp firmware 
update.
avrdude: error: programm enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Do you see the problem ?

[1] 
http://www.atmel.com/images/atmel-2521-avr-hardware-design-considerations_application-note_avr042.pdf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]