Pages: [1] 2 3   Go Down
Author Topic: atmega1284p/pu  (Read 4468 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 178
Posts: 8061
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 435
Posts: 23600
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#------------------------------------------------------------
# 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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 435
Posts: 23600
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#------------------------------------------------------------
# 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 ...

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-cry and now i cant control them. If they are gonna work i will make really cool robot(check out picture)  smiley-cool.


* DSC_0144[1].jpg (1303.68 KB, 2560x1440 - viewed 28 times.)
« Last Edit: September 08, 2012, 11:08:32 am by miros » Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 71
Posts: 1638
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

~Tom~

Leeds, UK
Offline Offline
Edison Member
*
Karma: 71
Posts: 1638
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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).

* wiring_analog.c (7.38 KB - downloaded 15 times.)
* pins_arduino.h (6.25 KB - downloaded 14 times.)
* optiboot_atmega1284_16.hex (1.38 KB - downloaded 16 times.)
* optiboot_atmega1284_20.hex (1.38 KB - downloaded 6 times.)
Logged

~Tom~

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

im so excited but i go sleep i will write tommorow. thank you  smiley-lol  smiley-sweat  smiley
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Leeds, UK
Offline Offline
Edison Member
*
Karma: 71
Posts: 1638
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

~Tom~

Offline Offline
Jr. Member
**
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Done burning bootloader. best sentsnce ever  smiley-grin. 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?
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 71
Posts: 1638
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

~Tom~

Pages: [1] 2 3   Go Up
Jump to: