Method and electronic circuit for automatically measuring the horizontal scan frequency of a composite synchronism signal

Abstract: A method of automatically measuring the horizontal scan frequency of a composite synchronism signal (2), comprising horizontal synchronization impulses at line frequency (fh), consists of first performing a count of a number (m) of impulses having a repeat frequency (fc) higher than said line frequency (fh), as intervening between two successive impulses (3) at line frequency. The count value, corresponding to said number (m) of impulses, is stored to obtain the line frequency of the signal, and thereafter, a series of down counts is effected, as initiated at predetermined times, until a change of frequency of the signal (2) is detected.

Description: This invention relates to a method of automatically measuring the horizontal scan frequency of a composite synchronism video signal. The invention relates, moreover, to an electronic circuit operating in accordance with the above method. No unique broadcasting and/or operating standard is currently available as relates to composite synchronism video signals. As a result, for proper operation of video sets, the latter must be equipped with devices which be capable of detecting in an automatic manner the type of the input signal, or more specifically, the repeat frequency fh of the video picture line, which is representative of the broadcasting standard. For instance with monitors, the composite synchronism video signal contains n impulses at the horizontal line frequency fh, followed by a single impulse at the vertical frequency fv, the duration whereof is equal to a multiple n′ of the duration of the line frequency impulses and tied to the broadcasting standard being used. The prior art has indeed proposed a solution to the problem of finding the line frequency fh. This prior solution consists of providing a counter, having a predetermined frequency fc higher than the line frequency fh, and of detecting the number of count impulses occurring between two successive impulses at line frequency. By comparison of two chronologically successive measurements it becomes possible to decide whether a frequency change did occur. However, this prior solution cannot prevent the measurement from being affected by the presence of vertical synchronization impulses. The underlying technical problem of this invention is to provide a method and a circuit for automatically measuring the horizontal scan frequency of a composite synchronism signal, which has such functional characteristics as to make the measurement unaffected by the presence of vertical frequency raster synchronisms and by any missed line frequency impulse due to occasional or temporary malfunctions. This problem is solved by a method and a circuit as defined in the first and second claims, respectively, following the present description. The features and advantages of the method and the circuit according to the invention will become apparent from the following detailed description of an embodiment thereof, to be taken by way of illustration and not of limitation with reference to the accompanying drawings. In the drawings: Figure 1 is a block diagram depicting schematically the electronic circuit of this invention; Figure 2 is a detailed diagram of the same circuit as in Figure 1; and Figure 3 shows a series of signals having the same time base, present in the circuit of Figure 1. With reference to the drawing figures, generally and schematically indicated at 1 is an electronic circuit adapted to automatically measure the horizontal scan frequency, or line frequency, of a composite synchronism video signal 2 from a generic video source, not shown because conventional. The signal 2 comprises a first series of m synchronization impulses 3 at line frequency fh, followed by a vertical synchronization impulse 4 having a different frequency fv. The composite synchronism signal 2 is input to a timer 5. A second input of the timer 5 is to receive a clock signal 6 having a predetermined frequency fc higher than the line frequency fh, e.g. from a quartz oscillator. Specifically, the timer 5 incorporates a divider 7 which receives on its input the synchronization signal 2 and performs division of said signal by six. The divider 7 issues on an output 8 a signal s1 which has the pattern shown in Figure 3 and corresponds to a step impulse with a duration of 1/fh every six impulses 3 at line frequency. The output 8 is connected directly to one input of a logic AND gate 9 receiving, on another input, the clock signal 6 and outputting a signal s2 which corresponds to a first count of those impulses at clock frequency fc which occur between two successive impulses 3 at line frequency. The output of said AND gate 9 is connected to an input of a counter 12 of the up/down type, i.e. capable of counting in either the "up" or "down" directions. The " count-up" or " count-down" operating condition, or mode, of the counter 12 will be determined by a control logic 20 whereto a pair of signals s3 and s4 are input from respective outputs 13 and 14 of the divider 7. This control logic 20 is composed of certain circuit portions or blocks to be described in detail herein below. A first block B1 comprises a pair of logic gates 11 and 16 of the AND type and a bistable memory cell 15 of the delay, or D, type. The output 14 is connected to a corresponding input of each gate, 11 and 16, as well as to the clock input T of the cell 15 and a load input L of the counter 12. The cell 15 has an output connected directly to another input of the gate 16 which has the output connected to a reset input C of the counter 12. The output of the cell 15 is also connected to a further UP/DOWN input of the counter 12 to set the operating condition of the counter 12, and the data input D of a bistable cell 25, of the D type, which forms a third block B3 of the logic 20. This logic 20 comprises a second block B2 including a shift register 26, composed of a pair of bistable cells 21 and 22, and a logic gate 17 of the AND type. The cells 21 and 22 are of the so-called D type with a data input D, reset input R, and clock input T. The output 13 of the divider 7 is connected directly to both clock inputs T of the cells 21 and 22 and to the clock input T of the cell 25 of block B3. The cell 21 has its output connected directly to the data input D of the cell 22. Each cell 21 and 22, moreover, has its respective output connected directly to a corresponding input of the logic gate 17. The interaction of the blocks B1 and B2 described in the foregoing is provided by the links of the output of the gate 17 of block 2 to one input of the gate 11 and the data input D of the cell 15. In addition, the output of the gate 11 is connected directly to both reset inputs R of the cells 21 and 22. The logic 20 further comprises a fourth block 27 made up of an exclusive OR logic gate EXOR having a single output connected to the data input D of the cell 21 and a plurality of inputs. The structure of the circuit 1 is completed by a memory 30 connected two-directionally to the counter 12. In particular, the counter 12 has a plurality of outputs, denoted by the references U1 to Un, which are connected to respective inputs 19 of the memory 30, the latter having outputs 18 which are connected to respective inputs 10 of the counter. The first n - 1 outputs of the counter are also connected to respective inputs of the gate 27. In addition, the output of the bistable cell 25 in block B3 is connected to an enable input 23 of the memory 30. The measuring method of this invention, to be implemented by the electronic circuit 1 just described, consists of the following steps. At the initial time to, a count of the number of the impulses at clock frequency fc is effected which occur between two successive line impulses at frequency fh. The counter 12 will provide the count of such impulses, it being set in the "up" operating condition by the block B1 of the logics 20. This first count, from 0 to a value m, results in the value of the line frequency fh being found, with the clock frequency fc being a known factor. This value m is stored in the memory 30 at the time t1 on the basis of signal s3. Subsequently to storing the value m corresponding to the frequency fh into the memory 30, the counter 12 is set by the block B1 to the "down" operating condition and initialized to count from the value m down to 0. At the time t2, the counter 12 is initialized on the basis of the synchronization signal s4, loading into it the value m present in the memory 30 following reception of an enable impulse on the input L. From now on, at each successive count interval, it will be necessary to check that the contents of the counter 12 has returned to the value 0. This check is carried out by the EXOR gate 27 on the n - 1 most meaningful bits of the counter 12; that is, the least meaningful bit present on the output Un is neglected. Advantageously, the provision of the gate 27 allows any error by ± one impulse in the down count to be corrected. In fact, since the composite synchronism signal and the clock signal at the frequency fc are not synchronized with each other, it may occur that a different number of impulses be considered at subsequent count intervals. In other words, it might happen that at the end of the down count, the counter 12 has counted one impulse more or one impulse less. Advantageously, the gate 27 provided allows the return to 0 of the counter to be checked irrespective of this possible error situation. The portion B2 of the logic 20 is instead effective to detect the change of frequency in the composite synchronism video signal. When, at the end of the series of n impulses at line frequency fh, the impulse 4 at vertical frequency fv arrives, the shift register 26 consisting of the cells 21 and 22 can detect the change of frequency because a fresh down count has been started at the time t3. Understandably, the counter 12 should be adequately sized; that is, if N is the number of the impulses at the clock frequency fc which occur within a vertical impulse of maximum duration, it shall have to be the logarithm to base 2 of N, as rounded off to the upper integer. Where the count interval coincides with the duration of the vertical impulse, at the time t4, the contents of the counter 12 will be other than 0. However, the contents of the memory 20, which still contains the value m, will not be changed. The portion B2 of the logics 20 will then check at the time t6 that the signal corresponding to the change in frequency at the time t4 was due to the vertical impulse 4. This because of the composite signal being restored to a pulsive pattern at the line frequency fh. At the end of this further count interval in the "down" mode, the contents of the counter 12 will be back to the value 0 and the logics 20 will ignore the frequency change information received at the end of the previous count interval. In other words, the output of the AND gate 17 will be only switched to a logic high where two successive returns to a value other than 0 are detected in the count-down performed by the counter 12; return to a value other than 0 would be indicated by the output of the gate 27 being at a high. Advantageously, the circuit of this invention automatically detects the line frequency of the composite video signal even when an impulse at frequency fh is missing. Even in the most unlikely event that the missing impulse, at the frequency fh, is the one that should appear after a vertical impulse and after a number of impulses equal to the selected timing, the block B2 would detect a frequency change which actually did not occur. Likewise, where the missing impulse, at the frequency fh, is the one that should appear before the vertical impulse and before a number of impulses equal to the selected timing, the block B2 would detect a frequency change which actually did not occur. In this case, the counter 12 would be set for the "up" mode in order to measure the new frequency, but the number of the impulses at the clock frequency fc to be counted would be exactly the same as that measured at the time to. Consequently, the bistable cell 15 in the block B3 would update the memory with a value already there. Where an impulse is missing instead at any other position of the signal 2, the information on the occurrence of a frequency change would not be confirmed, and accordingly, such a missed impulse would be uninfluential.

