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

📄 lcd.h

📁 指纹识别源代码,用于智能门紧,还有配合MF800卡使用
💻 H
字号:
#ifndef _LCD_H_
#define _LCD_H_
#include "reg58.h"

//sbit LCDRS=P3^0;
//sbit LCDRW=P3^1;
//sbit LCDEN=P3^2;

#define LCDDATA	P0


//writecmd
#define	CLR_DISP 0x1 			//clear the lcd 
#define	CUR_BACK 2 				//set address of ddram to 0 
#define	CUR_DEC 4 				//cursor decrease 
#define	CUR_CHAR_DEC 5 			//cursor decrease  charactor decrease too
#define	CUR_INC 6 				//cursor icrease 
#define	CUR_CHAR_INC 7 			//cursor increase  charactor increase too
#define	DISP_OFF_NCUR_NB 0x8 	//display off no cursor not blink
#define	DISP_OFF_NCUR_B 9 		//display off  no cursor blink
#define	DISP_OFF_CUR_NB 0xA 	//display off cursor not blink
#define	DISP_OFF_CUR_B 0xB 		//display off cursor blink
#define	DISP_ON_NCUR_NB 0xC 	//display on no cursor not blink
#define	DISP_ON_NCUR_B 0xD 		//display on no cursor blink
#define	DISP_ON_CUR_NB 0xE 		//display on cursor not blink
#define	DISP_ON_CUR_B 0xF 		//display on cursor blink
#define	DISP_B4_L1_H7 0x20 		//4-bits interface 1 line  5x7 matrix
#define	DISP_B4_L1_H10 0x24 	//4-bits interface  1 line  5x10 matrix
#define	DISP_B4_L2_H7 0x28 		//4-bits interface  2 lines 5x7 matrix
#define	DISP_B4_L2_H10 0x2C 	//4-bits interface  2 lines 5x10 matrix
#define	DISP_B8_L1_H7 0x30 		//8-bits interface  1 line 5x7 matrix
#define	DISP_B8_L1_H10 0x34 	//8-bits interface  1 line 5x10 matrix
#define	DISP_B8_L2_H7 0x38 		//8-bits interface  2 line 5x7 matrix
#define	DISP_B8_L2_H10 0x3C 	//8-bits interface  2 line 5x10 matrix
#define	SET_CGRAM_ADD 0x40 		//set cgram address
#define	SET_DDRAM_ADD 0x80		//set ddram address


//lcdline 
#define	LINE1	0
#define	LINE2	1
//#define	LINE3	2

