NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » MCU fails during programming

November 24, 2009
by n3ueaEMTP
n3ueaEMTP's Avatar

OK gang, you've all been a great help so far, here is my next problem:

n3ueaEMTP's latest problem

I've flashed this chip a few dozen times trying to get my program to work without success. This has happened to two other MCUs of mine as well. Is this a fixable problem or did I permanently damage the MCUs?

NB: I thought a picture would be easier than trying to explain the problem. Let me know if you need more info.

Thanks all Chris B, n3ueaEMTP

November 24, 2009
by tech20
tech20's Avatar

I would say your program is to large and it's not reporting hte error correctly, or that your circuit is resetting itself when you program it(drawing enough power through programmer to shut it off, with addition to other things).

November 24, 2009
by pbfy0
pbfy0's Avatar

15972 bytes is just too big for the ATmega168 with foodloader. If you look at the nerdkits foodloader code, on line 313-315, in the case: statement for the write block command:

if (flash_address > BOOT_SECTION_START) {
    uart_putc(0);
}

which is ascii NULL, so it looks like the nerdkit hasn't responded. I think to solve your problem, you'll either need to get an ATmega328, shrink your code, or use an ISP so you get the full program memory (16384 bytes, I think)

November 24, 2009
by pbfy0
pbfy0's Avatar

I meant 0 in the call of uart_putc(0) is ascii NULL.

November 25, 2009
by n3ueaEMTP
n3ueaEMTP's Avatar

Thanks for all the replies. I slimmed the code down to almost nothing & got the same problem. After that, I went to a program that I knew complies & copied it into the previous file (so I didn't have to change the make file) and everything worked. Not sure what the problem was but all is well now. thanks again for everyone's help

Chris B. n3ueaEMTP

Post a Reply

Please log in to post a reply.

Did you know that a thermometer can be made "faster" by using a bit of math? Learn more...