欢迎来到天天文库
浏览记录
ID:49501253
大小:275.00 KB
页数:3页
时间:2020-03-02
《北通游戏手柄协议说明.doc》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、北通游戏手柄协议说明2011.11.16Iciyin纠结了好几天,手柄这个终于搞定了,难于usb协议。协议不会啊,所以选择了使用ch376芯片,很强大的一个芯片啊,支持读U盘,SD卡等我使用的模块是:STATUSP333U3SD.C8D7SD.加SD_DD5PCS3-IXRXCH376S20620512101RDDOML~3模块跟51单片机接好线示,打开串口调试助手就能查看返冋的数据。51跟CH376接线的接法:D0-D7P00-P07INTOP32CSP26AOP20WRP36RDP37游戏手柄是北通BTP-C0
2、24以下是我的分析:手柄采用USB协议,通信成功麻获取HID类设备的数据如下:UZuycoUUCOal02302UJ91UZ75ybuae150026OKLEIFANOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO53142531425314567788566778550000000000000000000000000000OOOOOOOOOOOOOO11OOOOOOOOOOOOOOub77777
3、777777777Uy02£f£££f££ff££ff777777777777770000000000000000000000000000OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO425314253142535667885567788500000000000000000000000000000000000000000000000000000000777777777777777777777777777700000000000000000000000
4、00000OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO31425314253142566778556678857f7f00007f7f00007f7f00007f7f00007f7f00007f7f00007f7f00007f7f00007f7f00007f7f00007f7f00007f7f00007f7f00007f7f0000可以看出,手柄每次返冋的数据为八个字节。无动作时返冋7f7f000053000000其屮,前两个字节反应着I•字键的情
5、况,按键情况对应的前两个字节上键7f00下键7fff右键ff7f左键007f第三个字节反应8个独立按键其屮:1键:012键:023键:044键:08左边第一个键:40第二个键:10右边第一个键:80第二个键:20第四个字节反应小按键:slow键:第四个字节为00跟02之间不断切换,且其屏蔽Tselect和start按键,再次按下slow键。第四个字节变为00,打开select和start按键。Sleet键:第四个字节为01Start第四个字节为02第五个字节为51-55,61-65,71-75,81-85Z间的数据
6、。如下图150026ff007508950891020902bl02c0c0OKLEIFAN7f7f0000540000007f7f0000550000007f7f0000610000007f7f0000620000007£7f0000630000007£7f0000640000007£7f0000650000007£7f0000710000007f7£0000720000007f7f0000730000007£7f0000740000007f7f0000750000007£7f0000810000007£7f00
7、00820000007f7f0000830000007£7£0000840000007f7f0000850000007f7f0000510000007f7f0000520000007f7f0000530000007£7f0000540000007f7f0000550000007£7f0000610000007f7£0000620000007f7f0000630000007f7f0000640000007f7£0000650000007£7f0000710000007£7f0000720000007f7f000073
8、0000007f7f0000740000007£7f0000750000007f7f0000810000007f7f0000820000007f7£0000830000007£7f0000840000007f7f0000850000007f7f0000510000007f7f0000520000007f7f0000530000007f7f0000540000
此文档下载收益归作者所有