80series are not that ideal when it comes to driving inductive loads. this is as a result of their internal architecture where data/address has to make use of one path "von Neumann" Architecture. as this may result to error in terms of execution. the microcontroller may fetch wrongly when it is subjected to a strong EMI. so you have to be very careful when dealing with inductive loads; you will surely see the flaws of the 8051 micros!
so...
do a total isolation between the motor and the ground path of your circuit since it will not affect the operation of your design....as this will introduce noise looking at the power supply rails and thus will end up making the microcontroller to reset. also as suggested, do a proper power supply filtering.
ground the body of the crystal for a safer operation of the internal clock ciruit.
also increase the inductance of the ground by thickening the ground lines....if you have a vero board in your design then simply short unused copper line to the ground of your circuit.
above all you can shield your circuit from EMI generated by the motor....because this is a threat!
check out the image...
hope this helps
sequel...
- - - Updated - - -
80series are not that ideal when it comes to driving inductive loads. this is as a result of their internal architecture where data/address has to make use of one path "von Neumann" Architecture. as this may result to error in terms of execution. the microcontroller may fetch wrongly when it is subjected to a strong EMI. so you have to be very careful when dealing with inductive loads; you will surely see the flaws of the 8051 micros!
so...
do a total isolation between the motor and the ground path of your circuit since it will not affect the operation of your design....as this will introduce noise looking at the power supply rails and thus will end up making the microcontroller to reset. also as suggested, do a proper power supply filtering.
ground the body of the crystal for a safer operation of the internal clock ciruit.
also increase the inductance of the ground by thickening the ground lines....if you have a vero board in your design then simply short unused copper line to the ground of your circuit.
above all you can shield your circuit from EMI generated by the motor....because this is a threat!
check out the image...
hope this helps
sequel...