104键PS2接口标准键盘经典样例程序
大小:0.1 MB 人气: 2017-09-05 需要积分:0
#include "scancodes.h"
#define LCM_RW P2_1 //定义LCD引脚
#define LCM_RS P2_0
#define LCM_E P2_2
#define LCM_Data P0
#define Key_Data P3_4 //定义Keyboard引脚
#define Key_CLK P3_3
#define Busy 0x80 //用于检测LCM状态字中的Busy标识
void LCMInit(void);
void DisplayOneChar(unsigned char X, unsigned char Y, unsigned char DData);
void DisplayListChar(unsigned char X, unsigned char Y, unsigned char code *DData);
void Delay5Ms(void);
void Delay400Ms(void);
void Decode(unsigned char ScanCode);
void WriteDataLCM(unsigned char WDLCM);
void WriteCommandLCM(unsigned char WCLCM,BuysC);
unsigned char ReadDataLCM(void);
unsigned char ReadStatusLCM(void);
unsigned char code cdle_net[] = {" www.pp51.com "};
unsigned char code email[] = {"pp51com@163.com"};
unsigned char code Cls[] = {" "};
static unsigned char IntNum = 0; //中断次数计数
static unsigned char KeyV; //键值
static unsigned char DisNum = 0; //显示用指针
static unsigned char Key_UP=0, Shift = 0;//Key_UP是键松开标识,Shift是Shift键按下标识
static unsigned char BF = 0; //标识是否有字符被收到
非常好我支持^.^
(0) 0%
不好我反对
(1) 100%