完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
是否存在中断驱动的示例,用于将PS/2键盘/鼠标连接到PIC微控制器?对于硬件,我已经指的是亚当ChaveSeCurruryLy1。我已经把PS/2时钟连接到了IMT0(5V宽容)引脚和PS / 2数据到一个常规(5V宽容)引脚。2。由于PS/2传输开始于数据线被拉低,我想知道是否有必要将数据引脚也连接到外部中断?希望听到你的意见!
以上来自于百度翻译 以下为原文 Are there existing any examples preferably interrupt driven for interfacing a PS/2 keyboard / mouse to a PIC microcontroller? For the hardware I'm already referring to Adam Chapweske currently 1. I've wired the PS/2 clock to INT0 (5V tolerant) pin and PS/2 data to a regular (5V tolerant) pin. 2. Since PS/2 transmission starts with the data line being pulled low I'm wondering if its necessary to wire the data pin also to an external interrupt? Hoping to hear your views! |
|
相关推荐
8个回答
|
|
嗨,我已经这样做了很多年了,很遗憾,因为这是一个愚蠢的协议,我用亚当的网站作为参考,然后修改了很多东西。我从来没有使用过中断,只是轮询和一些紧张的时机。
以上来自于百度翻译 以下为原文 Hi there, I've been doing that for years - sadly, since it's a stupid protocol I used Adam's site as a reference too, then adapted many things in the years. I never used interrupts, just polling and some tight timing. |
|
|
|
是的,我在网上找到了很多参考文献,但似乎都是轮询…有一个微芯片TB055的技术简介,它似乎是一个PS/2到USB鼠标翻译,但源代码似乎失踪。该文件是TB055 SC.ZIP
以上来自于百度翻译 以下为原文 Yes I find lots of references on the net but all seem to be polling ... there is a tech brief of Microchip TB055 which seems to be a PS/2 to USB mouse translator but the source code seems to be missing.. the file is tb055sc.zip |
|
|
|
你计时准确吗?你真的需要打断吗?
以上来自于百度翻译 以下为原文 Are you tight on timings? Do you really need interrupts? |
|
|
|
是的,我想使用中断,因为我有其他任务做发送接收的数据到USB,除了处理串行任务等。
以上来自于百度翻译 以下为原文 Yes I would like to use interrupts because I have other tasks to do sending the received data to USB and apart from than handling serial tasks etc.. |
|
|
|
我明白了。嗯,应该是可行的。我使用轮询创建了USB/PS2桥和RS232/PS2桥,它是“足够好”…@15-30KHz,从PS/2到PS/2的一个字节需要大约0.5-1mS。
以上来自于百度翻译 以下为原文 I see. Well, it should be doable. I made USB/PS2 bridges and RS232/PS2 bridges using polling, and it was "good enough"... @15-30KHz, one byte from/to PS/2 takes some 0.5-1mS |
|
|
|
是不是太麻烦了,使它完全中断的基础?我已经使用了从MAL轮询模式的USB例子,我们需要定期调用一些USB功能。如果鼠标设备想在这期间发送,我可能会错过一些事件…正确的?
以上来自于百度翻译 以下为原文 would it be too much of a hassle for making it entirely interrupt based? I'm using USB example from MAL in polling mode already and we need to call some USB functions on a regular basis. In case the mouse device wants to send during this I may miss some events ... right? |
|
|
|
嗯,是的。这就是为什么我会在中断模式下使用USB并使用轮询模式PS/ 2。
以上来自于百度翻译 以下为原文 Well, yes. that's why I'd use USB in interrupt mode and go with the polled mode PS/2 |
|
|
|
它会在一# ifdef使中断模式USB在马尔的另一个因素是我要处理一个PS/2键盘和PS/2鼠标以便进一步复杂事情简单轮询模式。
以上来自于百度翻译 以下为原文 Would it be as simple as commenting out a #ifdef to enable interrupt mode USB in the MAL. The other factor is I have to handle a PS/2 keyboard and PS/2 mouse so that further complicates things for polling mode. |
|
|
|
只有小组成员才能发言,加入小组>>
5248 浏览 9 评论
2037 浏览 8 评论
1957 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3218 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2265 浏览 5 评论
788浏览 1评论
679浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
608浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
685浏览 0评论
582浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-28 06:28 , Processed in 1.562639 second(s), Total 90, Slave 74 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号