ATMega1284P Bootloader Assistance

Hello,

I am working on expanding my projects over to the larger ATMega1284P from the ATMega328P for more memory and functionality and am having some trouble burning the bootloader. I have had similar issues with the 328P in the past but managed to work them out and have that burning properly now. I have been using a 16MHz Resonator with ManiacBug's tutorial (Arduino on ATmega1284P | maniacbug)

and have wired this circuit, trying with FTDI and Arduino separately, and upon failure trying with both with no avail. (http://www.flickr.com/photos/maniacbug/6413368937/)

I am able to upload to the Arduino UNO correctly, when I change to 16MHz 1284P, and arduino as ISP and burn the bootloader - I it takes about a 5 second delay and then gives this typical error :
"avrdude: stk500_getsync(): not in sync: resp=0x00"

Any help or suggestions would be much appreciated - I have checked my pinouts and connections multiple times and feel they are all correct to my knowledge. Any suggestions from anyone who's worked with this chip would be helpful - Thanks ahead of time!

Regards,

LP

Is this on a breadboard? You should check continuity and your jumpers. I often find bad jumpers or breadboard positions.

How is the resonator connected up? It's possible the clock is not working correctly with the default low fuse bit settings. The maniacbug defaults are for crystal operation. It may need to be changed from 0xff to 0xd6.

See in the boards.txt file:

mighty_opt.bootloader.low_fuses=0xd6

This is for a full swing resonator operation which should allow for it to start up more reliably.

But the problem may be that you may need a crystal first to change the fuse bits. Or you could supply an external clock to the XTAL1 pin.

Rather than the "stock" ArduinoISP sketch, you may find that Nick's code is superior. Solved my issues in past and a great review/reference.

Ray

Thank you Ray - That got the bootloader upped successfully and it is reading the chip - but now I still have similar errors when trying to program a simple blink sketch.

First I got this error:

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): programmer is out of sync

the resp=0x64 seems to alternate to resp-0x62 with a few more tries.

I also got this typical error once or twice as well

avrdude: stk500_getsync(): not in sync: resp=0x00

If I can't get this soon I will try hiduino's changing fuse bits in the boards file and if not that I will buy a crystal. Any suggestions appreciated if you have seen this error before or know where to go. Thanks!

I have worked w/ 1284 a bit, but always have used 16MHz 20ppm crystals and 18pF load caps. I highly recommend member Crossroads 1284 bare boards for 1284 work. Well designed and economical.

http://www.crossroadsfencing.com/BobuinoRev17/

Ray

There were a number of thread a while back that different 1284P boards had issues with the clock not starting up properly. The main resolution was to set the lfuse byte to "Full Swing Oscillator". I would recommend trying the lfuse byte to 0xD6.

OxF7 for the low fuse for the crystal issue.
See #403 here
http://forum.arduino.cc/index.php?topic=235521.390

Yes, that would be correct for crystals. The OP said he was using a resonator. So the options for Full Swing Resonator is different.

Ok. Didn't read back far enough.

Thanks so much guys, Changing the low fuses from 0xFF to 0xD6 in Nick's Programmer Code and also in boards.txt, reuploading the bootloader and then it was uploading the blinky sketch like a charm. Now on to using a little more of the chip! Appreciate the help - thanks again.

LP