Readme.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. This is the Readme file for the hid-data example. In this example, we show
  2. how blocks of data can be exchanged with the device using only functionality
  3. compliant to the HID class. Since class drivers for HID are included with
  4. Windows, you don't need to install drivers on Windows.
  5. WHAT IS DEMONSTRATED?
  6. =====================
  7. This example demonstrates how the HID class can be misused to transfer fixed
  8. size blocks of data (up to the driver's transfer size limit) over HID feature
  9. reports. This technique is of great value on Windows because no driver DLLs
  10. are needed (the hid-custom-rq example still requires the libusb-win32 DLL,
  11. although it may be in the program's directory). The host side application
  12. requires no installation, it can even be started directly from a CD. This
  13. example also demonstrates how to transfer data using usbFunctionWrite() and
  14. usbFunctionRead().
  15. PREREQUISITES
  16. =============
  17. Target hardware: You need an AVR based circuit based on one of the examples
  18. (see the "circuits" directory at the top level of this package), e.g. the
  19. metaboard (http://www.obdev.at/goto.php?t=metaboard).
  20. AVR development environment: You need the gcc tool chain for the AVR, see
  21. the Prerequisites section in the top level Readme file for how to obtain it.
  22. Host development environment: A C compiler and libusb on Unix. On Windows
  23. you need the Driver Development Kit (DDK) Instead of libusb. MinGW ships
  24. with a free version of the DDK.
  25. BUILDING THE FIRMWARE
  26. =====================
  27. Change to the "firmware" directory and modify Makefile according to your
  28. architecture (CPU clock, target device, fuse values) and ISP programmer. Then
  29. edit usbconfig.h according to your pin assignments for D+ and D-. The default
  30. settings are for the metaboard hardware.
  31. Type "make hex" to build main.hex, then "make flash" to upload the firmware
  32. to the device. Don't forget to run "make fuse" once to program the fuses. If
  33. you use a prototyping board with boot loader, follow the instructions of the
  34. boot loader instead.
  35. Please note that the first "make hex" copies the driver from the top level
  36. into the firmware directory. If you use a different build system than our
  37. Makefile, you must copy the driver by hand.
  38. BUILDING THE HOST SOFTWARE
  39. ==========================
  40. Make sure that you have libusb (on Unix) or the DDK (on Windows) installed.
  41. We recommend MinGW on Windows since it includes a free version of the DDK.
  42. Then change to directory "commandline" and run "make" on Unix or
  43. "make -f Makefile.windows" on Windows.
  44. USING THE COMMAND LINE TOOL
  45. ===========================
  46. The device implements a data store of 128 bytes in EEPROM. You can send a
  47. block of 128 bytes to the device or read the block using the command line
  48. tool.
  49. To send a block to the device, use e.g.
  50. hidtool write 0x01,0x02,0x03,0x04,...
  51. and to receive the block, use
  52. hidtool read
  53. ----------------------------------------------------------------------------
  54. (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH.
  55. http://www.obdev.at/