USB programmer

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i am new to avr...
i wanted to know how i could make my own USB programmer.
i have seen many USB programmer circuits...but they all use costly FTDI chips for serial to USB conversion.
can anyone suggest a cheaper alternative??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Look at Lady Ada's programmer, it uses an AVR to bit-bang the USB bus.

It would be a very fine, cheap programmer if it didn't randomly drop off of the USB bus, needing to be unplugged then plugged back in. Sometimes I can program ten times in a row, sometimes I have to reconnect it each time. I haven't been able to find a pattern.

If you can get past that, it's very good for the money. And should, in any case, give you a good direction.

And, are the FTDI chips really that expensive? I thought they were only $6 or $7, but it's been a while since I've bought one - my memory may be failing me.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gluteal-Cleft wrote:
It would be a very fine, cheap programmer if it didn't randomly drop off of the USB bus, needing to be unplugged then plugged back in. Sometimes I can program ten times in a row, sometimes I have to reconnect it each time. I haven't been able to find a pattern.
I had similar problems after upgrading my Linux kernel a few months ago. As it turns out it was the CONFIG_USB_SUSPEND feature of the uhci driver. It's still classified as experimental but most distributions seem to enable it these days. Anyway, usbtiny doesn't handle that.

Recompiling the kernel and turning CONFIG_USB_SUSPEND off solved the problem for me.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Interesting. I've only used it under Windows. She says that only certain machines have problems, but I've had problems under every machine I've tried it on. I'll have to give it a shot under Linux.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
i have seen many USB programmer circuits...but they all use costly FTDI chips for serial to USB conversion.

They aren't that expensive are they ? The USB protocoll is nasty, so using a µC to replicate it's behavios is not prefered. you'd violate it in oh so many ways

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gluteal-Cleft wrote:
Look at Lady Ada's programmer, it uses an AVR to bit-bang the USB bus.

It would be a very fine, cheap programmer if it didn't randomly drop off of the USB bus, needing to be unplugged then plugged back in. Sometimes I can program ten times in a row, sometimes I have to reconnect it each time. I haven't been able to find a pattern.

actually i think i did find the problem, i was using 3.3v zeners and i believe that 3.6v ones dont have this issue. you should check to see which ones you've got!

Interesting projects: www.ladyada.net Unique kits: www.adafruit.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gluteal-Cleft wrote:
Interesting. I've only used it under Windows. She says that only certain machines have problems, but I've had problems under every machine I've tried it on. I'll have to give it a shot under Linux.

i have a few windows machines, and on them i've literally programmed -hundreds- of chips in a row (for kits) without having to unplug-replug...sadly im the worst ever at USB protocol analysis so its been a real PITA to figure out what the deal is. ill take a look at the SUSPEND stuff.

Interesting projects: www.ladyada.net Unique kits: www.adafruit.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ladyada wrote:

actually i think i did find the problem, i was using 3.3v zeners and i believe that 3.6v ones dont have this issue. you should check to see which ones you've got!

Right on. I'll give it a check in a few days when things have calmed down!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ladyada wrote:
actually i think i did find the problem, i was using 3.3v zeners and i believe that 3.6v ones dont have this issue.

FWIW I noted this when researching a similar implementation:

I wrote:

The reason for using 3.6V diodes rather than 3.3V diodes is apparently to do with the current/voltage curve characteristics of the device—for the current present on the data lines 3.6V diodes deliver the 3.3V required. (source)

This was based on my understanding of others discussing the issue. Just in case anyone was wondering why the change of diodes would make a difference... :-)

--Phil.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i checked out the programmer...
ladyada says it has some problems with 64 bit machines...
is it so???

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think the problem is with 64bit operating systems, and not with 64bit machines. So if you're willing to go back to a 32bit OS, then it'll be fine.