Embedded Systems October 2000 Vol13_11

Issue link:

Contents of this Issue


Page 62 of 181

JAN AXELSON HIDs Up The inclusion of a HID-class USB driver in Windows 98 and 2000 makes connecting your embedded device to a PC easier than ever. Here's everything you need to know to create a Human Interface Device. fyou're developing a device that will connect to PCs, chances are these days you'll be using the Universal Serial Bus (USB). USB is designed to serve as a replacement for most of the PC's legacy ports: parallel, seri- al, and so on. USB is versatile enough for use with many common peripheral types as well as more specialized devices. Standard peripherals that can use USB include mice, keyboards, disk drives, printers, and scanners. USB is also becoming popular for data acquisition units, test instruments, and monitoring and control devices. Just about anything that in the past would have connected to an RS-232 or parallel port is a candidate for USB. For many specialized devices, the human interface device (HID) class offers a quick path for USB developers. Although the HID specification was written to meet the needs of mice, keyboards, and similar input devices, it's broad enough to be useful for other devices that need to exchange data in both directions at moderate rates. Because Windows 98 and 2000 include HID-class drivers, there's no need to write a device driver for your new gadget. And the firmware requirements to clas- sify a device as HID are minimal, consisting mainly of a series of data structures that describe the HID interface and the data to be exchanged. The main limitation of HID is speed, with a maximum transfer rate of 64KB/ s. This is much less than the full-speed bus rate of 12Mbits/ s, but still fast enough for plenty of applications. This article is an introduction to HID development. I'll describe the firmware requirements to enable the operating system to detect the HID and exchange information with it. I'll also introduce the API functions available in Windows for communicating with HIDs. And I'll show how to use a couple of Embedded Systems Programming OCTOBER 2000 61

Articles in this issue

Archives of this issue

view archives of EETimes - Embedded Systems October 2000 Vol13_11