Go Down

Topic: atmega1284p/pu (Read 6754 times) previous topic - next topic

miros

He guys,
i bought atmega1284pu and i tried to boot bootloader but it didnt work. i was following these tutorials:
http://maniacbug.wordpress.com/2011/11/27/arduino-on-atmega1284p-4/
http://wiki.wiring.co/wiki/Creating_your_own_Wiring_board_with_a_DIP_atmega1284p_using_Duemilanove
I used arduino uno as isp but i get this error:
avrdude: Device signature = 0x1e9706
avrdude: Expected signature for ATMEGA1284P is 1E 97 05
         Double check chip, or use -F to override this check.
Do you think the problem is that i have atmega1284pu and not atmega1284p?
thanks for your answers  :).

johnwasser

If I understand correctly, PU means "plastic DIP package" and P means "pico-power".  The non-Pico-Power chip should be compatible with the Pico-Power version so all you should have to do is change the chip type in the boards.txt file to remove the 'p'. Then avrdude will be happy with the signature.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

miros

i understand what you mean but i dont know what to change.

CrossRoads

1284-PU has signature bytes    0x1E 0x97 0x06
1284P-PU has signature bytes  0x1E 0x97 0x05

Find your copy of avrdude.conf, and copy the '1284P section, excerpted here:
Code: [Select]

#------------------------------------------------------------
# ATmega1284P
#------------------------------------------------------------

# similar to ATmega164p

part
    id               = "m1284p";
    desc             = "ATMEGA1284P";
    has_jtag         = yes;
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
    avr910_devcode   = 0x74;
    signature        = 0x1e 0x97 0x05;
    pagel            = 0xd7;
    bs2              = 0xa0;
    chip_erase_delay = 9000;

and edit it to take out the P from 1284P and change the signature bytes.

Then, do the same in boards.txt for 1284 vs 1284P.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

miros

thanks, i tried but when i changed avrdude.conf i get this error on arduino IDE:

syntax error at
H:\Saved Documents\Mirko\arduino\arduino-1.0\hardware/tools/avr/etc/avrdude.conf:16934

i get this error when i change it and even when i dont. can anyone help?

miros

could you send me changed avrdude.conf ,please. thanks

CrossRoads

You are not able to copy the Entire 1284P section, add it to the bottom of the file, and change these few lines?
If this doesn't work, then perhaps my approach is incorrect.
Code: [Select]

#------------------------------------------------------------
# ATmega1284P                          <<<  ATmega1284
#------------------------------------------------------------

# similar to ATmega164p

part
    id               = "m1284p";                 <<<<  "m1284"; 
    desc             = "ATMEGA1284P";    <<<<"ATMEGA1284";
    has_jtag         = yes;
    stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
    avr910_devcode   = 0x74;
    signature        = 0x1e 0x97 0x05;    <<<<  0x1e 0x97 0x06;
:
:
// and copy the rest down to the start of the next section ...


Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

miros

#7
Sep 08, 2012, 06:06 pm Last Edit: Sep 08, 2012, 06:08 pm by miros Reason: 1
everytime i change avrdude.conf i get error. the same as i show previosly. what abouth changing atmegaBOOT_1284p file. i tried it with .c file and nothing however there is still .hex file. Can anyone help, please. i spent all my money for 2 of these microcontrollers  =( and now i cant control them. If they are gonna work i will make really cool robot(check out picture)  8).

Tom Carpenter

I've been using the atmega1284 without issue (you like I did got the atmega1284-PU, not the atmega1284P-PU - Note that the PU specifies a DIP package and is nothing to do with the device).

All I had to do is to find the definition for ATmega1284P (just using CTRL-F), and change the signature to:

    signature        = 0x1e 0x97 0x06;

Then I used the IDE to burn a version of optiboot bootloader compiled for the mega1284p

Then once the bootloader was burned I changed the signature back to:
    signature        = 0x1e 0x97 0x05;

It works a treat for me.


If you let me know what clock frequency you plan to use, I will compile an optiboot hex file for you. Note that the version I modified uses UART1 for programming.
~Tom~

Tom Carpenter

I should mention that I used the standard Arduino core, but modified wiring_analog.c to support the 1284p (It still works fine with all the other arduino's).
I have also attached the Pins_arduino.h file I have been using which shows in it a pin map for the DIP package - this is the pins_arduino file from here: https://github.com/stevemarple/Calunium

To speed things up, I have also attached two versions of Optiboot - one compiled for 16MHz, the other for 20MHz (I have an 8MHz version as well if you prefer). These run at 115200 Baud using UART1, and PD7 for the status LED (Digital pin 23, or IC pin 21).
~Tom~

miros

im so excited but i go sleep i will write tommorow. thank you  XD  :smiley-sweat:  :)

miros

i replaced wiring_anolg.c and pins_arduino.h but i dont know where i have to change signature, what file?

Tom Carpenter

The signature is changed in:
avrdude.conf

If you are using Windows, I think it is located at:
<Arduino Dir>\hardware\tools\avr\etc\avrdude.conf
(if it is not there, just search for the file name)

For Mac it is located at:
(Click the desktop, then:) Go->"Go To Folder..."
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc
~Tom~

miros

Done burning bootloader. best sentsnce ever  :D. thanks man but i cannot upload program  :smiley-roll-sweat: i tried both uarts and nothing. i also changed baud rate to 115200. didnt help. BTW there is original atmega1284p on 16mhz bootloader. any solution?

Tom Carpenter

Could you post the lines you added to the boards.txt file?
~Tom~

Go Up