DSP code & C-interface Library
DSP code

The dsp code is written in assembly language to run on the DSP56303 processor in the guider camera.  The code is built in three sections (1) a set of initialization routines, (2) an event loop that decodes the commands sent to the camera over the serial link, and (3) a set of subroutines that responds to the decoded commands.

The initialization routines do the following tasks:  set the PLL multiplier, set the address decoding for the peripherals, EEPROM, and SRAM, set up the serial link, set the internal timers and dma parameters, set the gain, readout direction and DAC voltages.

The event loop responds to commands sent over the serial link.  Each command is a single 16-bit word, divided into a byte and its complement (for error checking).  Of the 255 possible commands,  about 20 are currently used.  The event loop checks an incoming command against each implemented routine.  For each match, the corresponding subroutine is executed.  The dsp subroutines handle the following tasks:
  • write a value to memory
  • read a value from memory
  • flush the ccd
  • read the ccd
  • set the DAC voltages
  • open/close the shutter
  • frame transfer
  • check the ccd temperature
  • set the gain and dual-slope integration time


User interface library

The user interface library is a collection of c-language subroutines which operate the functions of the guider camera.  The library includes functions for the uploading of dsp code in S-record form, setting camera parameters, setting the various clock and bias voltages, reading the ccd, and so on.  Each possible function in the dsp code has a matching C-language interface routine that the user code calls to execute it.



Linux device driver

The PCI interface board is built around an AMCC S5920 chip, which bridges the PCI bus to a local bus where the serial link to the guider camera operates.  The linux device driver is a kernel module (2.4.x or 2.6.x series) that enables the linux system to work with the S5920 device (see PCI interface notes for hardware details). 

The driver software registers the hardware with the linux system, sets up buffers to read/write data from kernel space to user space, and initializes the hardware.  The device driver supports the normal interfaces -- open(), close(), read(), write(), and ioctl().

Incoming data on the serial link is translated from serial to 16-bit parallel words and stored in a FIFO on the PCI board.  The driver polls the fifo empty flag, and reads the data when the fifo is not empty.  Outgoing data is written immediately to a parallel to serial converter and sent on the serial link.




DOS driver

The guider camera may also be controlled by a DOS driver.  Please contact us for more details.


Greg Burley (burley@obs.carnegiescience.edu)
Ian Thompson (ian@obs.carnegiescience.edu)