DIGITAL PEAK-HOLD CIRCUIT

Abstract: A digital peak-hold detector for determining the peak value of an input analog voltage to be displayed on a multiple-­ element display device detects when the value of the input analog voltage exceeds the value of a ramp-like waveform generated from a counter which repetitively counts down from a number equal to the total number of display elements to zero to generate a compare signal. A control circuit strobes the count corresponding to the peak value into a storage regi­ ster when the value of the input analog voltage exceeds the current peak value in the storage register. A digital compara­ tor compares the current peak value from the storage register with the repetitive count from the counter and outputs an up­ date signal when the value of the count is greater than the current peak value. The update signal is combined with the compare signal by the control circuit to make the determina­ tion whether to update the current peak value. A time delay circuit causes the control circuit to clear the storage register to generate a new peak value when the current peak value is not updated within a predetermined period of time.

Description: Background of the Invention The present invention relates to peak-hold circuits, and more particularly to a digital peak-hold circuit for more precise determination of peak values of an input voltage. A multiple-element display, such as that described in US-A-4 841 200, entitled "Circuit for Driving a Multiple-Element Display", corresponding to EP-A2-0 241 835 (European Patent Application No. 87105062.1, filed 6th April 1987 and published 21st October 1987), can incorporate a circuit for determining and displaying precision peak value measurements. Such a multiple-element display displays both an instantaneous value of an input signal and a retained peak value of the input signal. Analogue peak-hold circuits use a storage capacitor which gradually decays from the stored peak value, causing the peak indication to drop. Additionally analogue circuits are inherently more susceptible to noise pickup, power supply ripple and the like which all contribute to an error in the indicated peak value. Therefore what is desired is a peak-hold circuit which more closely approximates the ideal without peak value decay or susceptibility to outside disturbances. Digital peak-hold circuits are known, for example, from "Elektronik", Vol. 10, 1981, p. 103 and from "Radio Fernsehen Elektronik", Vol. 28, No. 3, 1979, pp. 175-178. Summary of the Invention The present invention is set out in the accompanying claim 1. The preferred embodiment of the present invention is digital peak-hold circuit which stores a digital value for the peak value of an input voltage, which value is updated either when a higher value is detected or after a specified period times out. A compare signal, representative of the detected value of an input voltage, is input to a control circuit where it is passed directly on to appropriate multiple display elements for display of the instantaneous value of the input voltage as well as being stored in a storage register if greater than or equal to the current stored peak value. A digital comparator compares the stored peak value with a repetitive digital count corresponding to the number of multiple display elements and outputs an update signal when the count is equal to or greater than the stored peak value. The update signal is combined with the compare signal such that the control circuit updates the stored peak value when the input voltage, as represented by the compare signal, is present simultaneously with the update signal. A time delay is restarted each time a value is stored in the storage register. If the time delay times out, the control circuit clears the storage register to obtain a new starting peak value of the input voltage. The peak value is combined with the compare signal so that both the instantaneous value of the input voltage and the peak value are displayed simultaneously. Arrangements embodying the invention will now be described by way of example with reference to the attached drawings. Brief Description of the Drawing Fig. 1 is a block diagram view of a multiple-element display drive circuit incorporating a digital peak-hold circuit according to the present invention. Fig. 2 is a block diagram view of the digital peak-hold circuit of Fig. 1. Fig. 3 is an equivalent logic diagram view of the digital peak-hold circuit of Fig. 2. Fig. 4 is a timing diagram view to illustrate the operation of the digital peak-hold circuit according to the present invention. Description of the Preferred Embodiment Referring now to Fig. 1 an analog voltage V in is input to a comparator 6, the output of which is a compare signal CMP representative of the instantaneous value of V in , as described in EP-A2-0241835, cited supra. CMP is input to a peak-hold circuit 10 where a BAR ENABLE signal is generated to gate on the LED drivers 12 and 14. A two-digit BCD counter 16 counts down from 99 to 00 for a 100-element display device, the output COUNT of which addresses a correction table 18. The output of the correction table 18 is input to a digital to analog DAC 20, the output of the DAC being a ramp-like signal which is input to the comparator 6 for comparison with V in . Thus CMP is a logical "1" when V in is equal to or greater than the output of the DAC 20, and a logical "0" otherwise. COUNT from the counter 16 also is input to the peak-hold circuit 10 and to a pair of BCD to decimal decoders 22 and 24 which provide the current count to the drivers 12 and 14 as described in EP-A2-0241835 cited supra. The peak-hold circuit 10 is shown in greater detail in Figs. 2 and 3. The peak-hold circuit 10 has a control circuit 30 to which is input CMP and which outputs the BAR ENABLE signal. The control circuit 30 also controls a storage register 32 and a time delay circuit 34. The storage register 32, when clocked by the control circuit 30, stores the COUNT from the counter 16 which represents the current peak value. Each time a new peak value is stored in the storage register 32, the time delay circuit 34 is restarted. If the time delay circuit 34 times out, indicating that the current peak value has not changed over a predetermined period, the control circuit 30 clears the storage register 32 and then clocks in a new peak value, restarting the time delay circuit. The stored value in the storage register 32 is compared with the instantaneous COUNT in a digital comparator 36. When the COUNT is greater than or equal to the stored peak value, the digital comparator 36 outputs a signal GT or EQ to the control circuit 30. If GT or EQ occurs when CMP is a logical "1", indicating that V in is equal to or greater than the output of the DAC 20, the control circuit 30 clocks the storage register 32 to store a new peak value and restarts the time delay circuit. If GT or EQ occurs when CMP is a logical "0", indicating that V in is less than the output of the DAC 20, the control circuit 30 takes no action. Fig. 3 is a logical representation of the interaction of the control circuit 30 and the storage register 32, the time delay circuit 34 and the digital comparator 36. The compare signal CMP is input to a first D-type flip-flop 40 and a first gate 42. The first flip-flop is clocked at the COUNT rate, i.e., if the counter 16 cycles 300 times per second and there are 100 display elements, the clock rate is 30 kHz. The gate 42 is opened by the EQ or GT signal from the digital comparator 36 via gate 44 and inverter 46. The output of gate 42 is input to a second D-type flip-flop 48, the output of which strobes the storage register 32 and triggers the time delay circuit 34. The time delay circuit 34 is equivalent to a pair of retriggerable monostable circuits 50 and 52 connected in series. The first monostable circuit 50 has a long time constant, such as three seconds, and the second monostable circuit 52 has a short time constant, such as one microsecond. So long as the first monostable circuit 50 is triggered by the output from the second flip-flop 48 before the long time constant has timed out, the second monostable circuit 52 is not triggered and generates no output pulse. If the first monostable circuit 50 times out before it is triggered again, it triggers the second monostable circuit 52 which generates a short duration pulse to clear the storage register 32. The output of the first flip-flop 40 is input to an output gate 54 which has two additional inputs to provide a two-element display for the peak value in addition to the instantaneous value. The EQ output of the digital comparator 36 is input to a gate 56 which has a PEAK ON input and a PEAK ENABLE input as well. The gate 56 is closed if the peak detector is selected to be off or if the peak values are below a predetermined threshold. Otherwise the EQ signal is passed to a third D-type flip-flop 58, the output of which is one of the inputs to the output gate 54 and is input to a fourth D-type flip-flop 60. The output of the fourth flip-flop 60 is the third input to the output gate 54. Since the third and fourth flip-flops 58 and 60 are clocked by the same COUNT clock, EQ is high for one clock cycle and that value is clocked through the successive flip-flops to produce the two-element display for the peak value. As shown in Fig. 4 the DAC output 62 is a ramp-like waveform corresponding to counting down from 99 to 00. The output of the comparator 6, CMP, is a logical "1" when V in is greater than or equal to the output of the DAC 20 and a logical "0" otherwise. In this illustration the peak value stored, V p , is greater than V in so that at the COUNT corresponding to COUNT = V p a two-element logical "1" is added to CMP to produce the BAR ENABLE signal which gates on the LED display drivers 12 and 14. Thus, the present invention provides a digital peak-hold detector which stores a peak value, compares the peak value with a repetitive count corresponding to the number of elements in an output display, and updates the peak value when the input voltage value exceeds the peak value or when the peak value has not been updated for a predetermined period of time.

