misc_usbsevseg.rst 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. =============================
  2. USB 7-Segment Numeric Display
  3. =============================
  4. Manufactured by Delcom Engineering
  5. Device Information
  6. ------------------
  7. USB VENDOR_ID 0x0fc5
  8. USB PRODUCT_ID 0x1227
  9. Both the 6 character and 8 character displays have PRODUCT_ID,
  10. and according to Delcom Engineering no queryable information
  11. can be obtained from the device to tell them apart.
  12. Device Modes
  13. ------------
  14. By default, the driver assumes the display is only 6 characters
  15. The mode for 6 characters is:
  16. MSB 0x06; LSB 0x3f
  17. For the 8 character display:
  18. MSB 0x08; LSB 0xff
  19. The device can accept "text" either in raw, hex, or ascii textmode.
  20. raw controls each segment manually,
  21. hex expects a value between 0-15 per character,
  22. ascii expects a value between '0'-'9' and 'A'-'F'.
  23. The default is ascii.
  24. Device Operation
  25. ----------------
  26. 1. Turn on the device:
  27. echo 1 > /sys/bus/usb/.../powered
  28. 2. Set the device's mode:
  29. echo $mode_msb > /sys/bus/usb/.../mode_msb
  30. echo $mode_lsb > /sys/bus/usb/.../mode_lsb
  31. 3. Set the textmode:
  32. echo $textmode > /sys/bus/usb/.../textmode
  33. 4. set the text (for example):
  34. echo "123ABC" > /sys/bus/usb/.../text (ascii)
  35. echo "A1B2" > /sys/bus/usb/.../text (ascii)
  36. echo -ne "\x01\x02\x03" > /sys/bus/usb/.../text (hex)
  37. 5. Set the decimal places.
  38. The device has either 6 or 8 decimal points.
  39. to set the nth decimal place calculate 10 ** n
  40. and echo it in to /sys/bus/usb/.../decimals
  41. To set multiple decimals points sum up each power.
  42. For example, to set the 0th and 3rd decimal place
  43. echo 1001 > /sys/bus/usb/.../decimals