LCD Display Disrupted (displaying random characters)

Why is it my LCD display with this program display different characters that I don't know.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int pirpin=8, pirled=9, pirrelay=33; //PIR
byte state;
boolean lockLow = true;
boolean takeLowTime;
long unsigned int lowIn;
long unsigned int pause = 10000;

const int led[5] = {18, 20, 22, 24, 26};
const int rel[5] = {34, 36, 38, 40, 31};
const int dec[8] = {15, 17, 19, 21, 23, 25, 27, 29};
const byte indicator[6] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x00};
const byte relayout[6] = {0x0f, 0x0e, 0x0c, 0x08, 0x00, 0x10,};
const byte decoder[10] = {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29};

int mancnt = 0, man = 28; // manual

int autcnt = 0; // automatic

int configpin = 30; //configuration

int temp, tempPin = A6; //temperature
int ave = 0, analogValue = 0, temperature=0;
int automatic = 0;
unsigned long previoustime = 0;
unsigned long currenttime = 0;
unsigned long interval = 1000;
unsigned long previoustemp = 0;
unsigned long currenttemp = 0;
unsigned long intervaltemp = 480;

void setup(){
lcd.begin(16, 2);
pinMode(configpin, INPUT);
pinMode(man, INPUT);
pinMode(pirpin, INPUT);
pinMode(pirled, OUTPUT);
pinMode(pirrelay, OUTPUT);
pinMode(18, OUTPUT); pinMode(20, OUTPUT); pinMode(22, OUTPUT); pinMode(24, OUTPUT); pinMode(26, OUTPUT);
pinMode(34, OUTPUT); pinMode(36, OUTPUT); pinMode(38, OUTPUT); pinMode(40, OUTPUT); pinMode(31, OUTPUT);
pinMode(15, OUTPUT); pinMode(17, OUTPUT); pinMode(19, OUTPUT); pinMode(21, OUTPUT); pinMode(23, OUTPUT); pinMode(25, OUTPUT); pinMode(27, OUTPUT); pinMode(29, OUTPUT);
for(int i = 0; i < 10; i++){
digitalWrite(pirled, HIGH);
delay(500);
digitalWrite(pirled, LOW);
delay(500);
}
digitalWrite(pirled, LOW);
}

void loop(){
int config = digitalRead(configpin);
int maninc = digitalRead(man);
pirv();
output();
switch(config){
case HIGH : Manual();
leddigit(indicator[mancnt]);
relaydigit(relayout[mancnt]);
if(maninc == HIGH){
mancnt++;
leddigit(indicator[mancnt]);
relaydigit(relayout[mancnt]);
delay(100);
if(mancnt>4) {mancnt=0;}
while(digitalRead(man) == HIGH) {}
} break;
case LOW : int autinc = digitalRead(man);
temp = analogRead(tempPin);
temp = temp * 0.48848125;
currenttime = millis();
tempdisplay();
decdigit(decoder[autcnt]);
int count = 20;
if(autinc == HIGH){
autcnt++;
decdigit(decoder[autcnt]);
delay(100);
if(autcnt>9) {autcnt=0;}
while(digitalRead(man) == HIGH) {}
}
currenttemp = millis();
Temperature();
count = count + autcnt;
automatic = temperature - count;
if(automatic>=7){
leddigit(indicator[4]);
relaydigit(relayout[4]);
}
else if(automatic<7 && automatic>=5){
leddigit(indicator[3]);
relaydigit(relayout[3]);
}
else if(automatic<5 && automatic>=3){
leddigit(indicator[2]);
relaydigit(relayout[2]);
}
else if(automatic<3 && automatic>=2){
leddigit(indicator[1]);
relaydigit(relayout[1]);
}
else if(automatic<2 && automatic>=0){
leddigit(indicator[0]);
relaydigit(relayout[0]);
}
else if(automatic<0){
leddigit(indicator[5]);
relaydigit(relayout[5]);
}break;
}
}

void leddigit(byte indicator){
ledsegment(indicator);
}

