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

📄 lcd_portconfig.h

📁 MzT24_Driver_C8051彩屏液晶驱动
💻 H
字号:
#ifndef	__LCD_PORTCONFIG_h__
#define	__LCD_PORTCONFIG_h__
//	write your header here

// this file for MCU I/O port or the orther`s hardware config 
// for LCD Display 
#include "C8051F020.h"
#include "intrins.h"			//包含此头文件可直接操作内核的寄存器以及一些定义好的宏

#define COM_R_ADDR        (unsigned char xdata *)0x8000
#define COM_W_ADDR        (unsigned char xdata *)0x8000
#define DAT_R_ADDR        (unsigned char xdata *)0xA000
#define DAT_W_ADDR        (unsigned char xdata *)0xA000

sbit LCD_CS = P3^2;
sbit LCD_RS = P3^3;
sbit LCD_WR = P3^4;
sbit LCD_RD = P3^5;

sbit LCD_Reset = P3^0;
/*
//Define the MCU Register
//	IO port control registers
	#define		P_IOA_Data				(volatile unsigned int *)0x7000
	#define		P_IOA_Buffer			(volatile unsigned int *)0x7001
	#define		P_IOA_Dir				(volatile unsigned int *)0x7002
	#define		P_IOA_Attrib			(volatile unsigned int *)0x7003
	#define		P_IOA_Latch				(volatile unsigned int *)0x7004

	#define		P_IOB_Data				(volatile unsigned int *)0x7005
	#define		P_IOB_Buffer			(volatile unsigned int *)0x7006
	#define		P_IOB_Dir				(volatile unsigned int *)0x7007
	#define		P_IOB_Attrib			(volatile unsigned int *)0x7008
	
// Define for the port use by LCD Driver
#define LCD_Reset			0x1000
#define LCD_CS				0x0800
#define LCD_RS				0x0400
#define LCD_Write			0x0200
#define LCD_Read			0x0100

#define LCD_CMD_Dir			P_IOB_Dir
#define LCD_CMD_Attrib		P_IOB_Attrib
#define LCD_CMD_Buffer		P_IOB_Buffer

#define LCD_Data_BUS_Out	P_IOB_Buffer
#define LCD_Data_BUS_In		P_IOB_Data
#define LCD_Data_BUS_Dir	P_IOB_Dir
#define LCD_Data_BUS_Attrib	P_IOB_Attrib

#define LCD_Data_BUS_Byte	0//1

*/
#endif

⌨️ 快捷键说明

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