参数资料
型号: DM163010
厂商: Microchip Technology
文件页数: 24/80页
文件大小: 0K
描述: BOARD DEMO PICDEM USB
标准包装: 1
PICDEM? USB User’s Guide
2.2.8
PS/2 Firmware
The PS/2 firmware is entirely interrupt driven. As mentioned before, an inter-
rupt is generated when the START bit is received, at which time the firmware
will begin its receive routine. In addition to this interrupt, every 168 ms, a timer
overflow interrupts the normal program flow and implements one state of the
mouse/keyboard/cursor demonstration state machine. This state machine
handles sending bytes to and translating bytes received from the PS/2
device, automatically. These two interrupts essentially handle everything,
except for transferring the bytes via USB to the PC. In addition, it does all of
this work in the background while a developer ’s code runs in the foreground.
The only operation that the developer ’s program must implement is sending
keyboard or mouse data to the PC via USB. The developer needs only to be
concerned with the TYPE and eight BUFFER registers. BUFFER registers 0
to 7 are the registers where translated PS/2 device data gets placed. TYPE
contains the following status bits:
Table 2.3: PS/2 State Machine Status Report
TYPE bit Name
Description
0
1
2
3
CONNECTED
MOUSE
KEYBOARD
DATA READY
1 = device connected
1 = device connected is a mouse
1 = device connected is a keyboard
1 = data is ready; must be cleared by user
2.2.9
Report Descriptor
The report descriptors used in the example code for both the keyboard and
mouse were copied directly out of the HID Usage Tables. The HID Usage
Tables document is published by the USB Implementers Forum
(www.usb.org). Many other useful HID report descriptor examples can be
found in this document. The keyboard and mouse report descriptors are not
sent out at the same time that the PICmicro MCU is enumerated by the host.
Rather, the PICmicro MCU will only send the report descriptor that corre-
sponds to the device it has detected as being attached at that time.
2.2.9.1
Keyboard Descriptor
DS41174A-page 20
0x05,
0x09,
0xA1,
0x05,
0x19,
0x29,
0x15,
0x25,
0x75,
0x95,
0x81,
0x01
0x06
0x01
0x07
0xE0
0xE7
0x00
0x01
0x01
0x08
0x02
usage page (generic desktop)
usage (keyboard)
collection (application)
usage page (key codes)
usage minimum (224)
usage maximum (231)
logical minimum (0)
logical maximum (1)
report size (1)
report count (8)
input (data, variable, absolute)
2001 Microchip Technology Inc.
相关PDF资料
PDF描述
DM163012 BOARD DEMO PICDEM FOR 16C781/782
DM163024 BOARD DEMO PICDEM.NET 2
DM163025 PIC DEM FULL SPEED USB DEMO BRD
DM163028 BOARD DEMO PICDEM LCD
DM163029 BOARD PICDEM FOR MECHATRONICS
相关代理商/技术参数
参数描述
DM163010 制造商:Microchip Technology Inc 功能描述:DEMONSTRATION BOARD ((NW))
DM163011 功能描述:开发板和工具包 - PIC / DSPIC For PIC18FXX8 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163011 制造商:Microchip Technology Inc 功能描述:DEVELPMENT TOOLS ((NW))
DM163012 功能描述:开发板和工具包 - PIC / DSPIC For PIC16C781/782 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压:
DM163014 功能描述:开发板和工具包 - PIC / DSPIC PICDEM 4 RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压: