Readme.txt 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. This is the Readme file for the custom-class example. In this example, we
  2. show how an LED can be controlled via USB.
  3. WHAT IS DEMONSTRATED?
  4. =====================
  5. This example shows how small amounts of data (several bytes) can be
  6. transferred between the device and the host. In addition to a very basic
  7. USB device, it demonstrates how to build a host side driver application
  8. using libusb or libusb-win32. It does NOT show how usbFunctionWrite() and
  9. usbFunctionRead() are used. See the hid-data example if you want to learn
  10. about these functions.
  11. PREREQUISITES
  12. =============
  13. Target hardware: You need an AVR based circuit based on one of the examples
  14. (see the "circuits" directory at the top level of this package), e.g. the
  15. metaboard (http://www.obdev.at/goto.php?t=metaboard).
  16. AVR development environment: You need the gcc tool chain for the AVR, see
  17. the Prerequisites section in the top level Readme file for how to obtain it.
  18. Host development environment: A C compiler and libusb. See the top level
  19. Readme file, section Prerequisites for more information.
  20. BUILDING THE FIRMWARE
  21. =====================
  22. Change to the "firmware" directory and modify Makefile according to your
  23. architecture (CPU clock, target device, fuse values) and ISP programmer. Then
  24. edit usbconfig.h according to your pin assignments for D+ and D-. The default
  25. settings are for the metaboard hardware. You should have wired an LED with a
  26. current limiting resistor of ca. 270 Ohm to a free I/O pin. Change the
  27. defines in main.c to match the port and bit number.
  28. Type "make hex" to build main.hex, then "make flash" to upload the firmware
  29. to the device. Don't forget to run "make fuse" once to program the fuses. If
  30. you use a prototyping board with boot loader, follow the instructions of the
  31. boot loader instead.
  32. Please note that the first "make hex" copies the driver from the top level
  33. into the firmware directory. If you use a different build system than our
  34. Makefile, you must copy the driver by hand.
  35. BUILDING THE HOST SOFTWARE
  36. ==========================
  37. Since the host software is based on libusb or libusb-win32, make sure that
  38. this library is installed. On Unix, ensure that libusb-config is in your
  39. search PATH. On Windows, edit Makefile.windows and set the library path
  40. appropriately. Then type "make" on Unix or "make -f Makefile.windows" on
  41. Windows to build the command line tool.
  42. USING THE COMMAND LINE TOOL
  43. ===========================
  44. The command line tool has three valid arguments: "status" to query the
  45. current LED status, "on" to turn on the LED and "off" to turn it off.
  46. ----------------------------------------------------------------------------
  47. (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH.
  48. http://www.obdev.at/