有 谁 知 道 键 盘 与 主 机 之 间 的 通 信 协 议?

hequhecongqicai 2001-08-23 08:13:24
我 现 在 想 知 道 键 盘 是 如 何 与 主 机 取 得 联 系 的. 通 过 最 新 的(PS/2 口)
...全文
235 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
betsfly 2001-09-06
  • 打赏
  • 举报
回复
不知你的问题解决了没,errorzhl,给出你的地址给你发一份。
CNer 2001-08-31
  • 打赏
  • 举报
回复
11
errorzhl 2001-08-29
  • 打赏
  • 举报
回复
能给我一份吗,我现在正在写一个键盘的driver,
betsfly 2001-08-29
  • 打赏
  • 举报
回复
我前些天刚找到这方面的资料,如果你需要我发信给你,请将你的地址发到我的信箱,我的地址为luweifang@xinhuanet.com
neocosmic 2001-08-26
  • 打赏
  • 举报
回复
你可以到这里去看看
http://www.ctips.com/ps2.html
neocosmic 2001-08-26
  • 打赏
  • 举报
回复
When the PS2 mouse sends it's information it must send 3 consecutive data packets in a row. Each packet sent has different information for button pressed, movement and direction of movement. The table below shows what information is sent in each packet. Please remember that this information is of general nature and can change from one manufacturer to another. This is for a 2 button mouse, I have no idea what bit is used for other types of mouses like 3 buttons and others that have special functions like an up-down wheel for scrolling within windows.

D7 D6 D5 D4 D3 D2 D1 D0
1st YV XV YS XS 1 0 R L
2nd X7 X6 X5 X4 X3 X2 X1 X0
3rd Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0

L Left Button State (1 = pressed down)
R Right Button State (1 = pressed down)
X0-X7 Movement in the X direction
Y0-Y7 Movement in the Y direction
XS Direction of the movement in the X axis (1 = UP)
YS Direction of the movement in the Y axis (1 = LEFT)
XV,YV Overflow of the movement data bits (1 = overflow has occured)

The X and Y direction bits send the number of bits you moved since the last time this information was sent, the actual direction of the movement is sent in the XS and XY bits. If the movement of the mouse was higher than 255 data displacements since the information was last sent the overflow bit will go to one and will reset back to 0 as soon as the current data is sent. The way the driver handles overflow can change from one mouse driver to another, some may move the pointer 256 data bits and some may even decide to leave the pointer where it is! Some of you might wonder what exactly are the data bits sent for the movement bits, you will be able to shortly find this out in the i/o devices section on mouses which will be online shortly!
roy_hu 2001-08-25
  • 打赏
  • 举报
回复
你是要通过汇编得到扫描码吗?我做过。下次再说
neocosmic 2001-08-24
  • 打赏
  • 举报
回复
我有想知道哦,有人知道吗?

21,459

社区成员

发帖
与我相关
我的任务
社区描述
汇编语言(Assembly Language)是任何一种用于电子计算机、微处理器、微控制器或其他可编程器件的低级语言,亦称为符号语言。
社区管理员
  • 汇编语言
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