I have got the following circuit diagram.
For a little explanation. When the button is pressed the µC is powered for about 10 sec. The µC contains code that moves the servo. When the servo is connected it takes so much power that the µC resets all the time. How can I change the circuit that this does not happen?
It is powered by a 9 volt block.
Now I changed the power supply for the servo with an other 7805 like this circuit diagram:
Now the µC resets a bit later.