Is USBtinyISP flaky with Linux?

I purchased a PGM-09231 aka USBtinyISP AVR programmer.

I’m using it with Linux. (Kubuntu 9.04)

If you plug it straight into the PCs USB port it doesn’t show up with lsusb.

If you plug it in via a hub it does show up.

Bus 001 Device 020: ID 1781:0c9f Multiple Vendors

Ok. I can live with that.

Now it does work- I can program my atmega328p device and get a good verify on the flash.

But it doesn’t work reliably. I typically need to run avrdude 3-5 times before I get an error free run.

avrdude: error: usbtiny_transmit: error sending control message: Broken pipe

avrdude: verification error, first mismatch at byte 0x0001

0x94 != 0x90

avrdude: error: usbtiny_send: error sending control message: Connection timed out (expected 64, got -110)

and more things of that ilk…

I have tried:

  1. providing the target with it’s own power

  2. going from -B 1 to -B 32 for avrdude (SCK timing)

…but I have been unable to get reliable operation.

Does anybody have any handy hints or do I need to buy a better programmer?

Thanks,

Jason H.

I upgraded from avrdude 5.5 to 5.8

They’ve added installed support for the atmega328p in avrdude.conf - That’s good.

The changelog indicates that they have tried to make the code more robust in its dealings with the USBtinyISP. That’s good.

But it still doesn’t work properly. I can’t get a good burn.

With my code size getting bigger now (all of 700 bytes) my chances of a good burn and verify have fallen to around 0.

Given that you can slow down the SPI side of USBtinyISP to a slow crawl by using the -B parameter, and it still fails, I tend to blame the soft USB implementation for my woes.

Jason H.

In one of the product comments somebody pointed out the design had no 3.6v zener diodes to clamp the USB data lines to the required voltage.

This seems like a good idea: http://vusb.wikidot.com/hardware

and indeed the original USBTinyISP has these diodes.

I tried this by hacking a couple of zeners into the USB cable but it hasn’t fixed the problem. :frowning:

Bugger.

Jason H.

Hold the phone.

When I plug it into the PC directly (no hub) it now recognizes the device

and can program the flag of the atmega328p with a good verify.

I tested with a random 32K *.bin file.

No complaints and a good verify.

So the 3.6V zener diodes on the data lines do make a difference.

Not sure why it doesn’t work with the hub…

Sparkfun hardware weenies- you need to spin the board and get some zeners in there. :slight_smile:

Jason H.

Details of mod:

I added zener diodes to clamp the USB data lines. These were present on the USBTinyISP design but had been left out on the AVR programmer. Hacking the board was too fiddly, so I cut the cable and added them there instead.

Before: Board not seen by USB host controller when plugged directly into PC.

After: Board correctly recognized and working.

http://www.mibot.com/files/usb_mod.pdf