//LCDMESSAGE 
#define LMMAIN		0
#define	LMINPUTPASS 	1	
#define	LMPUTFINGER 	2
#define	LMMASTERPASS 	3
#define	LMMODESELECT 	4
#define	LMIDONLY 	5
#define	LMIDFP 	6	
#define	LMIDPWFP 	7
#define	LMTIMESET 	8
#define	LMTIMEFORMAT 9
#define	LMTYPESELEC 	10
#define	LMSETAPB 	11
#define	LMSETCOMMID 	12
#define	LMSETDURESS 	13
#define	LMSETDURESSPW 	14
#define	LMSETBAUDRATE 	15
#define	LM4800 		16
#define	LM9600 		17
#define	LM19200 	18
#define	LM38400 	19
#define	LMEVENTCLEAR 	20
#define	LMYESNO 		21
#define	LMMASTERCHANGE 	22
#define	LMSYSTEMINIT 	23
#define	LMIDCLEAR 	24
#define	LMTSCLEAR 	25
#define	LMTIMESCHEDULE	26 
#define	LMSETTS 	27
#define	LMSETHOLDEF		28 
#define	LMSETHOLDEFSET 	29
#define	LMSETIODEF 	30
#define	LMEXITBUTTON 	31
#define	LMDOORCONTACT 32
#define	LMAUX1 33
#define	LMAUX2 34
#define	LMTAMPER 35
#define	LMR1IDOK 36
#define	LMR1IDERROR	37 
#define	LMR1TSERROR 38
#define	LMR1APBERROR 39
#define	LMR2IDOK 40
#define	LMR2IDERROR	41 
#define	LMR2TSERROR 42
#define	LMR2APBERROR 43
#define	LMDURESSMODE 44
#define	LMOUTPUTTS 45
#define	LMINOUTTS 46
#define	LMHOLIDAYINDEX 47
#define	LMTSINDEX 48
#define	LMSETHOLINDEX 49
#define	LMSETMODEINDEX 50
#define	LMLCDDISPLAY 51
#define	LMSTATUS 52
#define	LMCARDNO 53
#define	LMOUTPUTTIME 54
#define	LM01SEC 55
#define	LM1SEC 56
#define	LMIDREGISTRATION 57
#define	LMKEYINID 58
#define	LMHHHHHHHH 59
#define	LMUSERSETUP 60
#define	LMTOREGISTERFP	61 
#define	LMPUTFPON 62
#define	LMLIFTANDPUT	63 
#define	LMWAITTING 64
#define	LMIDREGISTED 65
#define	LMIDDELETE 66
#define	LMENTERCARDNO 67 
#define	LMIDDELETEED 68
#define	LMIDLIST 69
#define	LMIDLISTTOP 70 
#define	LMIDLISTBOTTOM 71
#define	LMIDCOUNT 72
#define	LMEVENTCOUNT 73
#define	LMFWVER 74
#define	LMV100 75
#define	LMOUTTEST 76
#define	LMLCDTEST 77
#define	LMREADERTEST 78 
#define	LMINTEST 79
#define	LMCOMMTEST 80
#define	LMBLANK 81
#define	LMUSED 82
#define	LMNUSED 83
#define	LMRAMTEST 84
#define	LMKEYTEST	85
#define LMMASTERPASSIN	86
#define LMINPUTID	87
#define LMENABLE	88
#define LMDISABLE	89
#define LMSETKEYIN	90
#define LMSETTSDETAIL1	91
#define LMSETTSDETAIL2	92
#define LMSETHOLDETAIL1	93
#define LMDATETIME		94
#define LMRAMTESTBANK		95
#define LMRAMTESTING		96
#define LMRAMTESTOK		97
#define LMRAMTESTFAIL	98
#define LMPRESSKEY	99
#define LMOUTTESTDISP	100
#define LMOUTTESTON	101
#define LMOUTTESTOFF	102
#define LMIDREGISTERED	103
#define LMUNREGISTEDID	104
#define LMIDEMPTY		105
#define LMSYSINITOK		106
#define LMINPUTNEWMASTER	107
#define LMINPUTMASTERID		108
#define LMISMASTERID		109
#define LMTYPESELECT		110
#define LMLIFTANDPUTAGAIN	111
#define LMUSERSPACEFULL		112
#define	LMIDREGISTERFAIL	113
#define LMACCESSGRANTED		114
#define LMACCESSDENIED		115
#define LMANTIPASSBACK		116
#define LMTSERROR			117
#define LMPASSWORDERR		118
#define LMFINGERERR			119
#define LMPUTOLDMASTERFP	120
#define LMMASTERCHANGEOK	121
#define LMMASTERCHANGEFAIL	122
#define LMMASTERBACKTO0		123
#define LMKEYTESTDISP		124
#define LMINITIALIZE		125
#define LMREADER1			126
#define LMREADER2			127
#define LMSCANID			128
#define LMDOORERR			129
#define LMUSERCLEANING		130
#define LMCOMMPASS			131
#define LMCOMMFAIL			132
#define LMCOMMTESTING		133
#define LMSWITCH			134
#define LMFPONLY			135


void display(unsigned char lcdline);
void init_lcd();
//void putdispbuff(unsigned char*,unsigned char lcdline);
void displaymessage(unsigned char lcdmessage,unsigned char lcdline);
void displaytime();
void displaytimeee();
void lcdcuron(unsigned char position,unsigned char line);
void displaybyte(unsigned char dispdata,unsigned char dispposi);
void displayshort(unsigned short dispdata,unsigned char count,unsigned char startposi);
void displaybcd(unsigned char dispdata,unsigned char startposi);
void displayMain();


#ifndef _LCD_C_
//extern unsigned char xdata dispmessage[][16];
extern unsigned char idata dispbuff[2][16];
extern unsigned char code dispmessage[][16];
#endif		//_LCD_C_
#endif		//_LCD_H_

⌨️ 快捷键说明

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