I have created sketch where Arduino goes to powerdown mode in about 1s after boot. Now I can not upload other sketch, because programmer does not get proper response. I tried to hold reset and release it at various stages during compile/upload, but it does not help. I suspect the programmer needs to communicate with Arduino for several seconds. Any advice how to erase the sketch without programmer, or how to ban the sleep mode? It is Pro Mini 168. Thanks
Hold the reset button while you start the upload. Wait until you upload first tries to connect to the Arduino, then release the reset.
If you can't get that to work, the next option is to load another Arduino with the ArduinoISP example sketch, connect the two as described in the comments, and use the 2nd Arduino to program yours.
Would another Arduino overcome this problem?
Ok, then it's time for plan B. Using a programmer (real, or simulated by another Arduino) doesn't depend on the 'failing' Arduino's bootloadloader but uses a direct (SPI) interface to program it. This article has more information.
Turn on Verbose output (Under File:preferences). Press & hold the Reset button. After the compilation ends, you will see a message like:
"Compiled xxx of 32xxx bytes". That's when the download starts - release reset. It make take a few tries to get the timing of the release correct.
If you can't get the reset to take hold, then it's time to reburn the bootloader using a Programmer connected to the ICSP pins.