I have a Mega16 on which I have somehow managed to erase all of the signature bytes to FF. It happened when I ran a program which had been assembled for the RAM layout of a different chip. Oddly, the program appeared partly to run (a 1-second LED flash based on Timer 1 was working), but next time I tried to program it, the signature bytes read out as FF FF FF.
I can make it program by forcing the programming utility to think it is a Mega16, but ideally I'd like to be able to restore the signature so that the chip works normally. I assume there is some way of writing to signature bytes, since it seems I did it accidentally, so does anyone know of any undocumented commands (preferably serial mode or self-programming, as I don't have a parallel programmer) which will allow me to write back the correct signature bytes?