void relaydigit(byte relayout){
relaysegment(relayout);
}

void decdigit(byte decoder){
decodersegment(decoder);
}

void decodersegment(byte decoder){
for(int d=0; d<8; d++){
int bit = bitRead(decoder, d);
digitalWrite(dec[d], bit);
}
}

void ledsegment(byte indicator){
for(int l=0; l<5; l++){
int bit = bitRead(indicator, l);
digitalWrite(led[l], bit);}
}

void relaysegment(byte relayout){
for(int r=0; r<5; r++){
int bit = bitRead(relayout, r);
digitalWrite(rel[r], bit);}
}

void Manual(){
lcd.clear();
lcd.print(" MANUAL");
lcd.display();
delay(10);
}

void tempdisplay(){
if(currenttime - previoustime > interval){
previoustime = currenttime;
lcd.clear();
lcd.print("Temperature ");
lcd.print(temp);
lcd.print(" C");
lcd.display();
}
}

void Temperature(){
if(currenttemp - previoustemp > intervaltemp){
previoustemp = currenttemp;
for(int q=0; q<16; q++){
analogValue += analogRead(A6);
delay(30);
}
ave = analogValue/16;
if(ave>=37 && ave<39){
temperature = 17;
}
else if(ave>=39 && ave<41){
temperature = 18;
}
else if(ave>=41 && ave<43){
temperature = 19;
}
else if(ave>=43 && ave<45){
temperature = 20;
}
else if(ave>=45 && ave<47){
temperature = 21;
}
else if(ave>=47 && ave<49){
temperature = 22;
}
else if(ave>=49 && ave<51){
temperature = 23;
}
else if(ave>=51 && ave<53){
temperature = 24;
}
else if(ave>=53 && ave<55){
temperature = 25;
}
else if(ave>=55 && ave<57){
temperature = 26;
}
else if(ave>=57 && ave<59){
temperature = 27;
}
else if(ave>=59 && ave<61){
temperature = 28;
}
else if(ave>=61 && ave<63){
temperature = 29;
}
else if(ave>=63 && ave<65){
temperature = 30;
}
else if(ave>=65 && ave<67){
temperature = 31;
}
else if(ave>=67 && ave<69){
temperature = 32;
}
else if(ave>=69 && ave<71){
temperature = 33;
}
else if(ave>=71 && ave<73){
temperature = 34;
}
else if(ave>=73 && ave<75){
temperature = 35;
}
else if(ave>=75 && ave<77){
temperature = 36;
}
else if(ave>=77 && ave<79){
temperature = 37;
}
else if(ave>=79 && ave<81){
temperature = 38;
}
else if(ave>=81 && ave<83){
temperature = 39;
}
else if(ave>=83){
temperature = 40;
}
analogValue = 0;
delay(1);
}
}

void pirv(){
if(digitalRead(pirpin) == HIGH){
if(lockLow){
lockLow = false;
state = HIGH;
}
takeLowTime = true;
}
if(digitalRead(pirpin) == LOW){
if(takeLowTime){
lowIn = millis();
takeLowTime = false;
}
if(!lockLow && millis() - lowIn > pause){
lockLow = true;
state = LOW;
}
}
}

void output(){
digitalWrite(pirled, state);
digitalWrite(pirrelay, state);
}

I want to display a "Manual" character and a real time displaying ambient temperature. The problem is when I incorporated the PIR function which is in millis() or work simultaneously with the others. The lcd display disrupts and display random characters.

First of all - go back and 'modify' your original post. You should highlight all of your code and then use the '#' code button which will create a window containing your code in a more legible form.

Also you have to tell us a little more about what you are doing with your Arduino since your program is totally uncommented. For example I see the term 'pirrelay' which implies that you may be using a relay. If you look through the old forum posts you will find dozens of examples of people having problems with their LCDs when inductive devices are being controlled.

Finally, there are two instances where you are turning your display without previously having turned it off. The library information implies that this command should not be used in this manner (although I don't see why it would be be a problem).

Don