77范文网 - 专业文章范例文档资料分享平台

Designing a low cost CY7C63723 combination mouse(3)

来源:网络收集 时间:2021-01-20 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

The reference firmware is configured to use theGPIO pins as shown on the schematic in

appendix A. However, it may be more optimal foryou to use a different IO configuration to meet themechanical constraints of your particular PCB.The reference firmware is designed to be easilyconfigured to another set of pin connections.This is accomplished through changes in the IOdefinitions at the beginning of the combi.c listing.The following statements are the pin definitionsas they exist today. The firmware will use thesedefinitions to read and configure the GPIO pins,without any other modifications.#define OPTICS_PORTPORT0#define OPTICS_MASK

0x3f

#define GET_X_OPTICS(x) ((x >> 0)&0x3)#define GET_Y_OPTICS(x) ((x >> 2)&0x3)#define GET_Z_OPTICS(x) ((x >> 4)&0x3)#define LEFT_SWITCH_PORTPORT0#define LEFT_SWITCH_MASKBIT7#define RIGHT_SWITCH_PORTPORT1#define RIGHT_SWITCH_MASKBIT0#define MIDDLE_SWITCH_PORTPORT1#define MIDDLE_SWITCH_MASKBIT1#define PORT0_OPTICS_MASK0b00111111#define PORT1_OPTICS_MASK0b00000000#define PORT0_LED_MASK0b01000000#define PORT1_LED_MASK

0b00000000#define PORT0_SWITCH_MASK0b10000000#define PORT1_SWITCH_MASK

0b00000011

Mouse Optics

The standard way mouse optics are connectedare via two phototransistors connected in asource follower configuration. An infrared LEDshines, causing the phototransistors to turn on.In between the phototransistors and LED is apinwheel that turns on the mouse ball rollers.

The fan of this pinwheel is mechanically designedto block the infrared light such that thephototransistors are turned on and off in a

quadrature output pattern. Every change in thephototransistor outputs represents a count ofmouse movement. Comparing the last state ofthe optics to the current state derives directioninformation. As is shown in figure 2.0 below,travelling along the quadrature signal to the rightproduces a unique set of state transitions, andtravelling to the left produces another set of

unique state transitions. In this reference design,

InfraredPhoto-

Figure 2.0 Optics Quadrature Signal Generation

Mouse Buttons

Mouse buttons are connected as standardswitches. These switches are pulled up by thepull up resistors inside the microcontroller.

Normally the switches are debounced in firmwarefor 15-20ms. In this reference design there arethree switches: left, wheel, and right.

USB and PS/2 Connection

The CY7C63723 has a configuration register thatswitches control from the SIE to manual controlon the D+ and D- pins. This allows the firmwareto dynamically configure itself to operate on thebus you plug the mouse into. This way the

signaling lines for USB and PS/2 can be sharedwithout taking extra GPIO pins for PS/2

operation. The firmware for this reference designwill automatically detect the host topology (USBor PS/2) at plug-in and will configure itself foroperation on that bus.

If a USB host connection is detected then thefirmware will enable the VREG pin, such that the1.3k resistor connected to the D- line can bepulled up to 3.3V. It is this action that causes thehost to recognize that there is a low-speed USBperipheral attached.

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库Designing a low cost CY7C63723 combination mouse(3)在线全文阅读。

Designing a low cost CY7C63723 combination mouse(3).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/jiaoyu/1180011.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: