Go Down

Topic: ATmega1284P: End to End using 1.0 IDE (Read 81485 times) previous topic - next topic

CrossRoads

This one?
http://arduino.cc/en/Main/USBSerial
Should be.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

baselsw

#421
Aug 06, 2012, 06:53 am Last Edit: Aug 06, 2012, 07:03 am by baselsw Reason: 1

This one?
http://arduino.cc/en/Main/USBSerial
Should be.


Ya, but the thing is that it's not working (uploading sketches) for me when I'm using "Mighty 1284P 16MHz optiboot bootloader". All I get is the programmer not in sync error that everyone is getting here.

But if I use the modified "Mighty 1284P 16MHz optiboot bootloader" namely the "Piccaso Mighty 1284P 16MHz SLOW optiboot bootloader (28800 baudrate)" then uploading sketches is possible but with variable results. Sometimes the upload is successful and sometimes I get the pogrammer not in sync error.

I've setup everything as Mighty suggested on his blogg. And I'm using Arduino 1.0.1 IDE for uploading the sketches. The bootloader was burned with the ArduinoISP sketch on my Arduino Mega R3.

Edit: here is the error:

Code: [Select]
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): programmer is out of sync

wanderson

I also posted a bug report on this.  I found that using the original bootloader worked fine for me, but with the Optibootloader I got the same error message you did.  Never heard anything on a potential cause, but have heard from several others who experienced the same issue.
New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

baselsw


I also posted a bug report on this.  I found that using the original bootloader worked fine for me, but with the Optibootloader I got the same error message you did.  Never heard anything on a potential cause, but have heard from several others who experienced the same issue.


The original, do you mean the "Original Mighty 1284p 16Mhz"? And did you use the same setup as mighty did on his site? If you have a schematic on hand that will be awesome. It'll also save a lot of questions =P!

wanderson

Yes that was the bootloader that worked for me.  No I don't have a schematic, but it was wired identically to the version on his site.  Pretty basic, crystal, caps, resistor for reset line, and FTDI connections...  all wirewrapped on a protoboard.
New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

baselsw


Yes that was the bootloader that worked for me.  No I don't have a schematic, but it was wired identically to the version on his site.  Pretty basic, crystal, caps, resistor for reset line, and FTDI connections...  all wirewrapped on a protoboard.


That's wierd.. I tried the original bootloader, but still got the programmer not in sync. Just to be sure I went to the nearest radio shack and bought a FTDI basic break out board (Sparkfun) and burned the orginial bootloader again. The avrdude output went a bit farther than usual but still it ended with the programmer not in sync error! Ahhhh, this chip is killing me!!! Don't know what to do anymore.

CrossRoads

When I get home, I''ll post the hex file for the bootloader I use with 1284's
(see reply #64
http://arduino.cc/forum/index.php/topic,112020.60.html)
and then download sketches with via the IDE.
I am pretty sure it's maniacbug's bootloader from here
https://github.com/maniacbug/mighty-1284p
will find out for sure when I get home tho.
The bootloader was installed via IDE 1.0 (haven't put the 1284 cores into my 1.0.1 yet) and loaded with AVR ISP MKii programmer.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

baselsw


When I get home, I''ll post the hex file for the bootloader I use with 1284's
(see reply #64
http://arduino.cc/forum/index.php/topic,112020.60.html)
and then download sketches with via the IDE.
I am pretty sure it's maniacbug's bootloader from here
https://github.com/maniacbug/mighty-1284p
will find out for sure when I get home tho.
The bootloader was installed via IDE 1.0 (haven't put the 1284 cores into my 1.0.1 yet) and loaded with AVR ISP MKii programmer.


Looking forward to it =)! If it's maniacbugs bootloader then I doubt that it'll work, because i've already tried all of them. But if it's working for you then I'll gladly try the one you post =P!!

CrossRoads

What I have definitely worked, one upload of the bootloader, and then about 30 sketch uploads as I checked out all the IO pins.
Hopefully there wasn't some other change I made that I've totally forgotten about O)
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

florinc

baselsw, try another 16MHz crystal. Maybe the one you have is defective/inaccurate.

CrossRoads

Rats, I posted the files to the wrong thread:
http://arduino.cc/forum/index.php?topic=104780.new;topicseen#new
Go there & grab them.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

baselsw


What I have definitely worked, one upload of the bootloader, and then about 30 sketch uploads as I checked out all the IO pins.
Hopefully there wasn't some other change I made that I've totally forgotten about O)


Thanks CrossRoads.. I'll try it out when I get home tonight!

@Florinc: I got a feeling that it could be the crystal.. I couldn't try any other one because that was the  last one I had.. I'll go buy bunch later today! Thank you for the tip!!!

wanderson



What I have definitely worked, one upload of the bootloader, and then about 30 sketch uploads as I checked out all the IO pins.
Hopefully there wasn't some other change I made that I've totally forgotten about O)


Thanks CrossRoads.. I'll try it out when I get home tonight!

@Florinc: I got a feeling that it could be the crystal.. I couldn't try any other one because that was the  last one I had.. I'll go buy bunch later today! Thank you for the tip!!!


You might also want to look at the caps you are using with the crystal.  I have a batch of crystals that work at frequency with 18pF caps, but are either well off frequency or not even oscillating with 22pF caps.
New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

baselsw




What I have definitely worked, one upload of the bootloader, and then about 30 sketch uploads as I checked out all the IO pins.
Hopefully there wasn't some other change I made that I've totally forgotten about O)


Thanks CrossRoads.. I'll try it out when I get home tonight!

@Florinc: I got a feeling that it could be the crystal.. I couldn't try any other one because that was the  last one I had.. I'll go buy bunch later today! Thank you for the tip!!!


You might also want to look at the caps you are using with the crystal.  I have a batch of crystals that work at frequency with 18pF caps, but are either well off frequency or not even oscillating with 22pF caps.


i'm using a 16MHz 30pF crystal with 22pF capacitors.. I dunno how sensitive these crystals are.. I already made a bunch of home made arduino uno's with the same crystals and caps... Hmmm, but I'll definitely give it a thought.. thx for the tip bro! :)

baselsw

#434
Aug 07, 2012, 08:47 pm Last Edit: Aug 07, 2012, 08:50 pm by baselsw Reason: 1
Ohh this thing is killing me!! CrossRoads, I tried the bootloader you posted and I changed the crystals and I also tried changing the 22pF caps to 18pF caps. All of this gave me the same results when trying to upload the blink sketch. Error: programmer is out of sync!

Here is the avrdude output for burning the bootloader: https://dl.dropbox.com/u/74389175/Avrdude_bootloader_output.txt

And here is the Blink sketch output (Upload): https://dl.dropbox.com/u/74389175/Avrdude_Blink_sketch_output.txt

And here is my setup (sorry for the mess =P):
http://img94.imageshack.us/img94/4550/imag0291l.jpg

P.S The positive trail on the bottom of the breadboard is actually the ground trail and vice versa! D.S

Go Up