Go Down

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

miros

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.

Tom Carpenter

I meant the whole entry.

Here is mine for comparison:
Code: [Select]

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
~Tom~

miros

but it didnt work even when it wasnt changed.

Code: [Select]
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

Tom Carpenter

Have a look at these three lines, and compare them to mine.
Code: [Select]
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
~Tom~

miros

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

Code: [Select]
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.


Tom Carpenter

Yours:
Code: [Select]
mighty.bootloader.file=ATmegaBOOT_1284P.hex
mighty.upload.protocol=stk500v1
mighty.bootloader.path=standard

Mine:
Code: [Select]
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: [Select]
mighty.bootloader.file=optiboot_atmega1284_16.hex
mighty.upload.protocol=arduino
mighty.bootloader.path=optiboot


Burn the bootloader again, and then see what happens.
~Tom~

miros

can i bootload bootloader twice?

miros

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

Tom Carpenter

Could you post a picture of your wiring.
~Tom~

miros

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

CrossRoads

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

Tom Carpenter

#26
Sep 14, 2012, 11:22 pm Last Edit: Sep 14, 2012, 11:25 pm by Tom Carpenter Reason: 1
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)
~Tom~

miros

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?

Tom Carpenter

#28
Sep 15, 2012, 01:05 pm Last Edit: Sep 15, 2012, 01:17 pm by Tom Carpenter Reason: 1
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: [Select]
mighty.bootloader.high_fuses=0xdc
should be:
Code: [Select]
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.
~Tom~

miros

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: [Select]
mighty_opt.bootloader.high_fuses=0xde

loopback is not working  :0 but i can upload code to arduino uno. thats weird.

Go Up