This is a theoretical question
What would I have to do if my Atmega328 gets damaged and I replace it with a new one?
This is a theoretical question
You will need to upload the bootloader to the new Atmega328. Which you will either need an AVR programmer or a Arduino board.
This was the information I was given by @albertgajsak for the Makerbuino bootloader.
You can find the software library here with the board files along with the bootloader:
I was also told by @albertgajsak that all this information will be added to the website soon.
o, thanks for the answer
It looks like my makerbuino kit’s ATmega328 was sent out without being programmed with the bootloader. I’m not sure what to do with the files @bitfogav has linked to on his google drive. Would be grateful for any help! I don’t have an AVR programmer so will go the route of Arduino as ISP. I’m running Arduino 1.8.2 (on OS X) if that matters.
@albertgajsak, I’ll keep an eye out for this info being added to the website.
I need a new ATmega328 https://goo.gl/photos/4UwUa4kYixanGHx46
That should be salvageable, you can gently bend the pins back into place without them snapping.
Looks to me that the pins at the end have broken off at the base, don’t think that chip is salvageable?
@Lysa_Bacon MakerBuino is based on the GAMEbuino system, there for the following maybe some help in getting the bootloader onto you’re atmega382p using the Arduino to ISP? (note that I have not tested this but I hope it helps).
You will need to download the Makerbuino version of the bootloader and txt file which I posted the link above.
This would be much easier if you had a programmer like the AVR MK2 and atmel studio 6, I have tested this, and have the Makerbuino bootloader and correct fuse settings.
bitfogav - I had exactly the same question about how to install the bootloader on the same chip. I struggled for a while but finally figured out how to program it using another Arduino board.
I bought a couple of blank ATMega chips and needed to put on the bootloader. This is the procedure that I followed using Arduino software 1.8.3:
I have a Mac, so some of the steps for others may be slightly different.
Install the Ardunio software.
Dowload the Makerbuino boot loader
Put the Makerbuino bootloader in the file directory where it belongs in the Arduino file structure. This took me a while to figure out. I ended up installing another board (littleBits) to understand the file structure and then I added the littleBits “boards.txt” file and then created additional directories to hold the gamebuino bootloader.
Here is where my GameBuino bootloader file ended up:
- Edit the board.txt to include the settings required to burn the GameBuino boot loader:
Add the following to the boards.txt file. Note: The starting point for my boards.txt was from the GameBuino downloads, but had to add “arduino:” to the line “gamebuino.upload.tool=arduino:avrdude” to make it work.
In the Arduino software, go to “File -> Examples -> ArduinoISP”. Hook up your Arduino board to the USB port on your computer and Upload this program to your Arduino board.
After the ArduinoISP program is uploaded, unhook the Arduino from the computer and wire it up to a breadboard and your “empty” ATMega328 Chip as shown here:
Now hookup the Arduino board back up to your computer USB.
Select the “Tools -> Board -> Gamebuino”. Note, after you edit the boards.txt file and re-save, you have to close and restart the Arduino software so the Gamebuino will show up in the Tools->Board menu. If you restart and “Gamebuino” does not show up under “Tools->Board”, you must not have the boards.txt file in the correct location. Mine “boards.txt” file is located in this directory:
Select “Tools -> Programmer -> Arduino as ISP”.
Double-check that all your breadboard wiring is correct and all the settings in the Arduino software are correct as listed above.
Select “Tools->Burn Bootloader”.
The transmit and receive LED lights should be flashing a lot for about 30 seconds. Then the Arduino software should say that the bootloader burn was complete. If the lights just stay constant for a long time, something is wrong.
Remove the chip and plug it into a MAKERbuino and see if it works. Mine booted up directly to the settings screen. I hope yours does too!
I struggled with a lot of things to get this to work, but I think the major problem I had was learning to load the ArduinoISP on the Arduino board before hooking up the breadboard.
Hope this note helps save somebody the several hours that it took me to learn this today.
Thank you for posting! I look forward to trying this.
I don’t have a 16MHz crystal handy so either will have to wait a few weeks for it to come from China or perhaps I can set up the minimal circuit (which uses the ATmega internal 8MHz clock) and just downgrade to Arduino v. 1.6.x in order to use the available hardware configuration archive from https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard.
Following your post, I was able to load the gamebuino bootloader onto the chip! Thanks for taking the time to post!!!
A few of the pins broke off.
@Lysa_Bacon & @kmatch, I deeply apologize for the blank chip problem. This is quite unacceptable and is a result of our bad quality control. We’ve now added a two-step quality control for the microcontrollers and will not let this happen again.
In the last batch (your batch) of MAKERbuino kits, we’ve sent approx. 30 kits with blank microcontrollers because a worker swapped the box with the bootloaded ones with a box of blank microcontrollers.
This is not an excuse, I am just letting you know what caused this problem on our end (goddamn part-time students, I have to start whipping them harder - joke)
Congratulations on figuring this out, you deserve a couple of badges.
@kmatch, you are THE man! Thank you for writing this super-detailed post on how to fix this! You deserve a couple of badges and I’ll buy you a beer if we ever meet in person
@Pete_Kastner & @kastnerd, is this a case of one person using two accounts? Please use one account only, it will make everybody’s life easier. I’ve answered to your problem in the other topic where you were talking about the broken micro.
Could someone help me with the minimal configuration? I tried it, but I get a “avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.”
This has nothing to do with part-time students, and all to do with me being dumb enough to turn it off while it was loading. (Yes, I know, you can stop laughing now)
When you interrupt the loading process, the console’s memory will be blank so you have to do a hard reset like this:
- insert the SD card
- turn the console OFF
- hold the C button
- turn the console ON
- release the C button
- wait for 30 seconds
The SD card loader menu should appear.
You do not need to reflash the chip because of this
Woo, it worked! I was afraid my earlier attempts at fixing the issue might"ve borked this solution, but it totally works again, thanks!
@Gemberkoekje, glad this helped