📄 caidan.h
字号:
void menu_0()
{
uchar i;
LCD12864_clear();
while(LCD12864_readBF());
LCD12864_gotoXY(1,1); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("河南科技学院");
LCD12864_gotoXY(2,1); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("1 学院简介");
LCD12864_gotoXY(3,1); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("2 应教054 班");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("3 时间");
while(1)
{
if(Mkey_press()) //是否有按键按下
{
i=Mkey_scan(); //扫描并反回翻译后的键码
switch(i)
{
case 0xc:
menu_1_1();
break;
case 0xd:
menu_1_2();
break;
case 0xe:
menu_1_3();
break;
case 0xf:
menu_0();
break;
default:
menu_0();
break;
}
}
}
}
void menu_1_1()
{
unsigned char j,n=0;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,1); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("1 机电学院");
LCD12864_gotoXY(2,1); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("2 食品学院");
LCD12864_gotoXY(3,1); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("3 经管学院");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
// n=0;
while(!n)
{
if(Mkey_press()) //是否有按键按下
{
j=Mkey_scan(); //扫描并反回翻译后的键码
switch(j)
{
case 0xc:
menu_1_1_1();
break;
case 0xd:
menu_1_1_2();
break;
case 0xe:
menu_1_1_3();
break;
case 0xf:
menu_0();
n=1;
break;
default:
menu_1_1();
break;
}
}
}
}
void menu_1_2()
{
unsigned char j,n=0;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,0); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("全班有30名学生25");
LCD12864_gotoXY(2,0); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("名党员请按取消键");
LCD12864_gotoXY(3,1); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("谢谢!!");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
// n=0;
while(!n)
{
if(Mkey_press()) //是否有按键按下
{
j=Mkey_scan(); //扫描并反回翻译后的键码
switch(j)
{
case 0xf:
menu_0();
n=1;
break;
default:
menu_1_2();
break;
}
}
}
}
void menu_1_3()
{
shizhong();
}
/*
void menu_1_3()
{
unsigned char j,n=0;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,1); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("河南科技学院");
LCD12864_gotoXY(2,1); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("时间还未设定");
LCD12864_gotoXY(3,1); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("谢谢!!");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
// n=0;
while(!n)
{
if(Mkey_press()) //是否有按键按下
{
j=Mkey_scan(); //扫描并反回翻译后的键码
switch(j)
{
case 0xf:
menu_0();
n=1;
break;
default:
menu_1_3();
break;
}
}
}
}
*/
void menu_1_1_1()
{
unsigned char i,m;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,1); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("1 05级全体学生");
LCD12864_gotoXY(2,1); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("2 06级全体学生");
LCD12864_gotoXY(3,1); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("3 07级全体学生");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
// m=0;
while(!m)
{
if(Mkey_press()) //是否有按键按下
{
i=Mkey_scan(); //扫描并反回翻译后的键码
switch(i)
{
case 0xc:
menu_1_1_1_1();
break;
case 0xd:
menu_1_1_1_2();
break;
case 0xe:
menu_1_1_1_3();
break;
case 0xf:
menu_1_1();
m=1;
break;
default:
menu_1_1_1();
break;
}
}
}
}
void menu_1_1_2()
{
unsigned char i,m;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,1); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("食品学院名单");
LCD12864_gotoXY(2,1); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("不是特别清楚");
LCD12864_gotoXY(3,1); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("只是演示");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
// m=0;
while(!m)
{
if(Mkey_press()) //是否有按键按下
{
i=Mkey_scan(); //扫描并反回翻译后的键码
switch(i)
{
case 0xf:
menu_1_1();
m=1;
break;
default:
menu_1_1_2();
break;
}
}
}
}
void menu_1_1_3()
{
unsigned char i,m;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,1); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("经管学院名单");
LCD12864_gotoXY(2,1); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("不是特别清楚");
LCD12864_gotoXY(3,1); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("只是演示");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
// m=0;
while(!m)
{
if(Mkey_press()) //是否有按键按下
{
i=Mkey_scan(); //扫描并反回翻译后的键码
switch(i)
{
case 0xf:
menu_1_1();
m=1;
break;
default:
menu_1_1_3();
break;
}
}
}
}
void menu_1_1_1_1()
{
unsigned char w,z;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,1); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("1 20050325201");
LCD12864_gotoXY(2,1); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("2 20050325202");
LCD12864_gotoXY(3,1); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("3 20050325204");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
while(!w)
{
if(Mkey_press()) //是否有按键按下
{
z=Mkey_scan(); //扫描并反回翻译后的键码
switch(z)
{
case 0xc:
menu_1_1_1_1_1();
break;
case 0xd:
menu_1_1_1_1_2();
break;
case 0xe:
menu_1_1_1_1_3();
break;
case 0xf:
menu_1_1_1();
w=1;
break;
default:
menu_1_1_1_1();
break;
}
}
}
}
void menu_1_1_1_2()
{
unsigned char i,m;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,1); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("06级学生");
LCD12864_gotoXY(2,1); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("不是特别清楚");
LCD12864_gotoXY(3,1); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("只是演示");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
// m=0;
while(!m)
{
if(Mkey_press()) //是否有按键按下
{
i=Mkey_scan(); //扫描并反回翻译后的键码
switch(i)
{
case 0xf:
menu_1_1_1();
m=1;
break;
default:
menu_1_1_1_2();
break;
}
}
}
}
void menu_1_1_1_3()
{
unsigned char i,m;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,1); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("07级学生");
LCD12864_gotoXY(2,1); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("不是特别清楚");
LCD12864_gotoXY(3,1); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("只是演示");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
// m=0;
while(!m)
{
if(Mkey_press()) //是否有按键按下
{
i=Mkey_scan(); //扫描并反回翻译后的键码
switch(i)
{
case 0xf:
menu_1_1_1();
m=1;
break;
default:
menu_1_1_1_3();
break;
}
}
}
}
void menu_1_1_1_1_1()
{
unsigned char h,u;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,0); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("第一个按钮全部功能");
LCD12864_gotoXY(2,0); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("基本已经完成请您");
LCD12864_gotoXY(3,0); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("选择取消按钮退出");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
while(!h)
{
if(Mkey_press()) //是否有按键按下
{
u=Mkey_scan(); //扫描并反回翻译后的键码
switch(u)
{
case 0xf:
menu_1_1_1_1();
h=1;
break;
default:
menu_1_1_1_1_1();
break;
}
}
}
}
void menu_1_1_1_1_2()
{
unsigned char h,u;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,0); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("第二个按钮全部功能");
LCD12864_gotoXY(2,0); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("基本已经完成请您");
LCD12864_gotoXY(3,0); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("选择取消按钮退出");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
while(!h)
{
if(Mkey_press()) //是否有按键按下
{
u=Mkey_scan(); //扫描并反回翻译后的键码
switch(u)
{
case 0xf:
menu_1_1_1_1();
h=1;
break;
default:
menu_1_1_1_1_2();
break;
}
}
}
}
void menu_1_1_1_1_3()
{
unsigned char h,u;
LCD12864_initial();
while(LCD12864_readBF());
LCD12864_gotoXY(1,0); //第1行,第1列显示
Delayms(200);
LCD12864_sendstr("第三个按钮全部功能");
LCD12864_gotoXY(2,0); //第2行,第3列显示
Delayms(200);
LCD12864_sendstr("基本已经完成请您");
LCD12864_gotoXY(3,0); //第3行,第1列显示
Delayms(200);
LCD12864_sendstr("选择取消按钮退出");
LCD12864_gotoXY(4,1); //第4行,第2列显示
Delayms(200);
LCD12864_sendstr("4 取消");
while(!h)
{
if(Mkey_press()) //是否有按键按下
{
u=Mkey_scan(); //扫描并反回翻译后的键码
switch(u)
{
case 0xf:
menu_1_1_1_1();
h=1;
break;
default:
menu_1_1_1_1_3();
break;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -