NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » Debugging connection problems
February 02, 2012 by chennes |
I bought my NerdKit a few years ago and went through a bunch of the projects: apparently I stopped at the stoplight one, since that's what the chip is running now. However, in the interim I've gotten a new computer, and I can't get it to connect to the board now that I'm getting back to this project. I'm just getting the "avrdude: butterfly_recv(): programmer is not responding" error right away. I'm using the latest USB serial driver, as well as the latest Mac AVR software, on a Mac running 10.7.2, and I've now tried on two different Macs here, both giving the same error. The board is in programming mode, the LCD shows a line of black boxes, everything appears to work fine in run mode, it's a new battery, etc. What I'm looking for are some general "how to begin debugging this sort of system" advice: what can I verify, etc. Is there a USB equivalent to a kind of "ping" so I can verify that something's on the other end of the line? That sort of thing. |
---|---|
February 03, 2012 by Rick_S |
I know you said you were on Macs, but do you by chance have a PC you could try it on? The drivers seem to be less picky on PC's. That would at least narrow it down to the drivers on the Mac if it worked. The Prolific drivers seem to be an issue with some Mac installs. I have seen a few different versions being mentioned on the forum, but honestly don't know what ones to recommend for you. The prolific usb/serial adapter drivers would be where I would probably start looking, on a Mac issue, as that seems to be the one that pops up most here. Rick |
February 03, 2012 by chennes |
Thanks for the suggestion: I just tried it on Win7 with the latest Prolific USB-to-serial driver and it's not working there either, the driver appears to not work right (it gives a "This device cannot start. (Code 10)" error in the Device Status before I even try to load any software). Do you think replacing this older model USB-to-serial gizmo with the latest NerdKits part might resolve the issue? |
February 03, 2012 by hevans (NerdKits Staff) |
Hi Chennes, Those old blue USB-Ser converters are a bit finicky. There is a test you can run to see if your USB-Ser converter is doing anything at all. We call it the echo test: Go to the Servo Squireter tutorial http://www.nerdkits.com/videos/servosquirter/, and go down to the Serial Communications section. Follow the directions to communicate with the NerdKit using Putty (or screen on macs), but instead of connecting the yellow and green wires of the serial cable to the MCU connect them to the same empty row of the breadboard. Since the yellow and green (send and receive) wires are hooked up together, everything you type on Putty should be echoed back to you on the screen. Try it with and without the yellow and green wires connected to each other so you can see the difference. Humberto |
February 03, 2012 by chennes |
Thanks, Humberto. Nothing is echoing to the screen in either case: I just get a blinking cursor. I can't recall what this looked like back when it was working: were either of the red LEDs on the nerd kits serial port PCB supposed to light up? I went ahead and ordered a new USB-to-seral adapter, hopefully that will clear this up. |
February 06, 2012 by chennes |
Alright, some progress, but still not working. My new cable showed up today (thanks for the fast shipping), and at first it appeared to work: =========================================== Connecting to programmer: . Found programmer: Id = "FDL v02"; type = S Software Version = 0.2; No Hardware Version given. Programmer supports auto addr increment. Programmer supports buffered memory access with buffersize=128 bytes. Programmer supports the following devices: Device code: 0x35 avrdude: devcode selected: 0x35 avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e9406 avrdude: safemode: Fuse reading not support by programmer. Safemode disabled. avrdude: reading input file "initialload.hex" avrdude: input file initialload.hex auto detected as Intel Hex avrdude: writing flash (7676 bytes): Writing | ###################### | 43% 0.96s avrdude: error: programmer did not respond to command: write block =========================================== Doh! It died in the middle. When I tried again it died immediately with the "Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding" error again. I tried plugging it into another Mac and got exactly that error, and tried plugging it into a PC and I get the "not a butterfly". On the PC I tried following all the steps on this page (http://www.nerdkits.com/library/butterfly/), but got nowhere. Now what? |
February 06, 2012 by hevans (NerdKits Staff) |
Hi chennes, Getting partway through the write cycle really seems like a battery issue to me. The first thing I would look at is the battery and the battery connections to make sure they are all in order. Another thing to try is adding a sleep between the read and write cycles in your makefile. There is a great discussion about in this thread. A little more than halfway down Mike suggests a modification to the makefile you can make that makes programming on macs a little more stable. Humberto |
February 06, 2012 by chennes |
Thanks Humberto. I've tried several different batteries now: dying in the middle of programming could have been caused by the battery in the first place (obviously), but now nothing I do seems to affect the board. Is it possible for the crash to have left the chip in an inconsistent state of some kind that would prevent it from accepting any further communications? |
February 06, 2012 by hevans (NerdKits Staff) |
Hi Chennes, Thats possible, but I would say extremely unlikely. Just to double check, could you include a good close up picture of your setup. Perhaps there is something simple we are missing here and we can help you spot it. Humberto |
February 06, 2012 by chennes |
Sure: here it is (this afternoon I stripped out the LCD to rule that out as a possible problem... I've also tried both with and without the capacitor, and with the USB power connected and not) I just checked to make sure the USB cable works by doing that echo check you suggested above, and it seems fine. Also, with the LCD plugged in it shows a solid line on line 1 and nothing on line 2 (this is the older LCD model). It shows this now regardless of the position of the SPDT switch, so the stoplight program was erased, at least. |
February 06, 2012 by 6ofhalfdozen |
Hi chennes! I don't know if it will help any or not, but a fix the NK guys suggested to me for programming wierdness was to remove the programming switch and directly jumper to ground when you are programming. I had all kinds of wierd issues with programming until I tried that. I don't know if it will help, but the NK guys mentioned it to me, and now I mention it to you.. |
February 06, 2012 by chennes |
Thanks, 6ofhalfdozen: I gave that a shot, but it didn't seem to affect anything, so it would appear that switch is fine. I've double checked the voltage between the rails and it's almost exactly 5v, so the power seems OK at this point. Are there other voltages or resistances I can measure that might tell me something? Across the oscillator, maybe? Or the capacitor? |
February 07, 2012 by chennes |
OK, two more pieces of information: first, it turns out that I get different error messages depending on whether I include the capacitor or not. When I include the capacitor I get the "not a butterfly" error, but if I omit it I get "programmer is not responding". Second: I've checked the voltages at each of the pins that are supposed to be connected to either rail, and they all appear to be correct. Same with the voltage across the capacitor. I don't know how to test if the problem is the oscillator: is there something I can check there? |
February 08, 2012 by hevans (NerdKits Staff) |
Hi chennes, Well got me stumped. Without a fast enough oscillascope it's not really possible to see the crystal oscillations. It is possible (although like I said before, not probable) that the booloader code got corrupted somehow. Do you have a computer with a hardware parallel port around, we could try flashing the bootlaoder back on your chip. Humberto |
February 09, 2012 by chennes |
Unfortunately no, just USB. There's no way to do it over the USB connection? |
February 09, 2012 by hevans (NerdKits Staff) |
This is a longshot, but have you tried just connecting to a different USB Port on your computer. Macs especially can be finicky creatures with some of the USB ports (like the ones on the keyboards) really being USB hubs. Make sure you are connecting to a hardware USB port. Humberto |
February 09, 2012 by chennes |
Yeah, I've tried on different ports and different computers. I have a new chip and oscillator on the way, so I guess we'll know soon enough. |
February 10, 2012 by chennes |
Replacing the chip did the trick, it works fine now. I must have somehow left the original in an unrecoverable state. Thanks for all the help. |
Please log in to post a reply.
Did you know that hobby servos are controlled through a particular kind of PWM (Pulse Width Modulation) signal? Learn more...
|