16x2 LCD displays gibberish when HC-SR04 code is executed

I am able to get the lcd to work using a mini PIR, the lcd display matches the console. As soon as the code for the sensor executes I get an unreadable lcd screen but the console displays correct data from the sensor. So, the sensor works and the pir works but the lcd fails. Does anyone know why this is happening?

decarlo:
Does anyone know why this is happening?

Not until you post your code in tags. We aren't mind readers.

Also supply a sketch of your circuit and state what lcd you are using.
I've had one 1602 LCD with an I2C backpack (PF8574 based) which was very susceptible to electrical noise. Even touching the contacts could fill the screen all sorts of strange characters, some even blinking.