I’ve designed a board that uses the Atmega328p. However, I had to burn Bootloader myself, so I used the Arduino Uno as a programmer, but now I can only upload sketch to my board via Arduino Uno (programmer) but not through the RS-232 port.
On other boards that I’ve designed with the Atmega28P Bootloader pre-burnt, I can upload sketch via RS-232 port.
Any ideas why that is?
Make sure you’ve uploaded the correct bootloader as there are a few that will work on the ATmega328. Also make sure your fusebits are correct. The Arduino IDE will grab the fusebits from a file and set those when it uploads the bootloader. This is good if you are actually uploading to an Uno, etc. But if your setup is a bit different (like using the internal clock instead of an external crystal) this might cause problems. Also, if you didn’t use the Arduino IDE to upload the bootloader you might need to set the fuse bits. If you still have questions feel free to email email@example.com with a summary of what file you used, how you uploaded the bootloader and a screenshot of any errors and they may have more answers for you.
Thank you, I’ll email tech support.
Can I upload firmware of atmega16u2 of arduino board using arduino as ISP ?
The only real requirement (other than it being an AVR) is that the Arduino IDE can compile the code first. There are things like the chip, speed, etc., that are determined using the boards.txt file. If there is no entry the Arduino IDE can not compile the code. By default the Arduino IDE does not have an ATMega16u2 entry, so you will need to add it. Otherwise the IDE should be able to compile the code and send the correct commands to avrdude.
——————– Tech Support Tips/Troubleshooting/Common Issues ——————–
If you are uploading with an the Pocket AVR programmer using the command line, make sure that you are in the directory that the hex file is located in. From there, avrdude will know where to look to flash the code to your microcontroller. For example, I have the redboard.hex file complete with an Arduino Uno bootloader that I want to flash on my RedBoard with Atmega328P. If the fuse bits are set, you would write it like so to flash the firmware and lock the fuse bits :
avrdude -b 19200 -c usbtiny -p m328P -v -e -U flash:w:redboard.hex -U lock:w:0x0F:m
Arduino Mega as the Target Board
Installing the Arduino Bootloader with Arduino Mega 2560 => [http://www.gammon.com.au/forum/?id=11635]9http://www.gammon.com.au/forum/?id=11635).
For some strange reason you will lock it as 0x0F but when checking with an Atmel AVR microcontroller, it looks to be 0xCF for the lock bits.
If you are getting an error in the Arduino IDE similar to this with the Pocket AVR Programmer:
avrdude: verification error, first mismatch at byte 0x0000
0x0c != 0x00
avrdude: verification error; content mismatch
Try looking at this tutorial => http://www.xuan-wu.com/2012-11-19-Arudino-Uno-Bootloader.
I never fully understood this particular Arduino error output. I think it has something to do with either the fuse bits or lock bits when the programmer is trying to verify the bits in Arduino’s board definitions. It could also be the write speed to the microcontroller’s flash memory or something with the RESET pin being triggered when your computer is trying to open the COM port to the Arduino development board as explained in the tutorial.
I made a short tutorial on how to burn the Bootloader by using the AVR MKII ISP, so if anyone is going that route, take a look: http://www.youtube.com/watch?v=EsLOMdu50YU&feature=youtu.be
If you've found a bug or have other constructive feedback for our tutorial authors, please send us your feedback!
Forgot your password?
No account? Register one!