MCU Mega2560 programing, crazy problem

Hi,

I have a PCB where i have 1 MCU328P and 2 MCU2560 units. I have been using an ATmega328p to program the ATmega2560 MCUs successfully.

The other day trying to do some code fast i developed a sketch that programmed the 2 2560MCUs, strangely the skecth did something to the MCUs that impossibilitated any other programing after that...

Plus, when i tried to access the 2560 via AVRisp II i wasn´t able to connect to them or even read the signature.
The AVRisp fails at "Entering programing mode" just like my skecth.

Does someone has any clue of what problem this might be and what i can do to solve it?

PS: I am using a version of the "ATmegaHEXuploader" skecth from Nick Gammon

Are you using ISP to program the 2560's? If so, are you isolating the chips during programming? If both chips are on the same bus maybe, that is causing the problem.

Does your "programming" sketch fiddle with the fuses? Did you disable the SPIEN fuse?

Hi ,

Hi think there might have been some bus sharing in that case, that might have provoked some fuse fiddling...

What would be the impact of messing with the SPIEN fuse?

Basically the unit doesn´t talk to me when i connect it to the AVRISP II, doesn´t even allow signature reading.

Hi again,

Been reading about SPIEN:

  • SPIEN - Enable Serial Program and Data Downloading - 0 (programmed, SPI prog.enabled)

If not at o state i wouldn´t be able to program de Chip, but in the later part of the table it sais:

  • The SPIEN Fuse is not accessible in serial programming mode.

So i still don´t know what it might be...