⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcm.c

📁 LCM320*240液晶驱动代码
💻 C
📖 第 1 页 / 共 5 页
字号:
		case 5:
				LCM_WriteEnglish(x,y,No5);					//写数字“0”
				break;										//中断退出
		case 6:
				LCM_WriteEnglish(x,y,No6);					//写数字“0”
				break;										//中断退出
		case 7:
				LCM_WriteEnglish(x,y,No7);					//写数字“0”
				break;										//中断退出
		case 8:
				LCM_WriteEnglish(x,y,No8);					//写数字“0”
				break;										//中断退出
		case 9:
				LCM_WriteEnglish(x,y,No9);					//写数字“0”
				break;										//中断退出
		default:
				LCM_WriteEnglish(x,y,FH0);					//写数字“*”
				break;	
	}
	switch(ge)
	{
		case 0:
				LCM_WriteEnglish(x,y+1,No0);				//写数字“0”
				break;										//中断退出
		case 1:
				LCM_WriteEnglish(x,y+1,No1);				//写数字“0”
				break;										//中断退出
		case 2:
				LCM_WriteEnglish(x,y+1,No2);				//写数字“0”
				break;										//中断退出
		case 3:
				LCM_WriteEnglish(x,y+1,No3);				//写数字“0”
				break;										//中断退出
		case 4:
				LCM_WriteEnglish(x,y+1,No4);				//写数字“0”
				break;										//中断退出
		case 5:
				LCM_WriteEnglish(x,y+1,No5);				//写数字“0”
				break;										//中断退出
		case 6:
				LCM_WriteEnglish(x,y+1,No6);				//写数字“0”
				break;										//中断退出
		case 7:
				LCM_WriteEnglish(x,y+1,No7);				//写数字“0”
				break;										//中断退出
		case 8:
				LCM_WriteEnglish(x,y+1,No8);				//写数字“0”
				break;										//中断退出
		case 9:
				LCM_WriteEnglish(x,y+1,No9);				//写数字“0”
				break;										//中断退出
		default:
				LCM_WriteEnglish(x,y+1,FH0);				//写数字“*”
				break;	
	}
}

/*=========================================================
函数名:LCM_EmptyPart()
功能:LCM显示区不存在函数
入口参数:区域号(1个字节)
出口参数:无
=========================================================*/
void LCM_EmptyPart(Uchar part)
{
	//显示【第X区为空!】
	Uchar y;												//声明变量
	LCM_ClearWorkSpace();									//清除工作区
	y=0x60;													//显示纵坐标赋值
	LCM_WriteChinese(y,0x0E,W83);							//“第”
	LCM_No(y,0x10,part);									//“X”
	LCM_WriteChinese(y,0x12,W84);							//“区”
	LCM_WriteChinese(y,0x14,W82);							//“为”
	LCM_WriteChinese(y,0x16,W35);							//“空”
	LCM_WriteChinese(y,0x18,W77);							//“!”
	if(part<60)												//如果区地址小于60
	{
	//显示【正在进行第X+1区抄表操作…】
		y=0x78;												//定位行坐标
		LCM_WriteChinese(y,0x08,W59);						//“正”
		LCM_WriteChinese(y,0x0A,W60);						//“在”
		LCM_WriteChinese(y,0x0C,W61);						//“进”
		LCM_WriteChinese(y,0x0E,W62);						//“行”
		LCM_WriteChinese(y,0x10,W83);						//“第”
		LCM_No(y,0x12,part+1);								//“X+1”
		LCM_WriteChinese(y,0x14,W84);						//“区”
		LCM_WriteChinese(y,0x16,W79);						//“抄”
		LCM_WriteChinese(y,0x18,W50);						//“表”
		LCM_WriteChinese(y,0x1A,W75);						//“操”
		LCM_WriteChinese(y,0x1C,W76);						//“作”
		LCM_WriteChinese(y,0x1E,W66);						//“…”
	}
}

