Hi. I´ve been trying to programm an ATMEGA2561 using ARDUINO IDE with MegaCore.
I keep getting this error:
avrdude error: program enable: target does not answer (0x01)
avrdude error: initialization failed, rc=-1
** - double check the connections and try again**
** - use -B to set lower the bit clock frequency, e.g. -B 125kHz**
** - use -F to override this check**
Failed programming: uploading error: exit status 1
I´ve not been able to programm the microcontroller.
Circuit:
The programmer circuitry is based in MCUDUDE MegaCore web:
MCU MegaCore
PCB layout:
Notes:
- I want to use internal oscillator, that's why I didn't add an external one.
- PCB manufacturer was JLCPCB. It made some PCBs to a friend a week before I got mine and my friends were fully working (Wasn't same design. My friend didn't used an MCU in his design.)
- This is the settings in ARDUINO IDE:
I´ve tried:
- Buying a new USBASP (It works when programming an ARDUINO UNO)
- Connecting an external 16 MHz oscillator with two ceramic 25 pF capacitors, not soldered to the XTAL pins but making contact with the MCU pins through jumpers.
- Using ZADIG to change my USBASP driver to all the options available.
- Using AVRDUDESS to programm the microcontroller.
- Checking continuity from the MCU to the USBASP (And everything was OK)
- Checking the MCU position in the PCB (And it's OK)
I have no idea what could it be. I'm starting to think it's a PCB design error.
Can anyone help me here? I´d appreciate it a lot.
*If something isn't clear just let me know, I'm not native english speaker and sometimes I have horrible orthography.


