Digital time base with corrected analog interpolation
BACKGROUND OF THE INVENTION 
     The present invention relates to digital time bases, and more particularly to a digital time base with corrected analog interpolation having a total analog ramp delay exactly equal to a digital time delay. 
     In time domain reflectometers (TDR), such as the OF150 manufactured by Tektronix, Inc. of Beaverton, Oreg., United States of America, energy pulses are transmitted into a cable at a given pulse repetition rate depending upon the designed range of the TDR. Reflections from flaws, discontinuities or breaks in the cable are timed from the time of transmission of the energy pulse to determine the range from the transmitter of such flaw, discontinuity or break. To determine the range a clock provides a plurality of range pulses between energy pulses. The time interval between the clock pulses is a coarse determination of time which is a measure of range, i.e., for a 20 MHz clock the coarse time interval is to the nearest 50 nsec. To obtain finer time resolution an analog ramp is generated between clock pulses starting at a zero value at one pulse and terminating at a maximum value at the next pulse, i.e., the analog ramp goes from zero to maximum in 50 nsec. The ramp is sampled by comparing the ramp with a comparator voltage level which is set to occur when the reflection is received. The value of the ramp when the reflection is received determines the delta time, and therefore the delta range, between the clock pulses to be added to the coarse range as determined by the summation of the clock pulses occurring prior to the reflection receipt. If the ramp slope, due to aging of components, temperature variations or other effects, is not precise, the ramp may reach the maximum value either prior to or after the next pulse, resulting in a distortion in the range of the reflected signal being observed on the TDR display. 
     Therefore what is desired is a means for calibrating the analog ramp so that the time difference between the zero and maximum values is essentially equal to the digital time interval between clock pulses. 
     SUMMARY OF THE INVENTION 
     Accordingly the present invention provides a digital time base with corrected analog interpolation which uses a variable reference value as a maximum value for comparison with an analog ramp. A test pulse with a fast rising edge provides an arbitrary reference which is fixed in time relative to a clock pulse. With a zero value reference for the analog ramp the time of occurrence is determined with respect to the test pulse. Then the ramp is started at a clock pulse immediately prior to the clock pulse for the test pulse and a maximum value reference is set for the analog ramp. The difference in time between the zero and maximum values of the analog ramp with respect to the test pulse is a measure of the time error of the analog ramp. The variable reference value is adjusted until the measured time error is approximately zero within predetermined tolerances. 
     The objects, advantages and other novel features of the present invention will be apparent from the following detailed description when read in conjunction with the appended claims and attached drawing. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     FIG. 1 is a block diagram of a digital time base with analog interpolation according to the present invention. 
     FIG. 2 is a graph illustrating the calibration technique of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring now to FIG. 1 a microprocessor controlled digital time base with analog interpolation is shown. A ramp trigger is input to a ramp generator 12 to generate an analog ramp 14 having a period from minimum to maximum values approximately equal to the time interval between consecutive digital clock pulses, i.e., 50 nsec for a 20 MHz clock. The analog ramp 14 is input to a comparator circuit 16 to generate a sample pulse when the analog ramp value exceeds a reference value. The reference value is derived from a multiplying digital to analog converter (MDA) 18 which has as inputs a reference voltage Vref corresponding to the maximum ramp value and a digital ramp level command from a microprocessor 20 as determined by an operator from a front panel control. To set the reference voltage Vref a digital reference level from the microprocessor 20 is input to a latch 22. Upon an appropriate command from the microprocessor 20 the input to the latch 22 is transferred to the latch output and held. The output of the latch 22 is converted to a current signal by a digital to analog converter 24, and the current signal is converted to the reference voltage Vref by a current to voltage converter circuit 26. 
     The period of the analog ramp 14 may be adjusted by either varying the slope or by varying the maximum amplitude value, i.e., by varying Vref. Varying the slope requires varying the resistance or capacitance of an RC circuit in the ramp generator 12, or by varying the bias current of a current source in the ramp generator. However, the present embodiment which is described varies the reference voltage Vref. A test pulse, which may be either derived from an internal drive trigger of the TDR or from an external source, is generated by a pulse generator circuit 28 in synchronization with a clock signal as shown in FIG. 2. An arbitrary reference level of the test pulse, such as the fifty percent point of the rising slope, is determined. Since there are N clock pulses per test pulse, clock pulse #1 identifies the start of the test pulse. A zero value from the microprocessor 20 is written into the MDA 18 and the output Io from the MDA represents a voltage corresponding to the zero level of the analog ramp. When the analog ramp value, the analog ramp being started by the ramp trigger pulse in synchronization with clock pulse #1, exceeds the zero value from the MDA 18, a sample pulse is generated which samples the test pulse in a sampling circuit 30 to establish the arbitrary reference level of the test pulse. The reference level is converted to a digital value by an analog to digital converter 32 and stored in a latch 34 for transfer to the microprocessor 20. 
     For the next test pulse the ramp trigger to start the analog ramp is generated at clock pulse #N, the clock pulse just prior to clock pulse #1. A value from the microprocessor 20 which is equal to Vref is loaded into the MDA 18 which outputs Vref on line RFB. Ideally the sample pulse generated by the of Vref with the analog ramp occurs at the same point on the test pulse as for the zero value, i.e., at the reference level. If there is a time error, however, the sample pulse for the maximum value occurs either before or after the time corresponding to the reference level on the test pulse, i.e., the level of the test pulse sampled by the sample pulse will be different from the held reference level and is transferred to the microprocessor 20 to determine a time error. This time error is in the form of a voltage difference, either plus or minus. Based upon the time error the microprocessor 20 generates a corrected value for Vref which is input to the latch 22 and transferred to the D/A 24 for generation via the amplifier 26 into a new Vref. The calibration as indicated above is performed again and a new time error determined to further refine Vref. This process continues until the time error is zero or is less than a predetermined limit, such as the value for the least significant bit of the level command from the microprocessor 20. 
     Thus the present invention provides a digital time base with analog interpolation which has an analog interpolation ramp with a period, or total delay, equal to the digital interval, or delay, between range clock pulses to provide accurate range measurements of flaws, discontinuities or breaks in a cable by a TDR.