Diecimila - I killed it

I got my new Diecimila, got it up and running, and ran the blink program...no problem. I attached a DX160 from Spark Fun, and got that working too. cool! Then I tried to upload a bitmap to the board, and now it's gone a little nuts :'(

when I try to upload a sketch (even the blink example that I ran originally) the "L" LED blinks quickly and I get the error below. after the error prints out, the LED stops blinking. I've tried power cycling, hitting the reset button, USB power, wall power, and running avrdude from the command line, always with the same result.

I'm running OS X 10.4.11 and arduino-0009

any help or insight would be most appreciated...I really want to get the board back up and running! and then I'll need some help in displaying a bitmap, but that's another post...

Binary sketch size: 1108 bytes (of a 14336 byte maximum)
tools/avr/bin/avrdude -Ctools/avr/etc/avrdude.conf -v -v -v -v -pm168 -F -cstk500v1 -P/dev/tty.usbserial-A5002sl0 -b19200 -D -V -Uflash:w:/Applications/arduino-0009/examples/Digital/Blink/applet/Blink.hex:i 

avrdude: Version 5.4-arduino, compiled on Aug 16 2007 at 18:09:58
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/adminuser/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port            : /dev/tty.usbserial-A5002sl0
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 19200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: Send: Q [51]   [20] 
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

Weird. Do you have anything attached to the board? Can you try it from another computer? You might try Arduino 0010, although it shouldn't make a difference.

I tried from another Mac (OS X 10.5) with the same result. nothing is currently connected to the board.

What did you have connected to the board? Any chance you shorted something or similar?

I had a DX160 LCD (http://www.sparkfun.com/commerce/product_info.php?products_id=8358) connected to the board at the time. I'd used this screen many times before with no problems, so I don't think it would have suddenly shorted.

I was trying for the first time to upload a bitmap, and there's a pretty good chance I screwed up the code for that in some way. it's also possible that it was still processing or trying to run the code when I power cycled it and tried to upload something else.

is it likely that I corrupted the bootloader? how would I check?

is there anything I can do to troubleshoot using command line tools?

I'm hoping not to have to buy or build a programmer to reload the bootloader.

Do you have anything connected to pins 0 and 1?

nothing is connected to the board at all, except for the USB cable to the computer.

when I had the screen connected, I used the 5V power, GRND, and TX pins.

The error messages you're seeing imply that there's no response coming back from the board / bootloader. This could be because the bootloader was corrupted, or the FTDI chip is broken, or maybe even because the USB cable is broken or not well-connected, though all of those seem unlikely. You might try ordering a new ATmega168 with the bootloader already on it (I think adafruit, NKC electronics, PCB europe, and others sell these).

the USB cable must be fine, or I wouldn't be able to affect the board at all, right? when I hit "upload" the LED flashes, and when the IDE gives up and throws an error, the light stops, which implies that some kind of communication is taking place.

is there any other troubleshooting I can do? some way to try and communicate directly with the bootloader and see if it's functioning properly?

buying a new ATmega with bootloader is a good idea. I didn't realize the chip was so cheap. I'm worried, though, because I seem to have trashed this one with a simple coding error...

I think we've had reports of people able to send data to, but not receive data from, their Arduino board because of a problem with the cable. It would certainly be weird, though.

By trying to upload a sketch, you are communicating directly with the bootloader (well, you would be if you were getting a response). You could try uploading from the command line instead. Set upload.verbose to true in your Arduino preferences file and hit upload in the IDE to get the command line.

What is the voltage measured at the 5V on the board?

I haven't measured the voltage.

I just ordered a parallel programmer, so hopefully burning a new bootloader will solve the problem...fingers crossed...

Why a parallel programmer?

Why not a $35 AVRISP from Atmel? The Arduino has a nice header reserved for this.

why is that better than a $12 programmer from sparkfun (http://www.sparkfun.com/commerce/product_info.php?products_id=13)? I'm not being sarcastic, I really don't know the difference.

For one, because it works on a computer without a parallel port. The AVRISPmkII is USB, and works under Mac OS X (with libusb and avrdude), linux (probably ditto), and windows.

If you're going with a parallel programmer, just build it. If you want cheap, look at the one LadyAda sells here. If you want a really good one with the fewest headaches, get the AVRISPmkII.

Just my $0.02.


it all depends on where you want to spend your time. I've built devices like those by hand, used $500 JTAG programmers, and purchased ISP programmers. It becomes a question of whether you want to know something will work the first time and support your future projects.

I'm not sure about you, but I've wired programmers the wrong way a bunch of times -it happens. Do you know if this one will kill your circuit (or itself) if miswired? These concerns are usually addressed in the design of Atmel's programmers. Also, the AVRISP offers dialog messages explaining which ISP lines are shorted (if any) which is good feedback.

The AVRISP will most likely support future Atmel devices as well.

I'm not sure about you, but I've wired programmers the wrong way a bunch of times -it happens. Do you know if this one will kill your circuit (or itself) if miswired?

The AVRISPmkII's LED will glow orange and not damage anything if you hook up the ICSP cable backwards. Guess how I know this. :)


I got the parallel programmer, and it was a 10 pin connector instead of 6 like the arduino icsp. so I figured I'd just rewire it...not too big a deal. I hooked it up, and the IDE couldn't find the parallel port. I love windoze.

I messed with it for an hour, then gave up and ordered an mkII. lesson learned!

I tried to just dabble with this stuff, but it looks like I'm getting in deeper and deeper every day.

Sometimes it's worth doing things to learn. Good luck, you've made the right choice.

the mkII did the trick, my arduino is fully functional again. nice!

I guess my code somehow managed to corrupt the bootloader. see other post here if you’re interested (or have any words of wisdom) - http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1205797677