/*=========================================================
函数名:LCM_CheckPartOver()
功能:LCM显示区抄完成函数
入口参数:区域号(1个字节)
出口参数:无
=========================================================*/
void LCM_CheckPartOver(Uchar part)
{
	//显示【第X区抄表完成!】
	Uchar y;												//声明变量
	LCM_ClearWorkSpace();									//清除工作区
	y=0x60;													//显示纵坐标赋值
	LCM_WriteChinese(y,0x0C,W83);							//“第”
	LCM_No(y,0x0E,part);									//“X”
	LCM_WriteChinese(y,0x10,W84);							//“区”
	LCM_WriteChinese(y,0x12,W79);							//“抄”
	LCM_WriteChinese(y,0x14,W50);							//“表”
	LCM_WriteChinese(y,0x16,W55);							//“完”
	LCM_WriteChinese(y,0x18,W56);							//“成”
	LCM_WriteChinese(y,0x1A,W77);							//“!”
	if(part<60)												//如果区地址小于60
	{
	//显示【正在进行第X+1区抄表操作…】
		y=0x78;												//定位行坐标
		LCM_WriteChinese(y,0x08,W59);						//“正”
		LCM_WriteChinese(y,0x0A,W60);						//“在”
		LCM_WriteChinese(y,0x0C,W61);						//“进”
		LCM_WriteChinese(y,0x0E,W62);						//“行”
		LCM_WriteChinese(y,0x10,W83);						//“第”
		LCM_No(y,0x12,part+1);								//“X+1”
		LCM_WriteChinese(y,0x14,W84);						//“区”
		LCM_WriteChinese(y,0x16,W79);						//“抄”
		LCM_WriteChinese(y,0x18,W50);						//“表”
		LCM_WriteChinese(y,0x1A,W75);						//“操”
		LCM_WriteChinese(y,0x1C,W76);						//“作”
		LCM_WriteChinese(y,0x1E,W66);						//“…”
	}
}

