Hi all again.
My question now is about the uP getting in programming mode (via SPI) due to line noise, like "playing" with the power connector.
Last time, I was using an atmega8 and had some problems with that same power connector. After "playing" for a while, atmega8's flash got corrupted. It would do anything but follow the original program. The programming cable was totally disconnected, so that wasn't the problem.
The reset circuit is, as told by atmel, a Cap and a resistor... but that doesn't help. In fact I believe it makes it worse, since the reset pin is held low until the capacitor charges (which is quite fast usually, but it wasn't thought with power noise in mind I believe).
I have a 7805 with all the capacitor related stuff, but that didn't seem to help.
I don't know if I can reproduce the situation, I haven't tried. After reprogramming the atmega8, everything worked fine, but I can't deploy a unit like that.
I thought adding pullup or pulldown resistors to sck or mosi could help.. would it?
The last choice is disabling SPI programming, but parallel programming isn't as handy as SPI... just consider SMD chips!
Well thanks to everyone again for listening,