; This file is used to generate DSP code for the TimII second generation ; timing board. This is Rev. 3.00 software. ; Code for Marconi's EEV42-80 2k x 4k thinned CCD sensor PAGE 132 ; Printronix page width - 132 columns ; Define a section name so it doesn't conflict with other application programs SECTION TIMEEV42 ; Include a header file that defines global parameters INCLUDE "/home/leach/DSPlib/timhdr.asm" APL_NUM EQU 0 ; Application number from 0 to 3 CC EQU CCDVIDREV3B+TIMREV4+UTILREV3+SHUTTER_CC+TEMP_POLY+SUBARRAY+BINNING+SPLIT_SERIAL ; Include miscellaneous timing commands INCLUDE "timmisc.asm" ; Custom INCLUDE "/home/leach/DSPlib/timCCDmisc.asm" ; Generic ;************************************************************************** ; * ; Permanent address register assignments * ; R1 - Address of SSI receiver contents * ; R2 - Address of SCI receiver contents * ; R3 - Pointer to current top of command buffer * ; R4 - Pointer to processed contents of command buffer * ; R5 - Temporary register for processing SSI and SCI contents * ; R6 - CCD clock driver address for CCD #0 = $FF80 * ; It is also the A/D address of analog board #0 * ; * ; Other registers * ; R0, R7 - Temporary registers used all over the place. * ; R5 - Can be used as a temporary register but is circular, * ; modulo 32. * ;************************************************************************** ; Specify execution and load addresses IF @SCP("DOWNLOAD","HOST") ORG P:APL_ADR,P:APL_ADR ; Download address ELSE ORG P:APL_ADR,P:APL_NUM*N_W_APL ; EEPROM address ENDIF ; Keep the CCD idling when not reading out IDLE DO Y: full image readout TST A JNE full image readout TST A JEQ *+2 MOVE Y: full image readout TST A JEQ *+2 ENDDO ; Properly terminate readout loop JMP full image readout TST A JEQ $200 WARN 'Application P: program is too large!' ; Make sure program ENDIF ; will not overflow ; *********** DATA AREAS - READOUT PARAMETERS AND WAVEFORMS ************ ; Command table - make sure there are exactly 32 entries in it IF @SCP("DOWNLOAD","HOST") ORG X:COM_TBL,X:COM_TBL ; Download address ELSE ORG P:COM_TBL,P:APL_NUM*N_W_APL+APL_LEN+$200 ; EEPROM address ENDIF DC 'IDL',IDL ; Put CCD in IDLE mode DC 'STP',STP ; Exit IDLE mode DC 'SBV',SETBIAS ; Set DC bias supply voltages DC 'RDC',RDCCD ; Begin CCD readout DC 'CLR',CLEAR ; Fast clear the CCD DC 'SGN',ST_GAIN ; Set video processor gain DC 'WRC',WR_CNTRL ; Write control word over SSI link DC 'SDC',SET_DC ; Set DC coupled diagnostic mode DC 'SBN',SET_BIAS_NUMBER ; Set bias number DC 'SMX',SET_MUX ; Set clock driver MUX output DC 'ABR',ABR_RDC ; Abort readout DC 'CRD',CONT_RD ; Continue reading out DC 'DON',START ; Nothing special DC 'CSW',CLR_SWS ; Clear analog switches to reduce power drain DC 'SOS',SEL_OS ; Select output source DC 'RCC',READ_CONTROLLER_CONFIGURATION DC 'OSH',OPEN_SHUTTER DC 'CSH',CLOSE_SHUTTER DC 'PON',PWR_ON ; Turn on all camera biases and clocks DC 'POF',PWR_OFF ; Turn +/- 15V power supplies off DC 'SET',SET_EXP_TIME ; Set exposure time DC 'RET',RD_EXP_TIME ; Read elapsed exposure time DC 'SEX',START_EXPOSURE DC 'PEX',PAUSE_EXPOSURE DC 'REX',RESUME_EXPOSURE DC 'AEX',ABORT_EXPOSURE DC 0,START,0,START,0,START,0,START DC 0,START,0,START IF @SCP("DOWNLOAD","HOST") ORG Y:0,Y:0 ; Download address ELSE ORG Y:0,P: ; EEPROM address continues from P: above ENDIF GAIN DC 0 ; Video processor gain and integrator speed NSR DC 560 ; Number Serial Read, prescan + image + bias NPR DC 512 ; Number Parallel Read NS_CLR DC 1120 ; To clear serial register NPCLR DC 4100 ; To clear parallel register, 2 images NSBIN DC 1 ; Serial binning parameter NPBIN DC 1 ; Parallel binning parameter TST_DAT DC 0 ; Temporary definition for test images SH_DEL DC 10 ; Delay in milliseconds between shutter closing ; and image readout CONFIG DC CC ; Controller configuration ; Readout peculiarity parameters SERIAL_SKIP DC SERIAL_SKIP_L ; Address of serial skipping waveforms SERIAL_READ DC SERIAL_READ_L ; Address of serial waveform table SERIAL_CLOCK DC SERIAL_CLOCK_L ; Address of serial clocking waveforms OS DC '__L' ; The name of the Output Source(s) NSERIALS_READ DC 0 ; Number of serials to read NSCLR DC 0 ; Number of waveforms in fast mode NSKIP1 DC 0 ; Number of waveforms in fast mode NREAD DC 0 ; Number of waveforms in fast mode NSKIP2 DC 0 ; Number of waveforms in fast mode NBIAS DC 0 ; Number of waveforms in fast mode ; Subimage readout parameters. Ten subimage boxes maximum NBOXES DC 0 ; Number of boxes to read NR_BIAS DC 200 ; Number of bias pixels to read NS_READ DC 200 ; Number of columns per box NP_READ DC 200 ; Number of rows per box READ_TABLE DC 100,100,3000,50,200,3000,0,0,0,0 DC 0,0,0,0,0,0,0,0,0,0 DC 0,0,0,0,0,0,0,0,0,0 NP_SKIP DC 0 ; Number of rows to skip NS_SKP1 DC 0 ; Number of serials to clear before read NS_SKP2 DC 0 ; Number of serials to clear after read ; Include the waveform table INCLUDE "EEV4280.waveforms" ; Readout and clocking waveforms IF @SCP("DOWNLOAD","EEPROM") IF @CVS(N,@LCV(L))>(APL_NUM+1)*N_W_APL WARN 'EEPROM overflow!' ; Make sure next application ENDIF ; will not be overwritten ENDIF ENDSEC ; End of section TIMEEV42 ; End of program END