Stepper Motor and LCD Display

I'm using LCD display and keypad to control my stepper motor. My stepper motor uses a 12Volts, 2Amperes power supply and I used L298N as its driver. My code functions well but the problem is everytime I plug in the power source for the stepper, the LCD starts malfunctioning. The display words disappears but the light is still on. LCD gets its power source in arduino mega 5v, the l298N driver also utilizes the same 5v source from it. I think that's the problem, currents jamming in because l298N also has a pin connected the the 12Volts, 2Amperes power source..... I'm not sure if that's the problem guys pls help me fix it. THANKS

12 volt motor using separate power supply.
only the gnd by coupling

Put a 47 μF capacitor (with the correct polarity) across pins 1 and 2 on the LCD board (or VCC and Gnd on the backpack).

You can change your LED display or use the power supply separately. Maybe you can find your answer in Motor & Stepper Shield for Arduino in http://www.elecrow.com/motor-stepper-shield-for-arduino-p-843.html from Elecrow. It based on the dual channel motor driver IC L298P, it is the upgrade version of the Motor Shield , which is based on L298N. Basically, these two boards have the same usage.