×

104键PS2接口标准键盘经典样例程序

消耗积分:0 | 格式:rar | 大小:0.1 MB | 2017-09-05

分享资料个

#include
#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条评论

快来发表一下你的评论吧 !