/*=========================================================
函数名:LCM_FileOpen()
功能:LCM显示文件打开函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_FileOpen(void)
{
	//显示【文件打开操作完成!】
	Uchar y;												//声明变量
	LCM_ClearWorkSpace();									//清除工作区
	y=0x68;													//显示纵坐标赋值
	LCM_WriteChinese(y,0x0B,W85);							//“文”
	LCM_WriteChinese(y,0x0D,W86);							//“件”
	LCM_WriteChinese(y,0x0F,W87);							//“打”
	LCM_WriteChinese(y,0x11,W88);							//“开”
	LCM_WriteChinese(y,0x13,W75);							//“操”
	LCM_WriteChinese(y,0x15,W76);							//“作”
	LCM_WriteChinese(y,0x17,W55);							//“完”
	LCM_WriteChinese(y,0x19,W56);							//“成”
	LCM_WriteChinese(y,0x1B,W77);							//“!”
}

/*=========================================================
函数名:LCM_FileShut()
功能:LCM显示文件关闭函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_FileShut(void)
{
	//显示【文件关闭操作完成!】
	Uchar y;												//声明变量
	LCM_ClearWorkSpace();									//清除工作区
	y=0x68;													//显示纵坐标赋值
	LCM_WriteChinese(y,0x0B,W85);							//“文”
	LCM_WriteChinese(y,0x0D,W86);							//“件”
	LCM_WriteChinese(y,0x0F,W89);							//“关”
	LCM_WriteChinese(y,0x11,W90);							//“闭”
	LCM_WriteChinese(y,0x13,W75);							//“操”
	LCM_WriteChinese(y,0x15,W76);							//“作”
	LCM_WriteChinese(y,0x17,W55);							//“完”
	LCM_WriteChinese(y,0x19,W56);							//“成”
	LCM_WriteChinese(y,0x1B,W77);							//“!”
}

/*=========================================================
函数名:LCM_SD_ReadBlockERR()
功能:LCM显示读取SD卡数据失败函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_SD_ReadBlockERR(void)
{
	//显示【读取SD卡数据失败!】
	Uchar y;												//声明变量
	LCM_ClearWorkSpace();									//清除工作区
	y=0x68;													//显示纵坐标赋值
	LCM_WriteChinese(y,0x0B,W93);							//“读”
	LCM_WriteChinese(y,0x0D,W94);							//“取”
	LCM_WriteEnglish(y,0x0F,No28);							//写字母“S”
	LCM_WriteEnglish(y,0x10,No13);							//写字母“D”
	LCM_WriteChinese(y,0x11,W41);							//“卡”
	LCM_WriteChinese(y,0x13,W53);							//“数”
	LCM_WriteChinese(y,0x15,W54);							//“据”
	LCM_WriteChinese(y,0x17,W44);							//“失”
	LCM_WriteChinese(y,0x19,W45);							//“败”
	LCM_WriteChinese(y,0x1B,W77);							//“!”
}

/*=========================================================
函数名:LCM_SD_WriteBlockERR()
功能:LCM显示写入SD卡数据失败函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_SD_WriteBlockERR(void)
{
	//显示【写入SD卡数据失败!】
	Uchar y;												//声明变量
	LCM_ClearWorkSpace();									//清除工作区
	y=0x68;													//显示纵坐标赋值
	LCM_WriteChinese(y,0x0B,W128);							//“写”
	LCM_WriteChinese(y,0x0D,W129);							//“入”
	LCM_WriteEnglish(y,0x0F,No28);							//写字母“S”
	LCM_WriteEnglish(y,0x10,No13);							//写字母“D”
	LCM_WriteChinese(y,0x11,W41);							//“卡”
	LCM_WriteChinese(y,0x13,W53);							//“数”
	LCM_WriteChinese(y,0x15,W54);							//“据”
	LCM_WriteChinese(y,0x17,W44);							//“失”
	LCM_WriteChinese(y,0x19,W45);							//“败”
	LCM_WriteChinese(y,0x1B,W77);							//“!”
}

/*=========================================================
函数名:LCM_NowDateERR()
功能:LCM显示当日无数据函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_NowDateERR(void)
{
	//显示【当日无数据!】
	Uchar y;												//声明变量
	LCM_ClearWorkSpace();									//清除工作区
	y=0x68;													//显示纵坐标赋值
	LCM_WriteChinese(y,0x0E,W91);							//“当”
	LCM_WriteChinese(y,0x10,W20);							//“日”
	LCM_WriteChinese(y,0x12,W92);							//“无”
	LCM_WriteChinese(y,0x14,W53);							//“数”
	LCM_WriteChinese(y,0x16,W54);							//“据”
	LCM_WriteChinese(y,0x18,W77);							//“!”
}

/*=========================================================
函数名:LCM_MainDataOver()
功能:LCM显示当日无数据函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_MainDataOver(void)
{
	//显示【抄表数据发送完成!】
	Uchar y;												//声明变量
	LCM_ClearWorkSpace();									//清除工作区
	y=0x68;													//显示纵坐标赋值
	LCM_WriteChinese(y,0x0B,W79);							//“抄”
	LCM_WriteChinese(y,0x0D,W50);							//“表”
	LCM_WriteChinese(y,0x0F,W53);							//“数”
	LCM_WriteChinese(y,0x11,W54);							//“据”
	LCM_WriteChinese(y,0x13,W98);							//“发”
	LCM_WriteChinese(y,0x15,W99);							//“送”
	LCM_WriteChinese(y,0x17,W55);							//“完”
	LCM_WriteChinese(y,0x19,W56);							//“成”
	LCM_WriteChinese(y,0x1B,W77);							//“!”
}

/*=========================================================
函数名:LCM_ProgramRunERR()
功能:LCM显示当日无数据函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_ProgramRunERR(void)
{
	//显示【程序运行错误!】
	Uchar y;												//声明变量
	LCM_ClearWorkSpace();									//清除工作区
	y=0x68;													//显示纵坐标赋值
	LCM_WriteChinese(y,0x0D,W95);							//“程”
	LCM_WriteChinese(y,0x0F,W96);							//“序”
	LCM_WriteChinese(y,0x11,W97);							//“运”
	LCM_WriteChinese(y,0x13,W62);							//“行”
	LCM_WriteChinese(y,0x15,W80);							//“错”
	LCM_WriteChinese(y,0x17,W81);							//“误”
	LCM_WriteChinese(y,0x19,W77);							//“!”
}

/*=========================================================
函数名:LCM_WarnTest()
功能:LCM显示正在巡检函数
入口参数:无
出口参数:无
=========================================================*/
void LCM_WarnTest(void)
{
	//显示【正在巡检,请稍候……】
	Uchar y;												//声明变量
	LCM_ClearWorkSpace();									//清除工作区
	y=0x40;													//显示纵坐标赋值
	LCM_WriteChinese(y,0x0B,W59);							//“正”
	LCM_WriteChinese(y,0x0D,W60);							//“在”
	LCM_WriteChinese(y,0x0F,W100);							//“巡”
	LCM_WriteChinese(y,0x11,W51);							//“检”
	LCM_WriteChinese(y,0x13,W78);							//“,”
	LCM_WriteChinese(y,0x15,W63);							//“请”
	LCM_WriteChinese(y,0x17,W64);							//“稍”
	LCM_WriteChinese(y,0x19,W65);							//“候”
	LCM_WriteChinese(y,0x1B,W66);							//“…”
}

/*=========================================================
函数名:LCM_0x87()
功能:LCM显示空调箱缺相函数
入口参数:纵坐标(1字节)
出口参数:无
=========================================================*/
void LCM_0x87(Uchar y)
{
	//显示【空调箱缺相】
	LCM_WriteChinese(y,0x0D,W35);							//“空”
	LCM_WriteChinese(y,0x0F,W36);							//“调”
	LCM_WriteChinese(y,0x11,W102);							//“箱”
	LCM_WriteChinese(y,0x13,W103);							//“缺”
	LCM_WriteChinese(y,0x15,W104);							//“相”
}

/*=========================================================
函数名:LCM_0x88()
功能:LCM显示档坏函数
入口参数:纵坐标(1字节)
出口参数:无
=========================================================*/
void LCM_0x88(Uchar y)
{
	//显示【档坏】
	LCM_WriteChinese(y,0x0D,W105);							//“档”
	LCM_WriteChinese(y,0x0F,W106);							//“坏”
}

/*=========================================================
函数名:LCM_0xEE()
功能:LCM显示通讯故障函数

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -