Pages: 1 [2] 3   Go Down
Author Topic: atmega1284p/pu  (Read 5937 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

mighty.upload.speed=115200
i just chaged the number. but that is not problem because i tried it also with original baud rate and it didnt work either.
Logged

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

I meant the whole entry.

Here is mine for comparison:
Code:
cube1284p_16.name=Cube 1284/1284P (PCB, 16MHz)
cube1284p_16.upload.protocol=arduino
cube1284p_16.upload.maximum_size=130560
cube1284p_16.upload.speed=115200
cube1284p_16.bootloader.low_fuses=0xFF
cube1284p_16.bootloader.high_fuses=0xDE
cube1284p_16.bootloader.extended_fuses=0xFD
cube1284p_16.bootloader.path=optiboot
cube1284p_16.bootloader.file=optiboot_atmega1284_16.hex
cube1284p_16.bootloader.unlock_bits=0x3F
cube1284p_16.bootloader.lock_bits=0x0F
cube1284p_16.build.f_cpu=16000000L
cube1284p_16.build.core=arduino
cube1284p_16.build.variant=Cube
#Note that the MCU is given as atmega1284p even though you are using the atmega1284
cube1284p_16.build.mcu=atmega1284p
Logged

~Tom~

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

but it didnt work even when it wasnt changed.

Code:
mighty.name=Original Mighty 1284p 16MHz
mighty.upload.protocol=stk500v1
mighty.upload.maximum_size=129024
mighty.upload.speed=115200
mighty.bootloader.low_fuses=0xff
mighty.bootloader.high_fuses=0xdc
mighty.bootloader.extended_fuses=0xfd
mighty.bootloader.path=standard
mighty.bootloader.file=ATmegaBOOT_1284P.hex
mighty.bootloader.unlock_bits=0x3F
mighty.bootloader.lock_bits=0x0F
mighty.build.mcu=atmega1284p
mighty.build.f_cpu=16000000L
#mighty.build.core=arduino:arduino
mighty.build.core=standard
mighty.build.variant=standard
Logged

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

Have a look at these three lines, and compare them to mine.
Code:
mighty.bootloader.file=ATmegaBOOT_1284P.hex
mighty.upload.protocol=stk500v1
mighty.bootloader.path=standard

#This one as well, but actually it isn't that important (my setting saves you 1.5kB of program space)
mighty.bootloader.extended_fuses=0xfd
Logged

~Tom~

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

everything is the same. here is record while uploading program i got.

Code:
Binary sketch size: 1,196 bytes (of a 129,024 byte maximum)
E:\Downloads\arduino-1.0.1-windows\arduino-1.0.1\hardware/tools/avr/bin/avrdude -CE:\Downloads\arduino-1.0.1-windows\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega1284p -cstk500v1 -P\\.\COM5 -b115200 -D -Uflash:w:C:\Users\Miso\AppData\Local\Temp\build8097499639146430213.tmp\Blink.cpp.hex:i

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "E:\Downloads\arduino-1.0.1-windows\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM5
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 115200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.

Logged

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

Yours:
Code:
mighty.bootloader.file=ATmegaBOOT_1284P.hex
mighty.upload.protocol=stk500v1
mighty.bootloader.path=standard
Mine:
Code:
cube1284p_16.bootloader.file=optiboot_atmega1284_16.hex
cube1284p_16.upload.protocol=arduino
cube1284p_16.bootloader.path=optiboot

Compare the two again, are you absolutely sure they are the same.
(I am assuming you have downloaded the bootloader file and saved it into the folder <arduino dir>\hardware\arduino\bootloaders\optiboot\ )


Try changing the three lines I mentioned to this:
Code:
mighty.bootloader.file=optiboot_atmega1284_16.hex
mighty.upload.protocol=arduino
mighty.bootloader.path=optiboot

Burn the bootloader again, and then see what happens.
Logged

~Tom~

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

can i bootload bootloader twice?
Logged

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

i booted burnloader again now  using optiboot and i still cannot upload program and i get the same error as previosly.
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 80
Posts: 1729
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 a picture of your wiring.
Logged

~Tom~

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

here it is but i think its useless because if it was wrong i would´nt boot bootlader


* DSC_0033.JPG (500.64 KB, 2592x1944 - viewed 26 times.)

* DSC_0152.jpg (1134.22 KB, 2560x1440 - viewed 28 times.)

* DSC_0153.jpg (1162.09 KB, 2560x1440 - viewed 27 times.)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 547
Posts: 27363
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

Where's the 10K reset pullup resistor?
Where's the 100nF caps for Vcc, AVcc to Gnd?
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.

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

Talking with the bootload and burning it are two different processes and require different wiring (one uses UART, one uses SPI), so just because one works, doesn't mean the other will.

Fortunately, having looked at the second picture you uploaded, I can see the problem. You may recall I said that you had to use UART1, not UART0. Look at your wiring again and see which you are using (Hint: RX1 is on pin16, TX1 is on pin17)
« Last Edit: September 14, 2012, 04:25:36 pm by Tom Carpenter » Logged

~Tom~

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

i tried both uarts but none of them works. 10k resistor is inside the rs232 cover and caps are not necessary because there is one, 1000uf. i guess it is enough. on the breadboard is also connected atmega328 and that one is working 100%, i used that as isp. i still get the same error while uploading as i wrote on one of my previous post. has anyone any idea?
Logged

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

Not In Sync... RX=0x00 generally means one of two things:

1) that the bootloader is wrong and not responding  - it works fine for me, so I see no reason why it shouldn't for you.
Edit: Unless it is because this reset vector is wrong because you didn't set your fuse settings to match mine:
Code:
mighty.bootloader.high_fuses=0xdc
should be:
Code:
mighty.bootloader.high_fuses=0xde

2) that your wiring of the serial port is wrong. Disconnect the tx and rx pins from the atmega chip, and connect them together. If you send something through the serial port with the serial monitor in arduino, do you get the same thing back? This is called the loopback test, and will check your RS232 to UART converter is working properly.
Edit: Looking at the inside of your RS232 plug, there are two things that stand out - firstly you havent connected pin 5, which is GND and is needed. Secondly, you have connected the DTR signal directly to the reset capacitor without any level shifting - this will result is a -18V or +28V spike on the reset pin whenever the DTR pin toggles. 28v + Atmega1284 = Bad



The other think to mention is just because you have a 1000uF capactor on the power rail, it doesn't mean you don't need a 100nF capacitor placed close to the microcontroller on the power rail. The two do totally different things - one smooths out low frequency ripple, the other filters out high frequency noise.
« Last Edit: September 15, 2012, 06:17:57 am by Tom Carpenter » Logged

~Tom~

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

rs232 plug is connected right i just have 30 pictures step by step of it and i choose one randomly. anyway i have bootloaded mighty 1284p 16mhz using optiboot so my line looks like this:
Code:
mighty_opt.bootloader.high_fuses=0xde

loopback is not working  smiley-mad but i can upload code to arduino uno. thats weird.
Logged

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