2. System Description

2.4 Flight Software

2.4.1 Background
2.4.2 Command Foreground
2.4.3 Detector Control CCD/ZOD Readouts Reticon/SPD Readout
2.4.4 One-Hz GML and Telemetry

WUPPE utilizes one HRM dedicated data channel and one video channel (see Figure 2.3-2). All other experiment data and commands are transmitted to/from the EC via Spacelab RAU. Refer also to the Software Requirements Document (SRD).

The flight DEP software resides in 48 k bytes of EEPROM and 2 k bytes of UV PROM, with access to 2 k bytes of variable RAM, 16 k bytes of data buffer, and 6 k bytes of video RAM (see Table 2.4-1). The code is in 6809 assembly and FORTH languages. Most processes are driven by interrupts, consisting of 8 maskable "IRQ's", a fast interrupt ("FIRQ") which signals the completion of Direct Memory Access ("DMA") operations, and a Non-Maskable Interrupt ("NMI") which runs at 1 kHz and drives a hierarchical timer service generating two 1ms, and 10ms, 100ms and 1 sec services, respectively. Table 2.4-2 illustrates the major tasks.

2.4.1 Background

The background task is entered by DEP reset, and runs continuously; it performs the high- level observation-sequence control using preplanned parameters from the internal starlist, while allowing manual input from DEP commands. The background may be in one of 14 states. The software states are illustrated in Table EO-12 in the Payload Flight Data File (PFDF). The status is reported on the joint display pages and on the status line of the WUPPE pages. Status codes in overbright require manual input to proceed to the next state; others may proceed to another state automatically. A brief description of each state is given in Table 2.4-3.

2.4.2 Command Foreground

All serial input from the RAU is placed in a hardware queue, which generates an interrupt and starts the command foreground. The command foreground empties the queue, checks for errors, and generates the correct protocol response. If the input is a user message, it is parsed and

Table 2.4-1

DEP Address Space


*NOTE: The CCTV RAM can hold either the Zoom and Spectrum displays, or the Field, or the Mosaic (=Downfield, DFLD) images.

TABLE 2.4-2

Software Task Summary

          Reset               IRQ-0                NMI                NMI
                              (RAU Rcvr.)          (100 ms Tmr.)      (1 sec Tmr.) 

          Background          Command              Detector           1 Hz
                              Foreground           Foreground         Foreground
          Initialize           RAU Input           Param. Change      Dtr. B/F Com.
          B loop               Protocol            Reticon R/O        Preview Com.
          Observe Com.         RAU Response        Scan Accum.        Edit Com.
            Setup              Com. Filter         HRM Data Out       Obs.-Param. Com.
            Locate             Com. Routing        CCD R/O            ZOD Centroid
            Observe                                                   Eng. Data Col'n
            Next Seq.                                                 RAU Serial Out
            Standby                                                   HRM Telem. Out
            Special Proc.                                             TEC Control 

          IRQ-2               IRQ-3                IRQ-4              IRQ-5
          (RS-232)            (Trap)               (CCD R/O)          (4 Hz UTC)         
          (Monitor)           (Monitor)        
          Character I/O       Address Breakpt.     Handle CCD         Update UTC
                                                    End-of-Line       RAU Data Solicit

          IRQ-5,6             NMI                  NMI                FIRQ
          (IMC Excursion)     (1, 10 ms Tmr.)      (1 ms Tmr. #2)     (DMA Op. Compl.)          
          Set IMC In/Out      ZOD Expos. Tmr.      Stepper Mtr. Tmr.  Ch0: RAU Out
          Gate SPD On/Off     CCD R/O Tmr.                            Ch1,2: HRM Out
          Count Excursions                                            Ch3: CCD R/O, Reticon R/O

TABLE 2.4-3

Software States Description

                         Normal States

     OFF    DEP off. 
     ON     Entered from DEP reset; detectors gated off. 
     SET    Hardware/software preparation for next sequence; 
            starlist parameters from a "preview";buffer are adopted as current parameters. 
     LOC    DEP attempts to locate object in off-axis aperture using ZOD CCTV picture. 
     LOC    DEP has located object and awaits further instructions. 
     MIR    Secondary mirror is articulated to place desired object in observing aperture. 
     OBS    Actual observing with spectrometer detector. 
     STB    Standby state: detectors gated off, taking backgrounds.

                         Alternate States 

     STB    Initialization /Verification "special procedure" running. 
     CUR    Locate mode with manual cursor input; object not found. 
     CUR    Locate mode with manual cursor input; object found. 
     PAU    Pause during observing. 
     BOP    Standby state with bright object present: observing inhibited.

                         Error State 

     ERR    Serious hardware error detected which halts observing. 

an initial check for legality is made through the DEP command filter (refer to Table EO-8 in the PFDF). If the command does not exist, the error message "INV ITEM #" is sent; if it does exist but is illegal given the current state, the error message "CMD ILLEGAL" is sent. If the command is legal, the appropriate command processor is flagged and the command data are placed in a buffer (if the processor has not completed its previous task, the message "DEP BUSY" is sent and the current command is ignored). The command processors are:

  1) Preview:                 Item 1 only, processed in 1-Hz task. 
  2) Observe Background:      Items 2-9 and 91, background. 
  3) Observe Parameter:       Items 10-16, 1-Hz task. 
  4) Mechanism:               Items 18-22, background. 
  5) Edit:                    Items 25-46, 1-Hz task. 
  6) Special Procedures:      Items 48-52, background.
  7) Foreground:              Items 95-99 and Cursor PFK's, processed immediately in the
                              command foreground.

