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: GitHub - stevemarple/Calunium: Arduino clone based on the ATmega644P/ATmega1284P
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).
Done burning bootloader. best sentsnce ever :D. thanks man but i cannot upload program 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?
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
Have a look at these three lines, and compare them to mine.
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
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 \hardware\arduino\bootloaders\optiboot\ )
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)
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?
Not In Sync... RX=0x00 generally means one of two things:
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:
mighty.bootloader.high_fuses=0xdc
should be:
mighty.bootloader.high_fuses=0xde
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.