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

📄 lcd.h

📁 实现ucos任务调度时保存LCD上的显示信息
💻 H
字号:
/*
********************************************************************************
*				 		C8051F340 LCD modular
*
*		        	  Ambition Comm Tech Ltd.Cop
*						   Jason.D.Proakis
*
* File Name		   : LCD.h
* File Description : Header file of LCD modular TBM12F64-36A.  
*			  	     
* Create Date	   : 04-21-2008
* Version	       : V1.00
* Modified History :
*					None
*
* All rights reserved.
********************************************************************************
*/

#ifndef _LCD_H_
#define _LCD_H_

#include <C8051F340.h>

/* data port and control signal line definnation */
sbit LCD_DI  = P3^4;					/* data/command select		*/			
sbit LCD_RW  = P3^5;					/* read/write select		*/
sbit LCD_E   = P3^6;					/* latch signal				*/
sbit LCD_CS1 = P1^4;					/* LCD chip select 1		*/
sbit LCD_CS2 = P1^5;					/* LCD chip select 2		*/
sbit LCD_BEN = P3^7;					/* LCD back light control	*/
#define LCD_DAT					P4		/* data port 				*/

/* const defination */
#define LCD_DISP_ON				1
#define LCD_DISP_OFF			0
#define LCD_IC1					0
#define LCD_IC2					1
#define LCD_FONT_ASC_BASE		0x00
#define LCD_FONT_HZ_BASE		1536UL
#define LCD_Y_DISP_STA_PIX		4
#define LCD_Y_DISP_STP_PIX		124
#define LCD_FONT_WIDTH			6
#define LCD_FONT_HIGHTH			16

/*
********************************************************************************
*
*						FUNCTION PROTOTYPE DECLARATION
*
********************************************************************************
*/
void LCD_init(void);

unsigned char LCD_get_stat(bit cs);
void LCD_clr(void);
void LCD_cur_home(void);
void LCD_set_cur_pos(unsigned char line,unsigned char ch_addr);

void LCD_putc(unsigned int buf);
void LCD_puts(unsigned char * buf);
void LCD_putn(unsigned char * buf,unsigned char n);

void LCD_putc_rev(unsigned int buf);
void LCD_puts_rev(unsigned char * buf);

#endif

⌨️ 快捷键说明

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