So i'm a bit stuck. I've got a big project and i need to program an ATMega64 but i don't know how to.
What i've done;
I've followed this video up to the last step.
My arduino duewatermelon is set up as an ISP programer using the Arduino ISP sketch and my atmega64 is on a breadboard and connected to the arduino board. I have my arduino connected on COM3.
What i need help with;
It's just not working. I can upload sketches to the arduino just fine and my duewatermelon has always had issues with drivers but i've sorted that out. But it seems like i'm getting similar issues with avrdude as i was getting with arudino before i had resolved my driver issues.
This could be due to the fact that the pins aren't connected properly but i'm certain they are or the sketch is wrong because there might be some things that need to be changed in there.
You need to learn "avrdude" You can find documentation on the web.
Eventually you'll need a command like:
avrdude -v -patmega64 -cstk500v1 -PCOM5 -b19200 -e -Uflash:w:myfile.hex
And probably additional commands to set the fuses appropriately.
There's a youtube video that takes you from having your arduino to putting your IC onto the bread board, hooking it up, to creating the makefile but it just says "then upload your hex file via avrdude and you're done"
I think avrdude is really complicated. I'm terrified of command lines and avrdude has so many parameters.
But one last question then i should be fine;
I need to upload the bootloader and the software onto the atmega64 so how do i do that? if i upload one hex then another won't the second upload just replace the first upload similar to how it works on arduino?
Yes, it is. There is a reason that the Arduino IDE is very popular, despite being "primitive." Since you're programming a non-Arduino chip, you have to learn some of the older, more complicated commands.
I'm terrified of command lines and avrdude has so many parameters.
If it's mainly the command line that scares you, there are some GUI "front-end" programs that work with avrdude that might help.
I don't think they really make things less complicated, but they at least provide click boxes and things for the options instead of making you type them correctly. You're using Windows?
I need to upload the bootloader and the software onto the atmega64 so how do i do that?
If you have a .hex file, there is no particular reason to upload a bootloader as well. (and yes, uploading a .hex file with ArduinoISP/AVRDude will erase whatever is currently present on the chip, including the bootloader.)
(besides, I don't think you have an atmega64 bootloader ...)
Hmm. That might work. You might be able to use the bootloader to upload subsequent sketches. Or THEIR bootloader might be more important than the Arduino bootloader.
Um. Atmega64, or Atmega644 ? Those are different chips. In particular, Arduino has been ported to the 644 ("Sanguino" and related boards), so it has more potential for future efforts.
-P would be COM3 and -c would be arduino correct?
"-P" value is dependent on where the ArudinoISP system shows up on your computer.
"-c" should be "arduino" if uploading through the arduino bootloaders, but "stk500v1" if uploading via ArduinoISP running ON an arduino. I think.
the website i've linked earlier.
It does use a different bootloader from Arduino...
I have an arduino but i need to program this ATMega644pa (that's the actual chip), it's a totally different project and it does not have anything to do with arduino. I'm asking in these forums because i'm using arduino as my ISP as it's all i have on me at the moment.
It's still spitting out errors after changing -c to -c stk500v1
You definitely need a "-b 19200" option (baud rate) in your avrdude command; the default is 115200bps.
Can you post a picture of your actual setup, and a list of the commands you're actually typing?
These posts (you're far from the only one!) that say things like "I'm following the tutorial at x" are pretty useless, since most of the time the problem is some error in following the instructions...
To be honest with you, the capacitor fell out ages ago and talking about it i put it back in and i got this message.
So i'm over the moon right now. I'm so close to plugging this chip in and being able to finally wrap up the first half of my project.
Both .hex files are in the same folder as avrdude.
It's just saying that the device signature is invalid. I couldn't wait and used -F anyways. It uploaded one of the hex files but not the other. I tried to write the fuses again thinking that it would take me back a step and i'm getting the device signature error again.