Because the system has its own hid driver, it eliminates the need for upper-computer driver development. For some simple devices, this is a very classic implementation solution. This article involves a lot of content, from the development of lower-computer hid devices to the Development of upper-computer application software.
Starting from the AVR-HID, The AVR-HID uses USB hid standard to achieve USB communication with the computer, to achieve sensor data collection, can support windows, Mac, Linux and other operating systems. The core of the AVR-HID is the single-chip microcomputer, which provides 8-Channel 10-bit ADC for sensing acquisition. The firmware of the AVR-HID is written in standard C, just like yesterday's prank equipment, it also uses the AVR-USB library.
Most operating systems that support USB are installed with HID drivers by default. Program Therefore, the driver development of the host computer is avoided. You can directly use the built-in driver of the system.
As for the development of upper computer application software, that is, how to use the hid driver, you can refer to the paper in "single chip microcomputer and Embedded System Application" based on the Design of USB Human-Machine Interface Based on hid, Article Using the combination of c8051f120 microcontroller and PDIUSBD12 USB controller to implement hid, after reading this article, you can have a comprehensive preliminary understanding of HID device firmware and application software development.
For the development of HID application software, I also found two instances. Code .
One is the Jan AXELSON version, and Jan AXELSON is the author of the book "USB complete". The Chinese version of "USB complete" is published by the power Publishing House and is called "USB Daquan".
On its official USB complete website, it collects a large number of network resources related to USB development, covering a variety of common USB drivers on the market, including the microchip series.
Columns, EZ-USB series, cypress series, National semiconduusbn9603, NXP PDIUSBD12, also available
A large number of examples of USB application software in different languages, including Visual Basic. net, Visual C #, Visual C ++, and so on. Download from official website
VC version of the Instance code. Click here to download the VC version of the Instance code ourdev_427277.zip (file size: 236 K) (Original file name: usbhidio_vc6.zip)
The other is the Alan Macek version. The single-chip microcomputer used by Alan is pic16c745, and its firmware is compiled in assembly. I don't catch a cold in assembly, so I didn't take a closer look at it. Alan's host software was written in Visual Basic and also in the VC version. One of his netizens, Jim koornneef, encapsulated the USB development kit (DDK) into a C ++ class (USB. h. USB. c). It is very convenient to use.
As for debugging USB communication, if there is no suitable software to help, it will be a headache. With the help of communication data monitoring software, the debugging difficulty and workload can be greatly reduced, at this point, bus hound is the most common and respected.
From: http://www.getproject.com.cn/post/34.html