Welcome! Log In Create A New Profile

Advanced

ATMega 1284P Help?

Posted by seahuston 
ATMega 1284P Help?
January 05, 2012 07:12PM
I just finished building my board and ordered a 644p and 1284p chip to use.
I tried burning the bootloader and also uploading the firmware today but ran into trouble all along the way. I think I may have burned the bootloader right but now I am even doubting that. Can anyone point me in the direct of the bootloader they used for the 1284p? I am using Arduino 1.0, perhaps that is part of the problem?
I use the Mighty1284P bootloader but when I try to upload Marlin I get an error saying the device is unrecognized unless I switch to Sanguino. When I do this I get the error that the device is not recognized making me think that it is an issue with the bootloader.
I haven't messed with the 644p too much yet as I would much rather get the 1284 working.
Thank you in advance for the help
Re: ATMega 1284P Help?
January 05, 2012 10:55PM
I would suggest trying it with Arduino 0022 IDE first.
Re: ATMega 1284P Help?
January 06, 2012 01:57AM
Don't know but i had problems with my atmega1260 board doing about the same thing. It worked great after changing computers to my up to date desktop. Would not upload on my 30 year old laptop. It uses the 1.1 usb while my desktop uses the better 2.0 usb ports. Think that may had something to do with it. You need to go into your devises manager if on Windows and see what com number the board is loading up to and set it and as you already know the proper board. The newer Aurduino program gives error data that is useful as well. Changing boards and it seeming to work or yet work different telling me you may have the wrong devise driver installed for the board your using.........good luck, Rick.
Re: ATMega 1284P Help?
January 06, 2012 06:49PM
use wiring to burn the bootloader and for uploading the program.
it looks like the arduino ide, but it supports the 1284p out of the box.

[wiring.org.co]

...eric1000
Re: ATMega 1284P Help?
January 07, 2012 05:16PM
Thanks all for the advice!
Three really great options to try. I found an atmel avr programmer at work but had trouble figuring out how to use the fuse settings from boards.txt. I have a friend who will be loaning me both a USBtiny and a 16mHz resonator (I only have the one on the Sanguinololu board). Hopefully I can get one of these options to work. As I don't have everything I need at home I will need to wait until Monday to give things a try again. I appreciate all the suggestions and will definitely report back with my findings.
For Wiring-looks like a very interesting program to use. When burning the bootloader using an arduino as an ISP did you select the WiringISP option? For the board I imagine it is simply a matter of choosing atmel->1284P? I will definitely be giving this a go.
Debating Sprinter vs. Marlin. Anybody had better or worse luck with either of these for the 1284?
Thanks!!
Re: ATMega 1284P Help?
January 07, 2012 08:32PM
I grabbed stk500v2_new.zip from here:
[aka47.adsl24.co.uk]
I built a bootloader for mega1284p @ 16MHz by hacking the Makefile, and uploaded to board using avrdude:

sudo avrdude -c avrispmkII -p atmega1284p -P usb -B 1 -U flash:w:./stk500boot.hex
sudo avrdude -c avrispmkII -p atmega1284p -P usb -U lfuse:w:0xf7:m -U hfuse:w:0xd8:m -U efuse:w:0xfc:m
sudo avrdude -c avrispmkII -p atmega1284p -P usb -B 1 -U lock:w:0x3F:m

I boot-loaded the test program that comes with GEN7, and it is working.
Now trying to get Repetier to compile in Arduino, but no support for the 1284p.
Still getting many compile errors.
Re: ATMega 1284P Help?
January 09, 2012 01:11PM
So, I got the USBtiny but am still having trouble with the 1284P. I gave up on that for now and just tried to get the 644P up and running. I burned the bootloader using AVRdude and then flashed the firmware using Arduino0023. It said done uploading without any errors but I dont know how to verify that this worked. I opened ReplicatorG set the port to my port and machine to reprap5d but it didn't look to connect. Just kept seeing: Sending G Code: Waiting for reply.
Re: ATMega 1284P Help?
January 09, 2012 01:27PM
Did you check the baud rate?
If you're sure about that, i'd suggest you try with klimet's excellent pronterface (Printrun), it tends to work with lots of different hw / fw combinations that other software refuses to connect to.
Re: ATMega 1284P Help?
January 09, 2012 11:32PM
Thanks for the advice.
Using Print Run I've gotten the 644 to be recognized. Still don't have a PSU to test steppers but a therosistor on the input pins shows a value change on Print Run.
On to more powerful things! I think I've gotten the bootloader onto the 1284 fine but am having trouble with uploading the firmware now. I seem to keep getting errors about a lack of pin definitions.
"#error pins for this chip not defined in arduino.h"
I get this using Marlin with 0022,0023,1.0 and Wiring. I imagine there is some way that I can add these definitions but I dont know how.
Re: ATMega 1284P Help?
January 11, 2012 05:24AM
I finally got the 1284P to work with Arduino on my Sanguinololu 1.3a.

The trick was to use the fuse settings described here: [stevesfixitshop.blogspot.com]

The programmer cannot be USBTinyISP since this cannot program microcontrollers with more than 64Kb of flash memory, so I used the Pololu AVR programmer [www.pololu.com]

I used the Sanguino files for Arduino 0023, and copied across the bootloader from the Mighty1284P files [github.com]


eMAKER-blue-2.png

[emaker.io]

[emaker.limited]
Re: ATMega 1284P Help?
January 12, 2012 11:55PM
Thanks a bunch for the info, especially about the USBTinyISP.
I'll try and get my hands on another programmer and see what I can do. At least I have the 644 working. A project for the future!
Re: ATMega 1284P Help?
January 27, 2012 01:23PM
I have Sanguinololu with mega1284p and crystal with 22p caps.

I tried Sanguino-0023r2.zip from
[code.google.com]

I got to flashing the mega1284p with ISP UsbAsp with the precompiled bootloader. Works flawlessly. Unfortunately, when I try programming thru serial port (FTDI chip populated) there is wrong signature returned (0x1e9703).

My conclusion after skimming thru the bootloader source: the bootloader is compiled with wrong parameters.

I'm going to try to fix the makefile, then the Mighty bootloader and then the fuse configurations suggested here: [stevesfixitshop.blogspot.com]

Good luck everyonesmiling smiley
Sorry, only registered users may post in this forum.

Click here to login