The flight software for CUBIC has two major components: software for the clock generator and software for the ICP. The clock generator software consists of 64 different waveform programs that can be selected by the ICP (via serial command) to perform different types of CCD readouts, including noise tests and flushes. The waveforms are listed in Table 9 and Table 10.
The ICP software controls the operation of the experiment. On power up, the code performs a number of self-tests to determine the instrument status (see § 4.4.11). It then enters a loop that checks the serial command buffer and monitors housekeeping data. A timer interrupt forces a jump to the CCD readout routine, which initiates a readout and processes the data, identifying and storing valid CCD events. Serial commands are read and processed during ground station contacts, including the ability to patch the on-board code to correct bugs or change the operation of the experiment.