i have some issue with burning bootloader with UsbAsp. Then i got one nice tutorial about flashing IC using RPI. the programe used is avrdude.
i took the bootloader from Arduino IDE folder (optiboot_atmega328.hex) . But the same folder, there is 2 more bootloader for atmega328. Which one i need to choose. My AVR is Atmega328P-PU
and below is the output from RPI console
root@raspberrypi:~# avrdude -c gpio -p m328p -U flash:w:/home/pi/optiboot_atmega328.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/home/pi/optiboot_atmega328.hex"
avrdude: input file /home/pi/optiboot_atmega328.hex auto detected as Intel Hex
avrdude: writing flash (32768 bytes):
Writing | ################################################## | 100% 18.03s
avrdude: 32768 bytes of flash written
avrdude: verifying flash memory against /home/pi/optiboot_atmega328.hex:
avrdude: load data flash data from input file /home/pi/optiboot_atmega328.hex:
avrdude: input file /home/pi/optiboot_atmega328.hex auto detected as Intel Hex
avrdude: input file /home/pi/optiboot_atmega328.hex contains 32768 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 16.47s
avrdude: verifying ...
avrdude: 32768 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
is it ok. or do i need to do anything extra to work with arduino. The thing is one of arduino regulator IC got burned bcoz of supply issue. after that i am always getting below error
avrdude: stk500_getsync(): not in sync: resp=0x00
when i put the newly flashed IC to Arduino, same error . my board is freeduino
ChilliTronix:
If the power regulator on the Freeduino is blown I can't see the chip getting power and so no chip no ability to program it.
Should run fine on USB though.
bentech4u:
For testing, how can I convert Arduino IDE's Led blink program to .hex file. So that I can try to flash that from RPI.
If as you say, you have a working USBASP (or Arduino as ISP), you should be able to simply download the "blink" example from the Arduino IDE (which I presume you have installed in the Pi - I sure do!) instead of the bootloader. Note you can (well you can do both with some jiggery-pokery) load only one or the other using ISP.
No my UsbASP is not working, always giveng me error. and from the RPI, the chip is detecting, i can able to flash .hex files by using avrdude from command line.
i took the bootloader from Arduino IDE and flashed that, it was successful.
and the Blink excample is with .ino extension, like direct C programe.How can i convert it to hex file?
i got the hex fine and i programmed by using RPI. the supply i used is 5 v and the crystal is 15.468 MHZ(i don't have 16Mhz). after that i put that IC in to my Arduino . the the LED was in ON stage for a while after that it turned off.
it's not working and from the RPI console, the flashing was successful .
please direct me. these crystal changes will affect my programe.?
then i inserted ID to freeduino board. when i plug the USB cable, the led is blinking(3 times) after that it's gone to off state. When i try to upload the sketch blink.c from IDe, again the led is blinking and i am getting error