ATmega 1284

Hi guys! I'm finishing my new 3d printer with a DIY electronic based on sanguinololu. After burning (but not in the bootloader meaning :grin: ) a 1284p I bought a new micro. When it arrived I didn't checked if it was picopower, and so I started to burn the bootloader. Unfortunatly, I got the non-p version, and so the IDE didn't recongnize the signature of the chip. I checked the datasheet and ot says that the pico and not-pico versions are completely compatible, so is there any way to "mask" my not-p in a p version? Or is there any bootloader for not-p verisions?
Thanks in advance :wink:

It's not difficult to deal with, but a minor PITN. You need to "temporarily" change the config file for avrdude to handle the non-P chip, burn the bootloader, then change it back to the original to upload sketches to the chip. [don't ask me why the last step is required, ?].

  1. find avrdude.conf in the IDE directory under \hardware\tools\avr\etc.

  2. make a BACKUP copy!!!

  3. in the ATmega1284P section of the file, change the signature to reflect what
    the IDE said the chip was when you tried burning the bootloader. Probably,
    change 0x05 to 0x06.

  4. burn the bootloader.

  5. change back to original avrdude.conf file, and upload your sketches.

Good call on the bytes:
ATmega1284 0x1E 0x97 0x06
ATmega1284P 0x1E 0x97 0x05

Thanks very much for reply!! I'll try this method.
I suppose it works for the optiboot and other 1284p compatible bootloader.

Hi! I'm back! I've tryed to change the signature of the chip and it burnt the bootloader! But when I went to upload the sketch it didn't work: avrdude: stk500_getsync(): not in sync: resp=0x00
I think that the IDE displays this when it doesn't recognize the chip (or the bl is burnt wrongly), but when I uploaded the bootloader Arduino said that it was all right. I connected the 4 wires, selected the board and arduino as ISP programmer and hit the upload button. Of course with the Arduino as ISP sketch flashed on the 328.
I also changed the signature before flashing...
Now I was asking to myself: is there any way to upload directy the firmware bypassing the bootloader? The firmware is the Marlin 20 Mhz, is it possible to flash directly with ISP?

EDIT: I forgot to say that I'm using an Arduino UNO R2 without the 328 and connected RX to RX, TX to TX and Reset to reset

Did you perform item 5 above?

I also changed the signature before flashing...

Yes I did! Now I try with another 16 mhz bootloader.

Tryed with the 16 MHz bootloader! But there're still problems... Now the console report this:

avrdude: stk500_loadaddr(): (a) protocol error, expect=0x14, resp=0x55

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

I'm using an Arduino Uno R2 without the 328 and I've connected RX to RX, TX to Tx and Reset of the 1284 to reset of Arduino.
Should I reburn the bootloader?
Thanks again!

Surely the easy way to do this is to turn your Uno into an ICSP as per Nick Gammon's page and then load the bootloader, then program via a usb to serial converter (if there isn't one on the destination board.)

Exactly what I did! I programmed the 1284 with an Arduino UNO and next uploaded the firmware with another Arduino without the 328. But it doesn't work...

It isn't exactly what you did....

I said use a USB to serial converter... Have you got one?

If not you could use an Uno without the 328, but you will have to have added the 1284 core files to the IDE, then connect up all the leads, so that it gets the auto reset signal as well.

The last IDE fully supports the 1284p now and yes, I have connected resets.

The last IDE fully supports the 1284p now and yes, I have connected resets.

As far as I know, this is not "even close" to being true, so I don't know where your statement is coming from. ?? ??

You're doing something wrong which is very basic. Either: (a) the wrong bootloader, (b) the support libraries are in the wrong directory, (c) the wrong setup for using the 328 to burn the bootloader, (d) something wrong in your USB hack [Rx,Tx are crossed ??], (e) the wrong board is selected due to (b), or whatever. All of these things have to be right in order.