NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » initialload not writing
August 23, 2011 by Jon |
Hi -- I'm running Snow Leopard and using AVRMacPack. I edited the Makefile with the port address from /dev, and make appears to see everything, but doesn't seem to be able to write to the chip. I'm using a 9v AC adapter, so it's not the battery. I've unplugged, re-plugged, rebooted, and connected/disconnected the NK as well. Double-checked the port and the wiring. I've read a few other threads to see if I'm missing something obvious. Here is the progress output from Terminal:
Any ideas for what to check/do next? Thanks, --Jon |
---|---|
August 24, 2011 by Ralphxyz |
Unplug your USB cable plug it back in, try again. Pretend you are on a Windows machine and Reboot. To see some of the discussions on this common problem for OS X search the forum for "yellow wire". The problem is the yellow USB wire is constantly energised after the first programming attempt. The voltage on the yellow wire holds the mcu in a zombie state. Ralph |
August 24, 2011 by Jon |
Thanks Ralph. I did the unplug/re-plug/unplug/re-boot/re-plug sequence a couple times, but it didn't seem to help. I did not see the "yellow wire" posts though, so I'll go back through those and try any hints. --Jon |
August 24, 2011 by hevans (NerdKits Staff) |
Hi Jon, This issue seems to be the same as the one experienced by other Mac users on 64 bit machines. http://www.nerdkits.com/forum/thread/68/. Basically the solution comes down to modifying your makefile slightly and breaking up this line
to these lines
Give that a try and let us know what happens. Humberto |
August 24, 2011 by Jon |
Thanks Humberto, After Ralph's comment this morning, and going back through the dozens of (convoluted) threads that I've found now regarding the yellow wire, Macs, Makefile timing, and reset switches, I tried to break these down into three distinct steps to try and isolate into a repeatable working scenario. 1) I found a few references to people who said a specific sequence of connecting/disconnecting, powering/un-powering, plugging/un-plugging USB, etc. would work. In some combination or another often with re-booting the Mac. I found the various sequences produced mostly random results. Eventually I determined that the following sequence did provide consistent results with my Mac:
So this sequence, which is obviously resetting everything, but not requiring the often mentioned re-boot, worked consistently for my setup (because the USB is disconnected by the time I'm ready to run, hence the MCU has been reset). 2) The next most frequently mentioned possible solution/suggestion was to add a delay in the makefile, as you suggested here, and numerous other places too (now that I knew what to search for). In my case that does work, but still requires that I disconnect the power to the NerdKits each time as I move the switch from program to run mode. Which suggests that I still need to add a reset switch... 3) Reset switch -- The third most commonly mentioned thing, which I haven't done yet, is to add a reset switch to the USB yellow (and?) red wires. I've been looking for a thread that succinctly explains how Ralph and others have wired their reset switches, since it seems like that solves the 'needing to disconnect power' issue for each download. Noter's double MOSFET solution here and here is elegant, but I'm not groking it. Ralph mentions in many posts using a DPDT switch connected to his yellow and red wires, but I'm not finding where he's connecting them to when he flips/resets his switch. So, bottom line I've got it working, but I really need a simple photo or explanation of how best to add a reset switch, and where it needs to be connected. (I'm new at this, so is 'reset' connecting pin 1 to +5 or GND, or what?) Based on my experience it seems like the combination of makefile timing and a reset switch is the complete solution to this problem for anyone with this "yellow wire" problem on a Mac. Thanks for the help and pointers so far, --Jon |
August 24, 2011 by Jon |
A little more digging and I found this thread which gives me more info on what Ralph was specifically doing with his switch, and, more importantly, BobaMosfet's two LED suggestion. I hooked up two LEDs, a yellow and green, on the yellow and green wires of the USB->serial wires and it is very obvious now when something is happening, or if power is still on one of the lines. Now I just need to dig around in the junk pile for a switch to use for the reset. --Jon |
Please log in to post a reply.
Did you know that you can generate hundreds of volts AC from your microcontroller with a little bit of circuitry? Learn more...
|