I’m asking because I’m inexperienced with AVRs and couldn’t find a clear answer through google.
I designed my own ATMEGA328P dev board based on SparkFun’s Redboard:http://cdn.sparkfun.com/datasheets/Dev/ … rd-v21.pdf, so it has a blank AVR chip.
I’m still prototyping my project using an actual RedBoard so I have the code/firmware on there. Can I simply read the memory content of the 328P on the RedBoard from the 3x2 header into a hex file using a programmer like SparkFun’s Pocket AVR Programmer https://www.sparkfun.com/products/9825 or an mkII from Atmel? Then I can just flash that hex file onto my custom dev board with a blank AVR.
So in theory, this would basically give me a copy of the RedBoard with the same code, right?
I want to be able to do this because I’m making a few units of my custom 328P dev board, and don’t want to have to burn the bootloader and program through Arduino.
Thanks
So in theory, this would basically give me a copy of the RedBoard with the same code, right?
Yes, but the fuses need to set properly as well.
What are the fuses? Can you provide more detail please or a reference where I can find information. Thank you.
Essentially, I don’t care for the bootloader on my 328P devboard, because the code on my RedBoard would be the final version of my program that I want to replicate on blank chips instead of having to buy more Arduinos. To make it even simpler, can I just grab the .hex file that the Arduino IDE generates and flash that straight to a blank chip? Would the chip then function exactly and run my code as if it was on an Arduino?
The 328p data sheet describes the fuses, and it is essential to know what they are and how to set them, especially with a blank chip.
Yes, you can flash the .hex file from the Arduino IDE and it will run.
I see, but I still need to set the fuses even if I copy over the Arduino IDE compilex .hex file?
Yes. But, the easy way is to just burn the bootloader to the chip. The bootloader will set the fuses for you so you don’t have to learn what every fuse does. But, in the long run, you may want to read the section of the datasheet about the setting the fuses. Example would be if you wanted to save more power for a battery powered project.