Microcontroller › 8051 › Garbage values on LCD (16×2) with change in speed of DC motor › connect one 0.1 uF capacitor
connect one 0.1 uF capacitor very near to Vcc pin of 8051 micro controller
connect free wheeling diode (FWD) accross motor pins.
if this wont help. search on google for EMI protection