Go Down

Topic: error that makes pin 13 blink rapidly? (Read 798 times) previous topic - next topic

mattgilbertnet

To be clear, this is NOT about running the Blink example.

I've had an issue with a Duemilanove. The ATmega is apparently fried, or half-fried, or something. It has stopped running the code I've loaded onto it, and instead just blinks pin 13 pretty quickly, and I can't upload new code. If I try, I get "avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding".

I'm not really asking for a fix, I'm just wondering what the blinking is caused by. Is it an error message of some kind? Whatever it is, it wasn't in the code I uploaded to the board.

I found one other thread where a couple people reported something similar. They found a work around (that hasn't work for me), but they never explained why the blinking happens. Does anyone know?
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1248528012/6#6
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1248528012/14#14

One clue: On the troubleshooting page it points out that the bootloader blinks pin 13 once on startup. (3 times for NG board, and apparently 3 for the Uno as well.) Maybe it's stuck repeating that startup sequence for some reason?

James C4S

Remove the ATmega and perform the loopback test.

Post your code.  Maybe something in your code is causing the ATmega to reset.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

mattgilbertnet

Loopback test was successful. Code is attached.

I take it this isn't some known way for the Arduino or ATmega to scream for help or something?

James C4S

Thirty Steppers?

You aren't trying to power thirty (or even 1) steppers from the Duemilanove directly, are you?
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com


James C4S

How much current do your motors draw and how much does your supply provide?

Motors draw lots of current, usually a good idea to power them (physically) separate from the logic stuff.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

mattgilbertnet

I know. I thought the ULN2803's would be isolation enough, but they apparently weren't. They worked fine for quite a while, then started acting up. I've ordered some optocoupler arrays to give it another go.

But back to the topic at hand. With no motors or anything attached, pin 13 is blinking when nobody told it to. Pin 13 is never mentioned in the code. Does anyone know what that's all about? Atmega death rattle?

James C4S

If no other hardware is connected and Pin 13 is flashing, it is likely something is causing the chip to reset repeatedly.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

mattgilbertnet

That makes sense. I managed to recover the chip by popping it into a different board and programming it. It even works in the original board now.

I'm mainly rambling now, in case this is useful for anyone who comes across this problem. (You may not have bricked the Atmega after all.) It seems related to this: http://arduinology.blogspot.com/2012/02/repeated-resets-on-webtime.html

I may have taken up too much memory at some point with an earlier draft of the code. Or maybe the motors created some kind of electrical noise.

Anyway, thanks!

Go Up