SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on the software and hardware for Atmel's STK standard.
By tclem1080
#75454
I'm trying to use Sparkfun's Pocket AVR Programmer(PGM-09231) on a macbook pro (running os x 10.5.7) and I can't seem to get the device to be recognized by os x.

The output of ls /dev does not change between plugging and unplugging the device. When I run UsbProber I can see the device try to attach to the system, but it fails with this message:

"The IOUSBFamily was not able to enumerate a device."

A google search brought about many results of people having issues with USBtiny programmers and mac osx including some links to updated firmware for the programmers. Does sparkfun have a firmware update for this programmer? Or is there something else missing?

BTW. I have crosspack installed and am using avrdude 5.6, but I think the problem is that the device isn't available to anyone on the system yet.

* UPDATE. I moved to another mac in the house (2001 Dual 1.8 G5 - PPC) and have had much better luck. The differences were immediate. When plugging in the programmer the blue LED and the red stat1 LED both lit up (on the latoptop, on the blue LED was coming on). avrdude seemed much happier and was able to communicate with the board first try.

I would still love to have this work on my macbook pro as it is my main development machine. Any ideas?

A few notes on the differences between the two machines:
- the macbook pro is an intel processor (the g5 is obviously ppc)
- both computers are running 10.5.7 so I don't think its an os issue unless the usb ports work differently on an intel machine
- Could it be that the macbook pro doesn't have enough power on its usb ports compared to the desktop machine?
By superbatfish
#75463
I'm having the same trouble, and seeing the same error with USB Prober. I tried it on my house mate's mac as well (also Intel-based) with the same results.

When I tried to get it working on my other house mate's PC, the OS didn't recognize the device as a USBTiny (or anything for that matter) and did not prompt me with a Hardware Installation Wizard, so I couldn't install the Windows usbtiny driver.

I don't have access to any PPC-based Macs to see if I can reproduce your success with those models.

By the way, when I plug in my programmer, the blue power LED turns on, but the other LEDs stay dark. What is the normal behavior?
User avatar
By leon_heller
#75468
Some devices like that (the AVR Dragon I have springs to mind) take a lot of current and often require a powered hub. Mine works OK with an non-powered hub, although Atmel doesn't recommend it.

Leon
By superbatfish
#75470
Thanks for the tip, but I don't think that power is the issue. This problem occurs even when the programmer is not connected to the microcontroller -- it's connected only to my computer via USB. (It's plugged directly to the computer, not an external hub or keyboard, so the USB port should be sufficiently powered.)
By tclem1080
#75476
superbatfish wrote: By the way, when I plug in my programmer, the blue power LED turns on, but the other LEDs stay dark. What is the normal behavior?
On my PPC G5 normal behavior is as follows:
1. When you first plug the programmer in, the blue power LED lights up and the red stat1 LED lights up
2. When you connect to actually program a chip, the second red stat2 LED flashes during the programming process.
By tclem1080
#75479
Ok. I'm getting closer to what the problem is. I took the keyboard off my G5 (which is a USB 1.1 device and has a hub for 2 extra connections on it) and plugged it into my macbook pro. I then plugged the usb avr programmer into the keyboard hub and everything worked! So the problem seems to be that the avr programmer needs to run on the usb 1.1 standard, but it is unable to communicate that effectively to an intel mac. Don't ask me why. So a work around is to find an old usb 1.1 hub and use that. I would guess that there is a bug in the programmer firmware that it is preventing it from communicating the need to run on usb 1.1. Can anyone from sparkfun comment on a potential fix or firmware update?

This link still might be helpful as this guy was seeing the same errors in os x and tracked it down to a problem where the firmware wasn't handling a NAK from the os properly.
http://wiki.embedded-projects.net/index ... AndUsbprog
By superbatfish
#75564
Thanks for your help, tclem1080! You're a genius! I was able to borrow an old keyboard and now I'm up and running. I certainly hope that someone eventually figures out how to fix this issue so that I don't need to use this keyboard as a USB hub, but in the mean time I'm just happy that I can begin development on my project. Thanks again!
By tclem1080
#75576
FYI, I was also able to get a simple 4 port usb hub from radioshack to work as well. Doesn't quite look as cool as the keyboard though...
By wholder
#75862
Can we get a firmware fix for this, please. I just bought one of these for use on my Intel Mac and I'd like not to have to implement some funky solution using low speed USB hubs, and such. No offense to you guys who came up with the workaround. I'd just like to know when I can get a proper fix for this issue.
By tclem1080
#75864
wholder wrote:Can we get a firmware fix for this, please. I just bought one of these for use on my Intel Mac and I'd like not to have to implement some funky solution using low speed USB hubs, and such. No offense to you guys who came up with the workaround. I'd just like to know when I can get a proper fix for this issue.
I agree. Let's see a fix Sparkfun! I sounds like this issue is also being seen on Linux machines too.
User avatar
By sparky
#76468
Hi guys,

Thanks for all the feedback! But we're horrible firmware people. The ATtiny2313 is running a very rudimentary USB stack. It's not clean, it's not certified, and it works - usually. It sounds like there are a lot of motherboards out there that can tolerate this marginal USB, and some that can't.

If you can help us make the firmware or hardware better, please let us know. We're always open to help.

I wanted to create a low cost, easy to use programmer. If you feel you got sold on an un-reasonable promise of a programmer, email spark @ sparkfun and I'll get you taken care of.

Cheers,
-Nathan
By tclem1080
#76470
Nathan,

Thanks for the honest post, it is much appreciated. I'm pretty happy with my workaround via a usb hub, but I wouldn't mind taking a look at the firmware code just for fun. If I can make any progress, I'll post back to the community. Is there somewhere you can put it for me to download? Also, maybe some brief pointers on how to program a programmer? I probably need a serial or parallel programmer to do that huh?

Thanks,
Tim
User avatar
By sparky
#76514
Hi Tim,

What a fantastic idea! Why didn't I post that from the beginning...

Posted firmware:
http://www.sparkfun.com/datasheets/Prog ... t-prog.zip

Posted eagle files:
http://www.sparkfun.com/datasheets/Prog ... -Eagle.zip

Have a look and let me know if you can discern any problems. I am also working with Bill Roy on some hardware fixes that may help (zener diodes, softer 1500ohm pull up). At this time, we cannot replicate the problem on a Mac OSX 10.4 laptop. We will keep trying to get the thing to fail, then we can approach hardware fixes.

-Nathan
By jptdrake
#78416
Has there been any progress on this issue?
By deadsy
#80036
Adding zener diodes worked for me on my Linux box:

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
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]