misc_usbsevseg.txt 1.5 KB

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