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

📄 main.c

📁 单片机51环境下的字库代码122*32点阵的液晶显示
💻 C
字号:
#include "AT89X51.H"
#include "lcd.h"
#include "stdio.h"
#include "keyscan.h"
#include "menu.h"
#include "DVDCTRL.h"

unsigned char CurMode,CurSignal;


void init_func()
{
	unsigned int code pstr[]={8,7,6,5};
	CurSignal=0;
	
	LCDClear();
	LCDDrawText10(10,0,4,pstr,DrawType_Normal);
	delay(11000);

	SetCtrlMode(5,1);
	SetCtrlSignal(0,0);

	CHG_LED=1;

}

void DisState()
{
	unsigned int code pstr[]={8,7,6,5};
	LCDClear();
	
	LCDDrawText10(10,0,4,pstr,DrawType_Normal);
	LCDDrawText8(menu1[CurSignal/2],50,14 ,DrawType_Normal);
	LCDDrawText8(menu2[CurMode],50,23 ,DrawType_Normal);
	LCDDrawRect(90,4,120,10,1);
	LCDDrawRect(91,5,97,9,0);
	LCDDrawRect(101,6,105,9,0);

}

void main()
{
    unsigned char KeyVal;	
	LCDInit();
//	unsigned long count=0;
	init_func();
	
	DisState();	
	while(1)
	{	
//		count++;

		KeyVal=KeyUpScan();
		if(KeyVal)
		{
			Proc();
			DisState();	
		}
		else
		{				
		}
	}
}

⌨️ 快捷键说明

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