DM163010 Microchip Technology, DM163010 Datasheet - Page 27

BOARD DEMO PICDEM USB

DM163010

Manufacturer Part Number
DM163010
Description
BOARD DEMO PICDEM USB
Manufacturer
Microchip Technology
Datasheet

Specifications of DM163010

Processor To Be Evaluated
PlC16C745/765
Interface Type
USB
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
2.3
©
2001 Microchip Technology Inc.
Combination Gameport/PS/2/Mouse - USB
Translator
2.3.1
2.3.2
2.2.11.1 Keyboard
Incoming PS/2 data can be one to eight bytes long. No pattern or mathemati-
2.2.11.2 Mouse
The mouse translation from a PS/2 format to a USB format is very simple. The
Introduction
The low speed USB interface has two endpoints. Each endpoint can be con-
Using Multiple Endpoints
There is a hierarchy of descriptors for every USB device. For a HID device
1. Get_Device_Descriptor
2. Get_Configuration_Descriptor
3. Get_Report_Descriptor
4. Get_String_Descriptor
cal expression can be used to convert incoming PS/2 data to a USB keycode.
USB keycodes are one byte in length. There is one USB keycode for every
key on the keyboard. A lengthy lookup table is used to implement the transla-
tion from PS/2 to USB keycodes. The lookup table is found in file
table_kb.asm of the example firmware. The USB keycodes are shown in
Section 9 of the HID Usage Tables document.
PS/2 button states are simply copied into the correct bits in the USB buffer.
The data overflow and data sign bits in the first PS/2 byte are not necessary
and are therefore, not transferred to the corresponding USB byte. The X-axis
bytes are identical in both the PS/2 and USB data formats. The PS/2 Y-axis
byte is complimented in order to mirror the byte and is then passed into the
last byte of the USB mouse data. This makes three bytes of USB mouse data.
You may notice, however, that four bytes are sent to the PC in the example
code. This is because a mouse is unique, in that it is a boot device and as
such, has a stringent format defined for it. This format requires that four bytes
always be sent, despite the possibility that the last byte may not be needed
for a particular mouse. This fourth byte is reserved for the scrolling wheel
found on some mice.
figured for transmit or receive, but not both. Each endpoint has its own report
descriptor. This example shows how you can create a combination device
that provides a completely different interface over two different endpoints. A
gamepad is reported on EP2 while EP1 reports a mouse.
that uses only one interface, the hierarchy is shown in Figure 2.4. During enu-
meration, the host will ask the device for its descriptors with the following
sequence of requests.
USB Demonstration Code
DS41174A-page 23

Related parts for DM163010