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