my USBasp programmer does not work but the one from ebay is working

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

my USBasp programmer does not work but the one from ebay is working

YuGiOhJCJ Mailing-List
Hello,

I am using an ebay USBasp programmer since several months but I would like to build my own USBasp for fun.
I build the firmware available in [1].
Then, I flash the memory of an ATMEL ATMEGA8 using avrdude and my ebay USBasp programmer.
After that, I follow the schematics available in [1].
Finally, I connect my USB cable and an other ATMEL ATMEGA8 to my breadboard then I try my new USBasp programmer.

When I connect my USBasp programmer I got this*:
[20334.276595] usb 2-1.5: new low-speed USB device number 12 using ehci-pci
[20339.367470] usb 2-1.5: New USB device found, idVendor=16c0, idProduct=05dc
[20339.367481] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[20339.367484] usb 2-1.5: Product: USBasp
[20339.367487] usb 2-1.5: Manufacturer: www.fischl.de

If I call avrdude I got this**:
avrdude: Warning: cannot query manufacturer for device: Connection timed out
avrdude: Warning: cannot query product for device: Connection timed out
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

avrdude done.  Thank you.

This is a photo of my breadboard:
http://yugiohjcj.free.fr/usbasp.jpg

I am wondering if you can guess what could be the problem.

Any idea ?

Thank you.
Best regards.

[1] http://www.fischl.de/usbasp/usbasp.2011-05-28.tar.gz

* sometimes I got some strange errors like this :
[22904.431625] usb 2-1.5: unable to read config index 0 descriptor/all
[22904.431631] usb 2-1.5: can't read configurations, error -110
but if I disconnect then reconnect the USB cable, these errors disappear.

** sometimes I got "Broken pipe" instead of "Connection timed out"

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: my USBasp programmer does not work but the one from ebay is working

YuGiOhJCJ Mailing-List
While checking again my wiring I found that C3 was connected to pin 6 of my ATMEL ATMEGA8 instead of pin 7.
After that, I try again to call avrdude and the green LED blinked one time!
It is the first time it happens.

In this case, that is what I see from avrdude output:
$ avrdude -p ATmega8 -c usbasp -U flash:w:main.hex
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.

But now, I am unable to blink again the green LED.
I came back to the first behavior from my previous message.
That is a bit weired that the behavior of my USBasp changes.

Anyway do you have suggestions in order to find some clues about the origins of this problem?

On Fri, 22 May 2015 19:10:23 +0200
YuGiOhJCJ Mailing-List <[hidden email]> wrote:

> Hello,
>
> I am using an ebay USBasp programmer since several months but I would like to build my own USBasp for fun.
> I build the firmware available in [1].
> Then, I flash the memory of an ATMEL ATMEGA8 using avrdude and my ebay USBasp programmer.
> After that, I follow the schematics available in [1].
> Finally, I connect my USB cable and an other ATMEL ATMEGA8 to my breadboard then I try my new USBasp programmer.
>
> When I connect my USBasp programmer I got this*:
> [20334.276595] usb 2-1.5: new low-speed USB device number 12 using ehci-pci
> [20339.367470] usb 2-1.5: New USB device found, idVendor=16c0, idProduct=05dc
> [20339.367481] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> [20339.367484] usb 2-1.5: Product: USBasp
> [20339.367487] usb 2-1.5: Manufacturer: www.fischl.de
>
> If I call avrdude I got this**:
> avrdude: Warning: cannot query manufacturer for device: Connection timed out
> avrdude: Warning: cannot query product for device: Connection timed out
> avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
>
> avrdude done.  Thank you.
>
> This is a photo of my breadboard:
> http://yugiohjcj.free.fr/usbasp.jpg
>
> I am wondering if you can guess what could be the problem.
>
> Any idea ?
>
> Thank you.
> Best regards.
>
> [1] http://www.fischl.de/usbasp/usbasp.2011-05-28.tar.gz
>
> * sometimes I got some strange errors like this :
> [22904.431625] usb 2-1.5: unable to read config index 0 descriptor/all
> [22904.431631] usb 2-1.5: can't read configurations, error -110
> but if I disconnect then reconnect the USB cable, these errors disappear.
>
> ** sometimes I got "Broken pipe" instead of "Connection timed out"
>
> _______________________________________________
> AVR-chat mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/avr-chat

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: my USBasp programmer does not work but the one from ebay is working