Claims: A digital peak-hold detector comprising; means (32) for storing a digital value representative of a current peak value; means (16,18,20) for producing a repetitive count cycle which repeatedly cycles between count cycle limits and for producing a corresponding ramp-like voltage which repeatedly varies between ramp limits; means (6) for determining when the value of an input analog voltage is greater than or equal to the ramp-like voltage to generate a compare output (CMP); means (36) for comparing the current peak value from the storing means (32) with the repetitive count cycle to determine when the count of the repetitive count cycle is equal to or greater than the current peak value to generate an update output (EQ + GT); and means (42,48) for updating the current peak value in the storing means in response to a combination of the compare output (CMP) and the update output (EQ + GT) when the input analog voltage equals or exceeds the current peak value. A digital peak-hold detector as recited in claim 1, wherein said updating means (42,48) is operable to cause the storing means (32) to store the current count of the repetitive count cycle. A digital peak-hold detector as recited in claim 1 or 2, further comprising means (34) for clearing the storing means (32) when the current peak value is not updated within a predetermined period of time. A digital peak-hold detector as recited in claim 3, wherein the clearing means (34) comprises: a retriggerable monostable circuit (50) having a long time constant corresponding to the predetermined period of time which is triggered by the updating means (42,48) when the current peak value is updated in the storing means (32); and a monostable circuit (52) in series with the output of the retriggerable monostable circuit and having a short time constant, the monostable circuit (52) being triggered by the retriggerable monostable circuit (50) when the predetermined period of time expires, to generate a clear pulse to clear the storing means (32). A drive circuit for driving a multiple-element display, the circuit comprising: a digital peak-hold detector as claimed in any preceding claim; means (10,12,22,24) responsive to the repetitive count cycle for selecting the elements of the display in accordance with the count of said cycle and, when enabled by an enabling signal (BAR ENABLE), for driving the selected elements; and means (40,54,56,58,60) responsive to said count reaching said current peak value for generating said enabling signal (BAR ENABLE), whereby the multiple-element display produces a display indicative of the current peak value. A drive circuit as recited in claim 5, wherein said means (40,54,56,58,60) for generating said enabling signal (BAR ENABLE) is operable to form said enabling signal from both the compare output (CMP) and an equality signal (EQ) from the comparing means (36) generated when the current peak value equals the count of the repetitive count cycle, the display produced by said multiple element display being representative of the instantaneous value of the input analog voltage and the current peak value. A drive circuit as recited in claim 6, wherein the generating means (40,54,56,58,60), comprises: means (56,58,60) responsive to the equality signal (EQ) for generating a peak display signal of a given duration which is used to form the enabling signal (BAR ENABLE).

Inventors: CLEARY, EDWARD J., JR., COLEMAN, MIKE R.
Applicants: TEKTRONIX, INC.
Application year: 1987
Main classification: G01R19
IPC codes: G01R19, H03K5