[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: |
Mon, 5 Aug 2013 08:23:12 +0200 |
On Mon, 05 Aug 2013 00:41:35 -0400
Ormund Williams <address@hidden> wrote:
> On Sat, 2013-08-03 at 05:30 +0200, YuGiOhJCJ Mailing-List wrote:
> > Block Poll Page
> > Polled
> > Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW
> > MaxW ReadBack
> > ----------- ---- ----- ----- ---- ------ ------ ---- ------
> > ----- ----- ---------
> > eeprom 65 6 4 0 no 128 4 0
> > 4000 4500 0xff 0xff
> > flash 65 6 32 0 yes 2048 32 64
> > 4500 4500 0xff 0xff
> > signature 0 0 0 0 no 3 0 0
> > 0 0 0x00 0x00 <----XXX
> > lock 0 0 0 0 no 1 0 0
> > 9000 9000 0x00 0x00
> > lfuse 0 0 0 0 no 1 0 0
> > 9000 9000 0x00 0x00
> > hfuse 0 0 0 0 no 1 0 0
> > 9000 9000 0x00 0x00
> > efuse 0 0 0 0 no 1 0 0
> > 9000 9000 0x00 0x00
> > calibration 0 0 0 0 no 2 0 0
> > 0 0 0x00 0x00
> >
> > Programmer Type : usbasp
> > Description : USBasp, http://www.fischl.de/usbasp/
> >
> > avrdude: error: programm enable: target doesn't answer. 1
> > avrdude: AVR device initialized and ready to accept instructions
> >
> > Reading | ################################################## | 100% 0.00s
> >
> > avrdude: Device signature = 0x000000
> > avrdude: Yikes! Invalid device signature.
> > Double check connections and try again, or use -F to override
> > this check.
> >
> >
> > avrdude done. Thank you.
> >
> > But as you can see I got some errors.
> > Do you see the problem ?
>
> Looking back at all the avrdude messages you have shown, it seems that
> the usbasp has never made a connection with the tiny2313, the
> 'signature' has always come back as 0x0000. You have one or more of 3
> problems:
> 1, The wiring you have may not be correct. In a previous
> message you showed how you connected the usbasp to the tiny2313,
> it is correct but you need to confirm that you have pin1 correct
> (see attachment), the wires are short, less than 300mm and
> making good contact.
>
> 2, The tiny2313 comes with the 8MHz internal RC oscillator and
> the
> CKDIV8 fuse enabled, that means that the tiny2313 is running at
> 1MHz therefore the maximum SCK clock must be less than 250kHz,
> according to the documentation:
> http://www.fischl.de/usbasp/Readme.txt the SCK frequency is
> 375kHz unless you set the internal SCK jumper of the usbasp, you
> will have to open it to do that.
>
> 3, The usbasp is broken. Replace, with something better.
>
> Regards.
>
> --
> Ormund
I have 3 questions (A, B and C).
A) Thank you for the image.
I can see on your image that I am using the cable correctly.
Indeed, I put the coloured part at the top, so the pin 1 and 2 are at the top.
But I can see on your image that we see the back of the connector (the part
without the holes where we plug the pins).
That's not what I am doing.
Indeed, I am watching the connector in front of me, so the pin 1 and 2 are
reversed when I am using it.
You can watch in the attached usbasp_connector_2_small.png file what I am doing.
Am I wrong ?
B) Using your way to do (taking the connector from the back instead of from the
front), I can use avrdude 5.11.1:
---
$ sudo 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.
---
Using your way to do (taking the connector from the back instead of from the
front), I can use avrdude 5.2:
---
$ sudo avrdude -p t2313 -c usbasp -U flash:w:main.hex
avrdude: error: programm enable: target doesn't answer. 1
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0xffffff
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
---
So you can see the avrdude device signature has changed: 0xffffff (instead of
0x000000).
Do you understand why ?
You can watch in the attached usbasp_microcontrolleur.png file what I am doing.
C) You say that there is a problem about the SCK frequency.
Instead of open the usbasp to resolve this problem, what do you think about
changing the internal RC oscillator of my attiny2313 ?
Indeed, if I put a component between the XTAL2 and XTAL1 pins (pins 4 and 5) of
my attiny2313 it may resolve the problem.
This solution should avoid to open the programmer.
usbasp_connector_2_small.png
Description: Binary data
usbasp_microcontrolleur.png
Description: Binary data
- Re: [avr-chat] how to connect USBasp to attiny2313, (continued)
- Re: [avr-chat] how to connect USBasp to attiny2313, YuGiOhJCJ Mailing-List, 2013/08/02
- Re: [avr-chat] how to connect USBasp to attiny2313, Andreas Graebe, 2013/08/02
- Re: [avr-chat] how to connect USBasp to attiny2313, YuGiOhJCJ Mailing-List, 2013/08/02
- Re: [avr-chat] how to connect USBasp to attiny2313, Ormund Williams, 2013/08/02
- Re: [avr-chat] how to connect USBasp to attiny2313, YuGiOhJCJ Mailing-List, 2013/08/02
- Re: [avr-chat] how to connect USBasp to attiny2313, Ormund Williams, 2013/08/02
- Re: [avr-chat] how to connect USBasp to attiny2313, YuGiOhJCJ Mailing-List, 2013/08/02
- Re: [avr-chat] how to connect USBasp to attiny2313, Ormund Williams, 2013/08/05
- Re: [avr-chat] how to connect USBasp to attiny2313,
YuGiOhJCJ Mailing-List <=
- Re: [avr-chat] how to connect USBasp to attiny2313, Ormund Williams, 2013/08/05
- Re: [avr-chat] how to connect USBasp to attiny2313, YuGiOhJCJ Mailing-List, 2013/08/07
- Re: [avr-chat] how to connect USBasp to attiny2313, Schwichtenberg, Knut, 2013/08/08
- Re: [avr-chat] how to connect USBasp to attiny2313, YuGiOhJCJ Mailing-List, 2013/08/08
- Re: [avr-chat] how to connect USBasp to attiny2313, Ormund Williams, 2013/08/08
- Re: [avr-chat] how to connect USBasp to attiny2313, YuGiOhJCJ, 2013/08/09
- Re: [avr-chat] how to connect USBasp to attiny2313, Ormund Williams, 2013/08/09