Rogier Wolff

> > This is a photo of my breadboard:
> > http://yugiohjcj.free.fr/usbasp.jpg

It looks as if you have "too many wires". This schematic should have
just the CPU, a couple of wires to USB and a few (4) wires going to
the target. Together with two zeners and a two resistors, I expect
about 12 wires in total. I'm seeing about 3 times too many.

        Roger.

--
** [hidden email] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
*-- BitWizard writes Linux device drivers for any device you may have! --*
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: my USBasp programmer does not work but the one from ebay is working

Martin Stejskal

Hi,
The real problem is capacitance on USB wires. Long story short: the USB cables should be short as possible since USB working at 12 MHz (at least USBasp).
Also 12 MHz crystal should be very close to AVR chip. Long wires make troubles :)
Regards
   Martin


> > This is a photo of my breadboard:
> > http://yugiohjcj.free.fr/usbasp.jpg

It looks as if you have "too many wires". This schematic should have
just the CPU, a couple of wires to USB and a few (4) wires going to
the target. Together with two zeners and a two resistors, I expect
about 12 wires in total. I'm seeing about 3 times too many.

        Roger.

--
** [hidden email] ** http://www.BitWizard.nl/ ** <a href="tel:%2B31-15-2600998" value="+31152600998">+31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
*-- BitWizard writes Linux device drivers for any device you may have! --*
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: my USBasp programmer does not work but the one from ebay is working

YuGiOhJCJ Mailing-List
In reply to this post by Rogier Wolff
On Sat, 23 May 2015 18:05:50 +0200
Rogier Wolff <[hidden email]> wrote:

>
> > > This is a photo of my breadboard:
> > > http://yugiohjcj.free.fr/usbasp.jpg
>
> It looks as if you have "too many wires". This schematic should have
> just the CPU, a couple of wires to USB and a few (4) wires going to
> the target. Together with two zeners and a two resistors, I expect
> about 12 wires in total. I'm seeing about 3 times too many.
>

Really? I was not aware that the number of wires matters.
I will check how I can reduce the number of wires on my breadboard.

Anyway, I was maybe lucky but I have just successfully done a circuit using a lot of useless wires here:
http://yugiohjcj.free.fr/elec-vusb-led-1.jpg
http://yugiohjcj.free.fr/elec-vusb-led-2.jpg

It is an USB connected breadboard that is controlled by a program on the computer [1, 2].
I can switch on or switch off the LED.

So it works here with this project but it does not work with the USBasp project?

[1] https://www.youtube.com/watch?v=iA15vqa0Rk8
[2] http://www.wzona.info/2012/10/usb-duomenu-perdavimas-atmega.html

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: my USBasp programmer does not work but the one from ebay is working

YuGiOhJCJ Mailing-List
In reply to this post by Martin Stejskal
Really interesting! So, there is a relationship between my problem and the length/number of wires.
I have a fixed length of all my wires: about 8cm (this value corresponds to half of my breadboard width).
The advantage of this length is that I can reach components that are far and components that are near (so it is more reusable).

That is a big constraint to work at 12 Mhz if it requires to have a limited length/number of wires.
I will try to reduce the number of wires and if it does not work, I will not have the choice: I will create shorter wires (specific for this circuit, so less reusable).

