rs=1;

rw=0;

en=1;

delay(8);

en=0;

}

void displaydata(unsigned char *word)

{

int x;

for(x=0;word[x]!=0;x++) //LCD的数据写入

{

lcddisplaydata(word[x]);

}

}

unsigned char array[3][4]={‘0′,’1′,’2′,’3′,

‘4’,’5′,’6′,’7′,

‘8’,’9′,’*’,’#’};

int n=0;

int m=0;

int i,p,q,r;

void main()

{

unsigned char colloc, rowloc;

unsigned char array1[4];

unsigned char array2[4]={‘3′,’1′,’1′,’2′};

unsigned char array3[4];

LOCKER1:

col=0xFF;

row=0x00;

m1=0;

m2=0;

bu=0;

mp=1;

p=0;

q=0;

r=0;

m=0;

start=1;

rst=1;

command(0x01);

command(0x38);

command(0x0C);

command(0x84);

displaydata(“PRESS KEY”);

command(0xC0);

displaydata(“FROM SYSTEM MENU”);

while(1)

{

if(start==0)

{

p=1;

goto LOCKER2;

}

else if(rst==0)

{

q=1;

goto LOCKER3;

}

}

LOCKER2:

n=0;

command(0x01);

command(0x82);

delay(10);

displaydata(“Enter Your”);

command(0xC3);

displaydata(“Password”);

delay(80);

command(0x01);

command(0x80);

goto LOCKER5;

LOCKER3:

n=0;

command(0x01);

command(0x82);

delay(10);

displaydata(“Enter Current”);

command(0xC4);

displaydata(“Password”);

delay(80);

command(0x01);

command(0x80);

goto LOCKER5;

LOCKER4:

n=0;

m=0;

command(0x01);

command(0x83);

delay(10);

displaydata(“Enter new”);

command(0xC3);

displaydata(” Password”);

delay(80);

command(0x01);

command(0x80);

q=2;

goto LOCKER5;

LOCKER5:

col=0xFF;

while(1)

{

do

{

row=0x00;

colloc=col;

colloc &=0x0f;

}while(colloc!=0x0f);

do

{

colloc=col;

colloc &=0x0f;

}while(colloc==0x0f);

while(1)

{

row=0x0E;

colloc=col;

colloc &=0x0f;

if(colloc!=0x0f)

{

rowloc=0;

break;

}

row=0x0D;

colloc=col;

colloc &=0x0f;

if(colloc!=0x0f)

{

rowloc=1;

break;

}

row=0x0LOCKER11;

colloc=col;

colloc &=0x0f;

if(colloc!=0x0f)