Program doesn't work after disconnect and connect power

Thank you; I will give you more information:

  • with my carte PCB: When I upload the program with USBasp everything works well, but when I disconnect and connect the power the program deosn't work correctly.
  • with Arduino MEGA2560: The same program work perfectly even that when I disconnect and connect power again.
  • With my carte PCB: When I upload a simple program (blink) the program work perfectly even that when I disconnect and connect power again.
  • thanks Deltaflye: I will add a 100nF capacitor between GND and VCC Atmega 328 and check again.