I have just successfully done a circuit using a lot of useless wires here:
http://yugiohjcj.free.fr/elec-vusb-led-1.jpg
http://yugiohjcj.free.fr/elec-vusb-led-2.jpg
It is an USB connected breadboard that is controlled by a program on the computer [1, 2].
I can switch on or switch off the LED.
In this case, I have no problem... Do you know why I have problems with the USBasp project and not with this one?

[1] https://www.youtube.com/watch?v=iA15vqa0Rk8
[2] http://www.wzona.info/2012/10/usb-duomenu-perdavimas-atmega.html

> Hi,
> The real problem is capacitance on USB wires. Long story short: the USB
> cables should be short as possible since USB working at 12 MHz (at least
> USBasp).
> Also 12 MHz crystal should be very close to AVR chip. Long wires make
> troubles :)
> Regards
>    Martin
>
> > > This is a photo of my breadboard:
> > > http://yugiohjcj.free.fr/usbasp.jpg
>
> It looks as if you have "too many wires". This schematic should have
> just the CPU, a couple of wires to USB and a few (4) wires going to
> the target. Together with two zeners and a two resistors, I expect
> about 12 wires in total. I'm seeing about 3 times too many.
>
>         Roger.
>

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: my USBasp programmer does not work but the one from ebay is working

David B. Gustavson
Actually, inductance of the wires is also a potential problem.

With today's fast circuitry, wires should be kept as short as possible.

For some circuits, even using those breadboards is impractical.

Even 25 years ago I recall working with a circuit that would fail before
one wire got up to one inch (but that was at 250MHz).

The breadboard technique then was to mount the ICs upside down on solid
copper circuit board, and run wires as directly as possible and keeping
them as close as possible to the copper. Capacitors had to have
especially short leads. But for really fast chips you had to have
multilayer boards with narrow conductors carefully spaced in buried
layers.

So, long convenient wires are really asking for trouble. Wires are
inductors with capacitors between them and everything else, as well as
being resistors. They are components.

Dave


On Sun, May 24, 2015, at 10:33 AM, YuGiOhJCJ Mailing-List wrote:

> Really interesting! So, there is a relationship between my problem and
> the length/number of wires.
> I have a fixed length of all my wires: about 8cm (this value corresponds
> to half of my breadboard width).
> The advantage of this length is that I can reach components that are far
> and components that are near (so it is more reusable).
>
> That is a big constraint to work at 12 Mhz if it requires to have a
> limited length/number of wires.
> I will try to reduce the number of wires and if it does not work, I will
> not have the choice: I will create shorter wires (specific for this
> circuit, so less reusable).
>
> I have just successfully done a circuit using a lot of useless wires
> here:
> http://yugiohjcj.free.fr/elec-vusb-led-1.jpg
> http://yugiohjcj.free.fr/elec-vusb-led-2.jpg
> It is an USB connected breadboard that is controlled by a program on the
> computer [1, 2].
> I can switch on or switch off the LED.
> In this case, I have no problem... Do you know why I have problems with
> the USBasp project and not with this one?
>
> [1] https://www.youtube.com/watch?v=iA15vqa0Rk8
> [2] http://www.wzona.info/2012/10/usb-duomenu-perdavimas-atmega.html
> > Hi,
> > The real problem is capacitance on USB wires. Long story short: the USB
> > cables should be short as possible since USB working at 12 MHz (at least
> > USBasp).
> > Also 12 MHz crystal should be very close to AVR chip. Long wires make
> > troubles :)
> > Regards
> >    Martin
> >
> > > > This is a photo of my breadboard:
> > > > http://yugiohjcj.free.fr/usbasp.jpg
> >
> > It looks as if you have "too many wires". This schematic should have
> > just the CPU, a couple of wires to USB and a few (4) wires going to
> > the target. Together with two zeners and a two resistors, I expect
> > about 12 wires in total. I'm seeing about 3 times too many.
> >
> >         Roger.
> >
>
> _______________________________________________
> AVR-chat mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/avr-chat

_______________________________________________
AVR-chat mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avr-chat
Loading...