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

📄 config.h

📁 采用STC89C51RC单片机
💻 H
字号:
#include <REGF51RC.H> 

#include <intrins.h>
#include <stdlib.h>

typedef unsigned char  uint8;      /* 定义可移植的无符号8位整数关键字            */
typedef signed   char  int8;       /* 定义可移植的有符号8位整数关键字            */
typedef unsigned int   uint16;     /* 定义可移植的无符号16位整数关键字           */
typedef signed   int   int16;      /* 定义可移植的有符号16位整数关键字           */
typedef unsigned long  uint32;     /* 定义可移植的无符号32位整数关键字           */
typedef signed   long  int32;      /* 定义可移植的有符号32位整数关键字           */





// 以下根据需要改动


#define   LCD_DataPort	P0

sbit    DIS_WR = P1^0;		//写使能  低电平有效
sbit    DIS_RD = P1^1;		//读使能  低电平有效
sbit    DIS_CS = P1^2;		//片选使能  低电平有效
sbit    DIS_A0 = P1^3;		//数据/命令选择	DIS_A0=0时,命令; DIS_A0=1时,数据

sbit    DIS_WAIT = P1^7;		//等待信号

sbit	Key_Date = P3^2;		//ps2数据线




/*********************************************************
**				以下Flash操作相关定义
*********************************************************/

/* 定义命令 */
#define READ_AP_and_Data_Memory_Command				0x01        /*  字节读数据存储区   */
#define PROGRAM_AP_and_Data_Memory_Command          0x02        /*  字节编程数据存储区 */
#define SECTOR_ERASE_AP_and_Data_Memory_Command     0x03        /*  扇区擦除数据存储区 */

#define		DELAY_CONST         60000

/* 定义常量 */
#define ERROR   0
#define OK      1

/* 定义Flash 操作等待时间 */
#define		MCU_CLOCK_40MHz
#define		WAIT_TIME	0x00



/* 调试控制项 */
//#define         DEBUG_STC89C_LE58RD+

#define         DEBUG_STC89C_LE52RC


#define USED_BYTE_QTY_IN_ONE_SECTOR                  128



#define DEBUG_AP_Memory_Begin_Sector_addr		0x0000
#define DEBUG_AP_Memory_End_Sector_addr         0x7e00
#define DEBUG_AP_Memory_End_Byte_addr           0x7fff

#define DEBUG_Data_Memory_Begin_Sector_addr     0x8000



/*********************************************************
**					End of File
*********************************************************/

⌨️ 快捷键说明

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