I accidentally ERASED Flash memory using TL866 programmer through the ICSP. I know that I need to set the fuses and upload a bootloader, but I tried doing this using another Arduino as ISP, programming using HEX files, but it still havent worked.
Now all thet the programmer reads is FF on every address...
SPI programmers need the microcontroller to be correctly set to the clock. Otherwise it is not possible to communicate. In this case only the High Voltage programmer can force the programming:
(Note: This is described in the original ATMEGA328 datasheet.)
Do this carefully, operating at voltage above the microcontroller pin may damage something, do it at your own risk!
If you are able to read out the flash contents, you shouldn't have to use an HV programmer - if the clock isn't set correctly, you get unknown signature (000000).
Choose the board you want, connect the ISP programmer you're using, and do "burn bootloader" from the tools menu, and the bootloader should be back and serial programming should work again.
The programmer I'm using isn't using a COM port, it uses a special program (programmer is xGecu tl866II plus) and when I try uploading through the arduino as ISP option, bootloader says that the nano has a wrong signature. I didn't find any info how to get through this "wrong signature" error...
Wiktuur:
The programmer I'm using isn't using a COM port, it uses a special program (programmer is xGecu tl866II plus) and when I try uploading through the arduino as ISP option, bootloader says that the nano has a wrong signature. I didn't find any info how to get through this "wrong signature" error...
Did you upload Arduino as ISP to the Arduino being used as ISP?
Did you put the 10uF cap between Reset and Ground on the Arduino being used as ISP after uploading Arduino as ISP? (this is necessary under some conditions)
Did you double and triple check all connections between the Arduino being used as ISP and the target?
If answer to any of those questions is no, try doing that.
If no luck
In file -> preferences, under "show verbose output", check "upload"
Attempt to burn bootloader as above.
See what signature it is actually seeing.
If it's 0x000000, you probably set the clock to use a clock source that is not present; supply a clock source to the XTAL1 pin (Somewhere there's a version of Arduino as ISP sketch that outputs a clock signal on one pin that can be used for this sort of unbricking - the default one that comes with the IDE doesn't look like it does, though)
DrAzzy:
Did you upload Arduino as ISP to the Arduino being used as ISP?
Did you put the 10uF cap between Reset and Ground on the Arduino being used as ISP after uploading Arduino as ISP? (this is necessary under some conditions)
Did you double and triple check all connections between the Arduino being used as ISP and the target?
Yes, I'm using Arduino Mega as the ISP, and I uploaded the ISP sketch into it before the whole procedure
Yes, I did that, but with the cap the problem of "wrong signature" turns into "No response"
(avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe0
avrdude: stk500_recv(): programmer is not responding)
Yes, I tried the ISP pins both 10-13 and 50-53, connecting MOSI-MOSI and MOSI-MISO, neither solved the problem.
I bought 3 arduino boards, and I think I won't try resurrecting this one. I learned from my experience not to mess with expensive equipment. Thanks guys for your help, I appreciate this fast-responding community.