cheekang WROTE:i believe . my problem is cause by sharing the power with the microcontroller.i know sharing the power may cause voltage unstable .so i think i will use different power source. but i wonder why cannot share ? ... can explain to me , as a knowledge.
Em...... actually is kind of easy concept
, try using a power supply that have volt meter and amp meter, tune the output voltage to let say 12V, short the both the output terminal, you will notice that the current will increase until where you tuned it and voltage will drop. Once the current is not big enough to supply to the load, in this case, short! The voltage will drop. So if voltage drop, your system will go RESET causing unstable operation.
Motor not only consume high current during operation, it also introduce what we call noise to power line as it intend to have back EMF and also magnetic interference...... which will further cause unstable condition. Hope this help.