EmbeddedRelated.com
Forums

Argh. ATmega128 users, please help?

Started by larwe April 16, 2006
Allrighty... some progress.

Richard H. wrote:

> Now, no knowing why changing CKOPT didn't fix your other ailments. > Perhaps it caused some damage?
I put an 8MHz xtal on another board, and that brought the swing up to about 824mV. With a colorburst xtal, that went up to about 900mV. I figured this was probably safe to attempt another write operation. Per a couple of application notes I read from programmer vendors, I put a 100pF cap between TCK and ground. Next I tried writing 0x89 to the high fuse byte, and whomp! the swing when I put back the 16MHz xtal is from 760mV to 4.32V (3.56V) which is great. I was hoping that this would fix all my programming woes, but it doesn't. I tried writing hfuse, lfuse, efuse individually, in that order. Side effects!! Write hfuse = 0x89 -> changes efuse from 0xff to 0xfc Write lfuse = 0xff -> changes hfuse from 0x89 to 0x20 Write efuse = 0xff -> apparently no side effect. Incidentally, I discovered that the undocumented bits in the extended fuse byte seem to have a meaning related to clocking! Specifically, 0xFC results in the chip running _incredibly_ slow; while (1) { LED = ^LED; } on 16MHz clock results in blinking at about 4Hz!
Dave Hansen wrote:

> If you're using an STK-200 type programmer, you might try changing the > buffer. That generally solved any programming problems we had.
No, I'm using a USB JTAG-ICE (Olimex's). I tried it with the Atmel JTAG-ICE at work, same results. GRRRRRRR!!!!!!!