I've been following these instructions (recommended by Arduino) to burn a bootloader and flash a sketch onto the 1284p,
I've successfully managed to burn its bootloader using the following library :
Using an Arduino Uno as an ISP.
I'm using Arduino 1.0.5 as Arduino 1.6 doesn't seem to be compatible with the library currently.
I used the board "Mighty 1284p 16Mhz using Optiboot" which worked great however when I attach my Arduino uno as an FTDI USB to serial programmer I get the following error while trying to upload.
Binary sketch size: 534 bytes (of a 130,048 byte maximum)
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x42
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
The chip is responding as I get a blink from both the RX and TX LED's for a few seconds then the error occurs.
Any help would be anonymously appreciated!! I'm tired and sick, and just want it to work,
When I use 1.6 the board is found after changing the directly of the library in my sketchbook to hardware/AVR/mighty-1284p
However when I try to burn the bootloader I get null pointer exceptions and a long list of errors. While bootloaders for my other chips still work fine.
Did you have to change any config files/fuses with the JChristensen bootloader or did you just load it like it was?
I don't understand why I can't flash it, is there something I'm missing?
I've got the typical standalone Arduino set up, 16MHz crystal, 2 x 22nf caps, 10k pull up on reset, and then RX and TX connections (connected the right way).
I think I'm still on 1.0.5. I don't change all that often, preferring to let some of the bugs get worked out. Or am busy with hardware design projects, and don't get around to coding that much.
I just loaded the files into the /variants folder.
What are you using for a Programmer (which connects to SPI-MOSI-MISO-Reset-Power-Gnd) for installing the bootloader?
CrossRoads:
I think I'm still on 1.0.5. I don't change all that often, preferring to let some of the bugs get worked out. Or am busy with hardware design projects, and don't get around to coding that much.
I just loaded the files into the /variants folder.
What are you using for a Programmer (which connects to SPI-MOSI-MISO-Reset-Power-Gnd) for installing the bootloader?
I'll just stick to 1.05 for now too, it works perfectly fine and there seem to be a few issues with 1.6
I'm using the exact connections shown on this picture for my SPI
I used my Arduino Uno as an SPI programmer, I've used this hundreds of times to burn bootloaders onto Atmega328's.
Do you have DTR from FTDI connected 1284's Reset thru a 0.1uF cap? If not, you will need to press reset when the IDE shows "compiled xxx of 130xxx bytes"
when I try to flash it with a sketch using my Arduino Uno as a FTDI programmer
Exactly how are you trying to flash the sketch? After you've loaded the bootloader, you should be able to set the board type to "Mighty 1284p 16Mhz using Optiboot" and just use the "Upload" button. No "FTDI Programmer" or "Uno as ISP" or anything else involved...
The Uno's RX and TX goes crazy for about a minute and then my IDE says the bootloader has been successfully uploaded.
Then after the bootloader has been loaded I take the ISP connections out as well as the chip as I need to prepare the Arduino to flash the 1284P through serial with the "BareMinium" sketch.
When I attempt to upload the sketch the RX and TX blink intensively for a few seconds then then IDE says "uploading" for around 30 seconds and then I get the following error :
Binary sketch size: 534 bytes (of a 130,048 byte maximum)
avrdude: stk500_loadaddr(): (a) protocol error, expect=0x14, resp=0x55
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): programmer is out of sync
I've tried swapping the RX and TX pins around but then I just get no response.
As I said I've used your sketches in the same fashion to upload the bootloader and burn the fuses however I get the exact same problem when I got to upload a sketch.
westfw:
Exactly how are you trying to flash the sketch? After you've loaded the bootloader, you should be able to set the board type to "Mighty 1284p 16Mhz using Optiboot" and just use the "Upload" button. No "FTDI Programmer" or "Uno as ISP" or anything else involved...
To burn a bootloader you use ISP and to send/flash a sketch you use serial.
I'm using my Arduino Uno as serial programmer.
After I've uploaded the bootloader (using my Arduino Uno as ISP programmer) I need to undo the ISP connections and take the chip out, then add the serial connections in order for my Uno to act as a serial programmer.
My bootloader uploads fine.
However I get problems as shown in my posts when I attempt to upload a sketch.
CrossRoads:
Any chance the Rx & Tx lines are swapped?
Do you have DTR from FTDI connected 1284's Reset thru a 0.1uF cap? If not, you will need to press reset when the IDE shows "compiled xxx of 130xxx bytes"
When I swap them around I get no response so there are defiantly connected the right way.
I forgot to add one at first but my computer didn't recognize the FTDI so I decided to try it with the capacitor I just remembered about and my computer recognized it.
However I still get the same error after a few seconds of uploading.