[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS stuff

OK, I will try to write the difinitive word on what can be done 
while scanning the Mark III.  If this is not already a Tech Note,
I will make it one when I get to Fermilab.

First there is a lot of background that has to be described before
we can figure out how to have any kind of controlled exposure that
we want.  First I will go over this information, then I will describe
how to do almost anything with the Mark III.

The Control Register in the Control Card is loaded with an OUT 0 and
contains the following bits:

Cable Select

Cable Select is a product of growth in the design and the limited
number of pins in a DB-25 cable.  Its state determines what the
pulse generated by an OUT 1 does.  If Cable Select is LOW, the 
OUT 1 pulse is routed down the cable to the Data Card and can do
several things.  If Cable Select is HIGH, the -LD AUX pulse is 
produced on the auxilliary output connector. 

LED was put there as a possible flat field pulse.  It is not used.
It is wired into the camera head where it does nothing.  

MPX ADR0-ADR2 select which item is connected to the ADC these are
addressed by their hex values as loaded into the control register:

Item           HEX Address
TEC Current            00 
Thermister 2  (CCD)    08
Thermister 1  (Water)  10    
-5V (x .5)             18
CCD1                   20
+5V (x.5)              28
CCD0                   30
CCD2                   38      

BYTE determines which byte is read from the ADC.  If high, the high
byte is put on the 8 bit data bus from the Data Card to the Control 

PULSE SEL 0 - PULSE SEL 1  Determines which of 4 possible things are
done by the Data card when a -PULSE is generated by an OUT 1.  They 

PULSE SEL 0    PULSE SEL 1     Signal Generated

0              0               Shift and Start ADC
0              1               Start ADC Only
1              0               Clear Aux FF
1              1               Set Aux FF (do nothing)

A TRANSFER is generated by the Control Card periodically as determined
by the setting of the  DAC and clock control register.  Three bits control
the speed of the clock.  A clock register of 1-7 selects pulse rate in 
powers of 2.  I can be varied within the power of two by setting the DAC.
A clock register of 0 allows computer generation of the transfer pulse.

Before doing a controlled exposure, one needs to clear the charge from the
CCD.  This is a pain.  The maximum rate the hardware will accept a transfer
is about 20 KHz.  One could send 512 TRANSFERS in 25 ms, but this would pile
all the charge in the output register.  I would send a TRANSFER, followed
by a few Shift and Start ADCs.  Say a TRANSFER followed by 100 Shift and 
Start ADC.  One can send the Shift and Start ADC signals about every 25
us.  No need to test that the ADC is done, as this operation is intended
to clear only.  One might do 1000 transfers to make sure.  This operation
will take then about 2.5 seconds.  This is about as fast as would trust 
a clear unless it was known that there was very little signal on the CCD. 

Now one can start an exposure.

After the exposure times out, one can read out as follows for the fastest
read out.  Note for the highest speed, do only one camera at a time.  One
could overlay readout and exposure for the three cameras if the exposure
is long enough.  But you can't clear the cameras individually, so one would
have to rely on the previous read out being a clear.

First, turn off the clock so TRANSFER pulses can be send by computer control.

Do Until Column Count = 512
Do Until Row Count = 768 Pixels + overscan desired
    Send Shift and Start ADC
        Test Done:  If READY = 1 THEN Test Done
    Read High Byte
    Read Low Byte
    Row Count = Row Count + 1
Column Count = Column Count + 1

One can speed this up a little by reading out the previous High and Low
byte after sending the Shift and Start ADC.  There is about 27 us to get it
done.  Above is fool proof.  According to my drawings, there is about 
30 us between sending the Shift and Start ADC and the return of a READY.
This gives a minimum line read out time of about 25 milliseconds.  The 
best one can then do for a full read out is then about 12+ seconds.  Reading
out all three cameras will almost tripple this.  

Hope this helps the discussion.

Tom Droege