main.c

来自「单片机51环境下的字库代码122*32点阵的液晶显示」· C语言 代码 · 共 63 行

C
63
字号
#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 + =
减小字号Ctrl + -
显示快捷键?