Claims: Method of automatically measuring the horizontal scan frequency of a composite synchronism video signal (2) comprising synchronization impulses at horizontal line frequency (fh) and at least one synchronization impulse at vertical frequency (fv) by effecting successive counts of a number (m) of impulses, which impulses have a repeat frequency (fc) higher than said line frequency (fh), intervening between two successive impulses of said composite synchronism video signal; characterized in that it comprises the following steps: storing a count value, corresponding to said number (m) of impulses, to represent the line frequency; effecting successive check counts, by counting down from an initial value equal to said stored count value; and replacing said stored count value with a new count value to represent a new line frequency if two consecutive check counts give a value other than substantially zero, said new count value resulting from a count following the second of said two consecutive check counts. An electronic circuit (1) for automatically measuring the horizontal scan frequency of a composite synchronism video signal (2) comprising synchronization impulses at horizontal line frequency (fh) and at least one synchronization impulse at vertical frequency (fv), characterized in that it comprises: a timer (5) receiving at its input said composite synchronism video signal (2) and a clock impulse signal (6) having a predetermined repeat frequency (fc) higher than said line frequency (fb) and providing at its output at predetermined time intervals a number (m) of impulses of said clock signal (6) intervening between two successive impulses of said composite synchronism video signal; an up/down counter (12) connected to the timer output for counting said number (m) of impulse either "up" or "down" according to a mode signal received at an up/down setting input of the counter (12); a memory (30) connected to the counter (12) for storing a count value; a control logic (20) having inputs connected to outputs of said timer (5) and said counter (12) and outputs connected to respective inputs of the counter (12) and the memory (30) and comprising means for setting to zero and in the "up" mode the counter to firstly count said number (m) of impulses, means for storing into the memory (30) a count value corresponding to a number (m) of impulses counted in the "up" mode and subsequently setting the counter (12) in the "down" mode, means (27) for checking the counter contents after that a number (m) of impulses has been counted in the "down" mode, means for loading said stored count value into the counter (12) after that a number (m) of impulses has been counted in the "down" mode, and means for setting to zero and in the "up" mode the counter (12) after that two consecutive other than substantially zero counts have been detected by said checking means (27). A circuit according to claim 2, characterized in that said means (27) for checking the counter contents comprises a logic gate of the exclusive OR type having a plurality of inputs connected to respective counter outputs corresponding to the most meaningful bits of the count value.

Inventors: BETTI GIORGIO, GORNATI SILVANO, SACCHI FABRIZIO, VAI GIANFRANCO, ZUFFADA MAURIZIO, BETTI, GIORGIO, GORNATI, SILVANO, SACCHI, FABRIZIO, VAI, GIANFRANCO, ZUFFADA, MAURIZIO
Applicants: SGS THOMSON MICROELECTRONICS, SGS-THOMSON MICROELECTRONICS S.R.L.
Application year: 1990
Main classification: H04N17
IPC codes: H04N5, G01R23, H04N17