Automatic switching power the programe restart!

thanks a lot .I have deal with it and resolved.use 110 resister between the reset pin and the v5 .so the DTR sign do not cause the reset ---- and restart the program.
thanks again