Hi sir, Thanks for the replies. I will check and update Done burning bootloader. " notification seen at the bottom right corner of the Arduino IDE menu at the end of the process. Once burning bootloader is done, i understand that using upload using programmer option, i have to program the new chip atmega2560. I will use blink example code to test that 1 sec ON/OFF cycle of LEDs indicates that the controller is running with the external crystal of 16 mhz. Is that right? I will check and give the result.
I was focusing on the question about "Burn Bootloader" that reopened this topic. I didn't consider the big picture of you wanting to use "Upload Using Programmer" instead of uploading to the board via the bootloader.
When it comes to the "Upload using programmer" operation, unfortunately there might be a problem with your current USBasp firmware:
One solution would be to install the excellent community created firmware mentioned by @bperrybap on your USBasp. That firmware has a fix for the problem documented at the issue above.
If you aren't able to change the firmware on your USBasp, I think a simple alternative solution would be to install the excellent 3rd party "MegaCore" boards platform and then select Tools > Board > MegaCore > ATmega2560 and then Tools > Bootloader > No bootloader from the Arduino IDE menus (instead of Tools > Board > Arduino Mega or Mega 2560), then do another "Burn Bootloader" (which will set the fuses according to the MegaCore board definition).
After that, the problem of the sketch program not running after an "Upload Using Programmer" operation should not occur.
Hi sir, Thanks for the reply.
I was focusing on the question about "Burn Bootloader" that reopened this topic. I didn't consider the big picture of you wanting to use "Upload Using Programmer" instead of uploading to the board via the bootloader.
I understand that, If we use a factory new chip ATMEGA2560, we have to "Arduinoize" it by burning a bootloader on to it. this sets the fuses which make it compatible with the Arduino environment. My intention is, using usbasp programmer device, i have to burn bootloader into atmega2560 to arduinoize and also to upload the(eg: blink code ) into the chip. I thought that " upload using programmer " is the only option to upload the program into the chip using usbasp programmer. Is there anyother way to upload the program using usasp programmer device into the chip? And also you mentioned uploading to the board via the bootloader. How to do this? Kindly let us know.
Yes, but when you do that, it erases the entire chip, including the bootloader, since the bootloader isn't needed or used when you uploading using an ISP programmer like a USBasp programmer.
There are two main ways to get your compiled sketch code into the AVR chip.
You can use an ISP programmer such as the USBasp programmer, or you can use a bootloader.
If you use a bootloader, the upload is done over a serial interface using a serial port on the AVR and a ISP programmer is not used.
If you have an Arduino board there is a USB to serial chip that is used to convert from USB data to serial data to talk to the AVR.
If you want to use a bootloader, you have to first program the bootloader into the AVR chip.
To get the bootloader in the chip, you must use an ISP programmer such as the USBasp programmer. Once you do that, you no longer need the USBasp programmer since the upload will be done over the serial port.
If you want to use the USBasp to burn the compiled sketch code in the AVR, you can do instead. When you do that, you don't need or even use a bootloader and you use the upload using a programmer option.
--- bill
Hi Sir. Thanks for the reply.
I tried to burn the bootloader using Usbasp Programmer and found the notification Done burning bootloader
Image attached:
I compiled the blink.ino and upload to the chip using USBasp programmer with the option Upload using Programmer
It is showing as done uploading.
image attached:
after uploading the Sketch, i tested the Digital Pin 13 (that is avr chip 26th Pin using Oscilloscope). It is in continuous low state. It is not toggle with 1 sec ON/OFF with blink code. How to resolve this? kindly let us know.
Yes, I already warned you about that in post #22.
I already gave you advice on that in post #22. Please read that post very carefully and then make an effort to use one of the two solutions I mentioned there. If you have any problems or questions while doing that, come back here with a detailed report on what you tried and what happened when you tried it and we'll provide further assistance.
Hi sir. Thanks for the reply.
First i am trying with the USBASP device update Firmware with this link:
I had downloaded the .zip file from the link. I could not find any .exe file to install in it. Can you please explain the procedure to install /Update this Usbasp firmware? I am using windows 10 64 bit os.
Hi @ptillisch Sir,
Instead of using USBasp programmer for Uploading the sketch. I will use the Usbasp Programmer for burning the bootloader alone. I will Plan to upload the sketch using the serial port. Kindly recommend any official USB to TTL programmer to program via serial port(TX & RX pins). I will purchase that. This will be helpful to me.
(Or)
I am having the Arduino UNO and Arduino ATMEGA 2560 board with me for testing. Shall i use this arduino board USB port to upload the compiled sketch into my new atmega2560 chip. if yes, what can be done. Kindly let us know. this will help me a lot.
There is no .exe to directly burn the firmware.
.exe files are a windows thing. I wanted to support multiple OS environments.
There are wrapper scripts and helpers that use avrdude that allow burning from the command line or using the file manager drop and drop GUI.
Using the wrappers,
there is support for Windows and Linux or MACos if it suppors bash shell.
I tried to explain this back in post # 20
See the firmware directory for the pre-built images and the Readme.txt for information on the supplied scripts that aid in burning and provide the drag and drop burning form the OS file manager or the command line on both Windows and Linux.
Do you have a second USBasp device so you can do the update?
--- bill
Hi sir, Thanks for the reply.
I have only one usbasp programmer with me.
You will need some sort of ISP programmer in order to update the code in the usbasp device.
If you have an Arduino board you could use it as an ISP programmer using the the Arduino as an ISP sketch.
Hi sir, Thanks for the reply.
You will need some sort of ISP programmer in order to update the code in the usbasp device.
If you have an Arduino board you could use it as an ISP programmer using the the Arduino as an ISP sketch.
What is the hardware connection needed for this?
Just wires. It is ISP programming using the ISP ports on both devices.
If you google around you should be able to find some tutorials on how to wire things up and how to use the sketch.