If the command is legal, the initial command response should occur within one second for processors 1-6, and within 0.1 seconds for processor 7.

2.4.3 Detector Control

The detector foreground controls the detector readout, exposure timing, and data-buffer control for both the ZOD and Spectrometer detectors, and HRM telemetry for the Spectrometer. CCD/ZOD Readouts

During the "Locate" and "Observe" steps, the ZOD is exposed and read out once per second: At the beginning of each second, any requested mode or magnitude parameter changes are acted upon, and the entire CCD is read out to remove residual thermal background. The image-tube gain is set and the gate is turned on, starting the exposure. When the exposure time of 1 to 500 msec has expired, the tube gate is turned off and the data readout is performed. Only one half (256 lines x 320 columns) of the CCD is read out: which half depends on whether the on- or off-axis aperture is illuminated. The CCD data are digitized and transferred to CCTV memory (see Table 2.4-2) in three formats, "Field", "Zoom", and "Mosaic", where the CRTC (Cathode Ray Tube Controller) hardware creates a video picture. In the Locate step, all three formats are allowed, and the data in the CCTV memory are downlinked once per second to be reconstructed by the EGSE. In the Observe step, only "Zoom" mode is allowed, and only every 8th readout is downlinked. The spectral display occupies the CCTV memory not used by the short Zoom data.

In "Field" mode, readout lines 8-248 are summed by pairs on the chip and the data are compared in hardware to a threshhold register to obtain a display of 120 by 320 black or white pixels. In "Zoom" mode only 30 lines starting from a start-line value, and only 40 pixels starting from a start-column register are transferred to CCTV memory, in full 6 bit greyscale. In "Mosaic" mode, during each second, one 120 by 40 pixel patch of the field area is read out in full 6-bit greyscale, and after 16 seconds the full field area will have been scanned. The "Mosaic"-mode display is not interpretable on the Aft Flight-Deck CCTV, and is used mainly as a POCC debugging and documentation tool. See section 3 for additional display description. Reticon/SPD Readout

Reticon readout is performed by software request, using hardware DMA (Direct Memory Access) transfer into one of the four 4 k byte scan buffers in the 16 k byte data RAM. The Reticon is first wiped of thermal background by continuous (10 Hz) readouts with data transfer inhibited. Based on the Frame-exposure time chosen on the basis of the input spectrometer-magnitude parameter (section 3), the Reticon is then read out on the second every "Frame" seconds and an HRM telemetry operation is started for that frame. The spectrum is also summed into a plot-accumulation buffer which is accessed by the spectrum-plotting routine. An alternate "fast"-readout mode is used for objects brighter than 4th magnitude where readouts faster than 1 second are called for: readouts are summed directly into an accumulation buffer for one second and the sum is sent by telemetry. This mode requires all four scan buffers for double-buffering, so that spectrum plotting is not available.

2.4.4 One-Hz GML and Telemetry

Slow, cyclic command and telemetry handling is performed by a foreground routine driven by the one-second timer. This routine is responsible for starting and stopping the detector foreground and for communicating between it and the other processes. It handles the preview and edit commands which transfer the starlist parameters into preview and current sequence buffers and allows for editting of sequence buffers. It processes commands which request changes in the current observing process: change time available, TV mode and magnitude, spectrometer magnitude, observing aperture, and TEC setpoint. During the Observe step, it performs a centroid operation on the Zoom image from the CCD and calculates a pointing error. It collects all engineering analog and digital data and updates telemetry parameters. It then queues the output serial messages to the RAU and starts an HRM telemetry process for the General Measurement Loop (GML) data and the ZOD image, if present. Finally, it updates the control voltage on the Thermo-Electric Cooler.