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

📄 8279.h

📁 单片机系统中基于8279的键盘扫描程序及显示程序。
💻 H
字号:
#ifndef _8279_H_
#define _8279_H_ 1
/************************************************************************/
#include <REG51.H>
#include <absacc.H>
#include<intrins.h>
/************************************************************************/
//Global define
/************************************************************************/
#define  ComPort  XBYTE[0x7001]       /*命令状态口*/
#define  DataPort XBYTE[0x7000]       /*数据口*/

#ifndef _DATA_TYPE_
#define _DATA_TYPE_ 1
typedef  unsigned char  uchar;
typedef  unsigned int   uint;
#endif
/************************************************************************/
//Led dispaly code 
/************************************************************************/
uchar code DisplayTable[]={0x0c,0x9f,0x4a,0x0b,0x99,0x29,0x28,0x8f,
						0x08,0x89,0x88,0x38,0x6c,0x1a,0x68,0xe8};
/************************************************************************/
//Key code 
/************************************************************************/
uchar code KeyCodeTable[] = {0x01,0x08,0x09,0x10,0x18,0x20,0x02,
                            0x0a,0x11,0x19};
/************************************************************************/
//Global variable
/************************************************************************/
sbit  ClearFlag=ACC^7;

/************************************************************************/
/************************************************************************/
void Display(uchar ch,uchar position);

/************************************************************************/
/************************************************************************/
void ClearLed( void );

/************************************************************************/
/************************************************************************/
bit KeyPress( void );

/************************************************************************/
/************************************************************************/
uchar GetKeyCode( void );

/************************************************************************/
/************************************************************************/
void Init8279Dis( void ); 

#endif

⌨️ 快捷键说明

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