Starlight Xpress USB adapter serial port hack

Introduction
The Starlight Xpress USB adapter is a wonderful device.  It is extremely flexible and make slow image downloads a thing of the past.  However, during my excursion into reprogramming the device, it dawned on me that the full features of the 8051 (the built in microcontroller) were not being used.  My big pet peeve is the amount of cabling required for a simple imaging session.  Cables to attach the PC to the telescope, ccd camera, and the color filter wheel became too much.  I had to buy a PCMCIA serial port adapter (for $70!) just so my poor laptop could connect to everything.  With the Starligh Xpress USB adapter, the perfect interconnect was used to attach the camera.  With a little hackery and some clever device drivers, I could export the serial port on the 8051 to Linux, thus freeing up a port on my laptop, but more importantly keeping the cable rat's nest down to a dull roar.  Now my color filter wheel connect directly to the USB adapter by way of an RJ-11 connecter instead of the DB-9 used on the laptop.  The TrueTech filter wheel that I have uses telephone cable for the serial line, so this make a nice connection between devices.

The Hardware Hack
The big problem with hooking up the serial port is that the EZUSB chip is already soldered down on a PCB, and never meant to be changed.  Of course, making this change will totally void any warantee on your adapter.  If you screw it up, don't blame me.  Having said that, its a pretty easy hardware mod.  All you need is a soldering iron, some solder, a few short pieces of wire, a 7404 inverter, and an RJ-11 wall jack from Radio Shack with the colored wires inside.  Soldering wick is also a very good idea.

A 7404 is not an RS-232 port driver.  However, it does seem to work well enough for my simple device connections.  I flattened the pins on the '04 and glued it to the top of the EZ-USB chip.  Connect power and ground to it.  Both the TxD0 and RxD0 go through an inverter, but in different directions.  The TxD0 hooks to the input of an inverter and the output connects to the serial line Tx.  RxD0 hooks to the output of an inverter of which the input came from the serial Rx line.

pin description
EZUSB Pin Description

The Software
The real magic comes in the new Linux device driver and EZUSB firmware.  I've added more functions to the EZUSB for serial port I/O.  The Linux driver now registers itself as a TTY device as well as a CCD camera.  The driver controls access to the USB device to allow multiple functions to exist from the operating system standpoint.  I did have to make a small modification to GCCD, the imaging application, to add support for TTY devices named ttysx? instead of ttyS?.  GCCD just talks to the filter wheel through the TTY driver, never knowing the difference between the 16550 compatible serial port and my new USB creation.  There are some limitations to this serial port, however.  It is stuck using 8-N-1 @ 9600 baud.  Every astronomy device I've found uses this configuration.  As long as you don't plan on using the serial port for some high speed communication, you should be fine.