基于单片机的ps2键盘的驱动设计.rar

RAR格式版权申诉手机打开展开

基于单片机的ps2键盘的驱动设计,论文标准word格式排版本文阐述了ps/2键盘工作原理及第二套扫描码和命令集,重点论述驱动设计的方案和驱动程序的编写。本驱动分为以下四大模块:单片机接收数据模块、单片机发送模块、主函数模块、键码转换模块。其中单片机接受数据模块的作用是键盘向主机发送数据,采用单个字加校验位的发送模式,这样能确保发送的数据的无误传输。单片...
编号:58-268446大小:146.42K
分类: 论文>通信/电子论文

该文档为压缩文件,包含的文件列表如下:

内容介绍

原文档由会员 莎士比亚 发布

论文标准WORD格式排版


本文阐述了PS/2键盘工作原理及第二套扫描码和命令集,重点论述驱动设计的方案和驱动程序的编写。本驱动分为以下四大模块:单片机接收数据模块、单片机发送模块、主函数模块、键码转换模块。其中单片机接受数据模块的作用是键盘向主机发送数据,采用单个字加校验位的发送模式,这样能确保发送的数据的无误传输。单片机发送模块的作用是主机向键盘发送控制命令,与接受数据的方式类似,最大的区别是其优先级别最高,不用等待时钟线拉高。主函数模块的作用是搭建一个框架使各个命令函数得以顺利的调用。键码转换模块的目的是把键盘键码转换成主机能识别的代码。该驱动程序在单片机系统中实现了对PS/2标准104键盘的支持,该程序在AT89C51单片机上运行通过,同时还可以方便的移植到其他单片机或嵌入式系统中。

关键词: PS/2协议;键盘;驱动程序;单片机;键码;流程图

ABSTRACT

This paper address the principle of the PS/2 keyboard and the second scan code and command sets, focus on design-driven programmes and the preparation of the driving procedure .The driving procedure divides into four big modules: receiving data module、 transmission module、main function module、keycode transformation module.The function of the receiving data module is sending dates to main engine by keyboard,using the transmission pattern of adding the single character to the verification position.This can guarantee the transmission of the data unmistakable . The function of transmission module is sending control command to main engine by keyboard ,which likes the way of accepting dates. The biggest difference is that it’s rank is first highest, does not need the waiting clock line to pull high. The function of main function module is building a framework so that all orders of the smooth function call.The function of keycode transformation module is converting keyboard code to host the identification code. This driving procedure which runs on AT89C52 and pass has realized the supports to PS/2 standard of 104 keyboard in the monolithic integrated circuit system . At the same time , it may also transplant to other monolithic integrated circuits or embedded system easily.

key words: PS/2 protocol; keyboard;MCU;driver program;key;flow chart