Set pin13 (XTAL1) as output at 1284P and now can't program or write fuses

Hi everyone!

I followed this guide to Arduino on ATmega1284P | maniacbug set up a 1284P with arduino IDE using maniacbug-mighty 1284P bootloader. It flashed ok.

The problem is that I uploaded blink sketch without changing ledpin, I left pin 13 which is XTAL1 and since then I can't program nor reflash bootloader anymore.

I use an arduino UNO as ISCP programmer.
I've tried many different things such as programming via FTDI, using AVR programmer, changing Fuses from AtmelStudio (when I do this it says write ok but verifying wrong, and fuse doesn't change, but I can read them)...

The fuses set right now, and that I can't change are:
Efuse: 0xFD
HFuse: 0xDE
LFuse: 0xFF

I'm using a 16 MHz oscillator, I've checked with a oscilloscope if it's running well and I can see pin 12 have a 16 MHz wave signal but pin 13 hasn't.

I'd appreciate very much any kind of advice to make it work.

Greetings!

Some set ups require a full swing oscillator . Set low fuse to 0xF7.

Also have you seen this?
Might want to try. http://www.gammon.com.au/forum/?id=11637

I already tried changing fuses using Atmel Studio and an AVR Programmer with no result. =(

I'll check that link thoroughly.

Thank's for your help!!

. problem is that I uploaded blink sketch without changing ledpin, I left pin 13 which is XTAL1 and since then I can't program nor reflash bootloader anymore.

This doesn't make any sense, because the pin 13 in the blink sketch refers to pin 13 on the Ardunio header, and NOT to chip pin 13.

You mean it refers to D13, and not pin13 I undestand, according to the image I attach.
Then I can't understand why I can't write fuses or program anything :~

I'll keep on trying.

Thank's for your help!