Jeremy.Infogami

Set Shuttle VFD

VFD Demo

About

A number of recent Shuttle cases, eg the SD365GM include a VFD ("Versatile Front-Panel Display" in Shuttle's parlance) on the front of the case that can be used for displaying information on currently playing videos/tracks whilst your monitor is otherwise in use. It is supported under Microsoft Windows, Media Centre Edition and you can use it under other versions of Windows with XPC Tools to display information about the current CPU Temperature, Fan speeds etc.

This python script allows you to control the VFD from the command line under linux, enabling you to set the text, show or hide any of the icons displayed, or enable the 'time' mode on the device (a clock that will continue to be shown while the computer is switched off). You might just want to use it to clear the 'Shuttle XPC' text that gets displayed when the machine is started.

Details

The VFD device contains two main chips - a Cypress CY7C63723 and a PTC PT6314. The Cypress chip is a programmable USB-to-serial interface, while the PTC chip is a serial-controlled driver for a VFD display. The Cypress chip has been programmed to respond to particular instructions over USB, and use them to control what appears on the screen.

There is very little available about this display on the Internet - possibly since this (in particular) is quite a new case from Shuttle. Typically you will find mention of work done by Sandro Weiser for a University project integrating the display with lcdproc, but the code is no longer available. I couldn't find anything else, so settled for poking around with the USB device until it did the right thing - this script is the result of that.

{Update Nov 2007} There is support for this device under Freevo from Duncan Webb.

{Update Nov 2007} There is support for this device (again) in LCDproc in the current CVS - thanks to Thien Vu and Miska Sulander.

Download & Run

This software requires the Python USB libraries to be installed (and Python, of course).

Download setvfd (Version 1.1)

This code is available in the public domain - you can use it for whatever purpose you like. However, I am not responsible for anything untoward that it might do to your computer, your VFD display, your data, any other usb devices, your house, your pets, your town, your country, etc.

I've only ever used it on a Debian Linux system with pyusb version 0.3.3 and libusb version 0.1.10 (debian sarge package 'libusb-0.1-4'). It may (and probably should) work under Windows too, but I haven't tested that.

The code is pretty simple, so should be possible to port back to libusb for direct integration into C or other code. You'll probably be most interested in the device constants, the constants in sendData(), the setting date format in clock(), and the message types/structure at the top of the file.

Bugs/Features

  • You have to run this as root. This is only a mild annoyance (after all, it can be called through sudo), but if anybody can suggest a method that allows anybody to send a custom USB packet, please let me know! (email address at the top of the code file)
  • Text is centred by default. This is a feature, honest! Either modify the code to remove the .center call in split() or pad your entry with spaces to make it 20 characters long if this really bothers you.
  • The clock on the board is reasonably accurate, but will start to slip after a day or so. If you want to leave it running, I would recommend running the -t (or --time) option to reset the time periodically with a cronjob, or at least every reboot if you turn your machine on and off frequently.
  • The volume control is part of the icons, so shouldn't really be a seperate option (it will blank out any other icons set if used).
  • The display isn't very fast at updating - the clock on the serial bus is quite slow. I don't really handle this properly, just see if there's an error writing to the USB, then pause and have another go.
  • There might be some other features available that I don't know about. Let me know if you find anything! (email in code file)

History

  • 12th Jun 2006 - Initial version created
  • 16th Jun 2006 - Added call to claim interface (libusb was complaining)

Ideas

  • It would be trivial to write something that uses the data from lm-sensors to display system information like those in XPC Tools.
  • An extension to allow scrolling text. You can only update in 7-character chunks, but this might not look too ugly. Use reset() to move the cursor to the start of the line without clearing the text.
  • A C port using libusb.
  • Support under various Linux media players. The Cypress chip apparently also has an infrared receiver that you can access with a remote control under a different USB endpoint with libhid.
  • There are other commands under message type 1 that do other things to the display, including dimming the display, scrolling items left and right and blanking the screen (could be to allow drawing text on the display without appearing in parts, then display it all together). Duncan Webb (above) has found quite a number of them - contact me if you want any more information.

Pictures

Just to give you an idea of what it looks like in action. Apologies for the resolution and brightness levels of the video camera being used.

VFD in 'Time' mode (setvfd --time):
VFD Time

Full test of display (setvfd --test):
VFD Test

Contact

Jeremy James 2006-2007. My email address is in the top of the code file.

Comments