Pulse phase difference encoding circuit

Abstract: A pulse phase difference encoding circuit provides a digital signal indicating a phase difference between a first input pulse and a second input pulse. The first input pulse is provided to and circulated in a ring signal delay circuit (1) having a plurality of signal delay elements that are connected in series. Intermediate points between the delay elements provide delayed pulses having different delay times. Upon receiving the second input pulse, a selector (3) selects one delay pulse provided by the delay element at which the first input pulse has arrived, and generates a digital positional signal indicating a position of the selected delay element. The number of rounds of circulation of the first input pulse in the ring signal delay circuit (1) is separately counted. According to the number of rounds of circulation of the first pulse and the positional signal, the digital signal indicating the phase difference between the first and second input pulses is formed.

Description: The present invention relates to a circuit for detecting a phase difference between two pulse signals having optional phases, and particularly to a pulse phase difference encoding circuit that can accurately detect the phase difference over a wide range. A prior art technique encodes a phase difference between two pulses PA and PB into a digital signal composed of a plurality of bits that represent a positive or negative shift (difference) between phases of the two pulses PA and PB. The detection range of the phase shift of this technique can be expanded without deteriorating the detection accuracy by increasing the number of bits of the digital signal. The increase in the number of bits, however, increases circuit scale. If the circuit scale must be kept as it is, the detection range is expandable only by sacrificing the detection accuracy. When phases of two pulses PA and PB change in response to a change in a physical quantity, it is possible to find the change in the physical quantity by detecting a difference between the phases. Based on this idea, a sensor can be made. This sort of sensor must have a wide detection range and high detection accuracy to respond to sensing elements that cause large phase changes or have a variety of characteristics to cause a large phase difference. Further, for the sake of compactness and economy, the size of the sensor must not be increased excessively. An object of the present invention is to provide a pulse phase difference encoding circuit for encoding and detecting a phase difference between two pulses, having a wide detection range, compact circuit scale, and high detection accuracy. In order to accomplish the object, the present invention provides a pulse phase difference encoding circuit according to claim 1. The encoding circuit comprises a delayed pulse generating ring circuit composed of many signal delay circuits that are connected to one another in a ring shape. A first pulse is provided at optional timing to the signal delay circuits and is circulated in the signal delay circuits. The signal delay circuits repeatedly provide a plurality of delayed pulses when the first pulse passes through the respective signal delay circuits. The delayed pulses sequentially follow one after another with a delay time of each signal delay circuit. A counting means counts the number of rounds of circulation of the first pulse in the delayed pulse generating ring circuit. A pulse selector has a plurality of input lines for receiving the delayed pulses from the delayed pulse generating ring circuit, and a plurality of output lines respectively corresponding to the delayed pulses. When a second pulse forming an optional phase difference relative to the first pulse is provided to the pulse selector, the pulse selector selects one delayed pulse that has a special temporal relationship with the second pulse out of the delayed pulses provided by the delayed pulse generating ring circuit, and changes the voltage of one output line corresponding to the selected delayed pulse. An encoder receives output signals from the output lines of the pulse selector, and provides a binary digital signal indicating the one delayed pulse selected by the pulse selector. The number of rounds of circulation of the first pulse in the delayed pulse generating ring circuit at the time when the second pulse is provided forms upper bits, and the binary digital signal provided by the encoder forms lower bits. The upper and lower bits form a digital signal indicating a phase difference between the first and second pulses. According to the present invention, the first pulse is circulated in the signal delay circuits that are connected to one another in a ring shape. Even if the number of the signal delay circuits is small, i.e., even with a small circuit scale, the counting means counts the number of rounds of circulation of the first pulse in the signal delay circuits, and the counted number of rounds forms upper bits of a digital signal having a high resolution for indicating a phase difference. Fig. 1 is a view schematically showing an embodiment of the present invention; Fig. 2 (consisting of Figs. 2A and 2B) is a circuit diagram showing a first embodiment of the present invention; Fig. 3 is a view showing waveforms appearing at various parts of the circuit of Fig. 2; Fig. 4 is a block diagram showing a second embodiment of the present invention; Fig. 5 is a block diagram showing a circuit for measuring a physical quantity in response to resistance values, according to the embodiment of the present invention; Fig. 6 is a view showing waveforms apeparing at various parts of the circuit of Fig. 5; and Fig. 7 is a circuit diagram showing the details of a comparator circuit of Fig. 5. Firstly, an outline of the present invention will be explained with reference to the drawings. Figure 1 schematically shows an arrangement of a pulse phase difference encoding circuit according to the present invention. The circuit comprises a delayed pulse generating ring circuit 1 having many signal delay circuits (sometimes referred to as gate delays), a counter 2, a pulse selector 3, and an encoder 4. A terminal 6 receives a first input pulse PA. The delayed pulse generating ring circuit 1 provides a plurality of delayed pulses. A delay time of any one of the delayed pulses is determined by the number of the signal delay circuits (gate delays) passed by the first pulse PA to generate the one delayed pulse. The pulse selector 3 receives the delayed pulses, as well as a second pulse PB through a terminal 8. The second pulse PB is delayed behind the first pulse PA. Upon receiving the second pulse PB, the pulse selector 3 selects one input corresponding to one delayed pulse just triggered by the first pulse PA in the delayed pulse generating ring circuit 1, and provides the encoder 4 with a signal indicating the selected input. The encoder 4 then generates a binary digital signal indicating the selected input. An end point 5 of the delayed pulse generating ring circuit 1 is connected to an OR circuit 1a, thereby connecting the signal delay circuits to one another in a ring shape. With a cumulative delay time of all the signal delay circuits, the first pulse PA again appears at the start (a left end in Fig. 1) of the delayed pulse generating ring circuit 1. A clock terminal of the counter 2 receives an output from the end point 5, and the counter 2 divides a frequency of the received output and produces an output indicating the number of rounds of circulation of the first signal PA. Namely, an output 10 of the counter 2 provides upper bits for an output 9 of the encoder 4. The delayed pulse generating ring circuit 1 is reset by zeroing an input 7 of a NAND gate. The delayed pulse generating ring circuit 1 and pulse selector 3 correspond to a delayed pulse generating circuit and a synchronous pulse detecting circuit disclosed in "Magnetic Detection Device and Physical Quantity Detection Device Using Same" of US-A-5 134 371 published after the priority date of the present invention or in EP-A-0 379 180 (relevant under Article 54(3) EPC). Unlike the disclosure of this U.S. Patent, the end point 5 of the delayed pulse generating ring circuit 1 of the present invention is connected to the start of the same circuit 1 to repeatedly use the signal delay circuits of the ring circuit 1. This is the reason why the present invention can expand a detection range without considerably increasing a circuit scale. By increasing the number of frequency divisions of the counter 2, it is possible to further expand the detection range. The expansion of the detection range may not deteriorate the detection accuracy of the circuit because the accuracy is determined only by the delay time of each signal delay circuit of the delayed pulse generating ring circuit. The present invention expresses a phase difference between two pulses as a binary digital signal. A time resolution of the binary digital signal is determined by a delay time of each delay stage of the delayed pulse generating ring circuit 1. By shortening the delay time of each delay stage, a phase difference detection resolution may remarkably improve. For example, if each delay stage comprises an inverter which determines the delay time, the detection resolution of phase difference will be less than several nanoseconds. A resolution in encoding a pulse phase difference is inversely proportional to encoding range. For example, if the resolution improves two times, the encoding range decreases by half. According to the pulse phase difference encoding circuit of the present invention, however, an output of the counter 2 forms upper bits of an encoded phase difference, so that the encoding range may be expanded by increasing the number of bits of the counter output, without increasing a circuit scale. The pulse phase difference encoding circuit of the present invention will be explained next in more detail. According to one embodiment, the pulse phase difference encoding circuit for producing a digital signal that indicates a time difference between a first pulse and a second pulse, may comprise: a delayed pulse generating means 1 having a plurality of delay elements connected in series to form a series circuit, one end of the series circuit receiving the first pulse, the means 1 generating a plurality of delayed pulses while the first pulse is passing through the delay elements; a positional signal generating means 3 for selecting a latest one of the delayed pulses upon receiving the second pulse that occurs after the first pulse, and generating a positional signal indicating a position of the selected delayed pulse among the other not-selected delayed pulses; an encoder 4 for receiving the positional signal and producing a digital signal indicating a time period between a time of input of the first pulse and a time of input of the second pulse; a means for connecting the one end of the series circuit to the other end thereof to repeatedly circulate the first pulse from the one end toward the other end through the delay elements of the series circuit; counting means 21 and 22 for counting the number of rounds of circulation of the first pulse in the series circuit; and a means 11 for supplementing the digital signal provided by the encoder 4 with the number of rounds of circulation counted by the counting means, thereby having the digital signal represent the phase difference between the first and second pulses. Figure 2 shows a pulse phase difference encoding circuit according to the first embodiment of the present invention. The circuit receives a first pulse PA and then a second pulse PB, and encodes a difference between rise times of the two pulses into a binary digital signal. Figure 3 is a timing chart of signals produced in the circuit. The circuit will be explained with reference to Figs. 2 and 3. In Fig. 2, a delayed pulse generating ring circuit 1 repeatedly generates delayed pulses P00 to P31 each having a delay time corresponding to the number of inverters 101 through which the first pulse PA has passed to generate the delayed pulse in question. A delay time of each delay stage (inverter) determines a phase difference detection resolution. By shortening the delay time of each delay stage, the detection resolution improves. In the embodiment, the delay time is equal to a delay time of each inverter 101. In Fig. 3, the delayed pulses P00 to P31 are inverted relative to one another (for example, the delayed pulse P01 is inverted relative to the preceding delayed pulse P00), and delayed behind one preceding delayed pulse by the delay time produced by one inverter. In this embodiment, the number of the inverters of the delayed pulse generating ring circuit 1 is odd, and an inverter 1011 and a NAND gate 102 are interposed between the delayed pulses P31 and P00 to produce a delay time corresponding to two inverters. When a rise of the first pulse PA is supplied to the delayed pulse generating ring circuit 1, the delayed pulse P00 rises after a delay time of the NAND gate 102. Thereafter, the delayed pulse P01 falls after a delay time determined by the NAND 102 and one inverter 101. Then, the delayed pulses P02 to P31 sequentially and alternately rise and fall. After the delayed pulse P31, the second delayed pulses P00 to P31 occur. Since the number of the inverters in one round of the ring delay pulse generating circuit 1 is odd, the second delayed pulses P00 to P31 are inverted relative to the first delayed pulses P00 to P31 and provided with an additional delay time corresponding to one round of the ring delay pulse generating circuit 1. For example, in Fig. 3, the delayed pulse P00 rises at time t1 in the first round and falls at time t4 in the second round. In this way, the delayed pulses P00 to P31 alternately rise and fall in every round of the delayed pulse generating ring circuit 1. In Fig. 2, a pulse selector 3 has D-type flip-flops (Dffs) 301 for receiving the delayed pulses P00 to P31 respectively from the delayed pulse generating ring circuit 1. The D-type flip-flops 301 use the second pulse PB as a clock pulse. When the second pulse PB rises, the D-type flip-flops 301 select one of the delayed pulses just triggered by the first pulse PA, as well as one of pulse selector outputs ER0 to ER31 corresponding to the selected delayed pulse. For example, in Fig. 3, the second pulse PB rises at time t2, and one delayed pulse just caused by the first pulse PA is selected. As a result, outputs of the D-type flip-flops 301 corresponding to the delayed pulses P01 and P02 are simultaneously zeroed. The delayed pulses P01 and P02 are provided to inputs of corresponding EXORs (exclusive OR circuits) 302 to zero only the output ER02 of the pulse selector 3. The number of delayed pulses P00 to P31 is even in the embodiment of Fig. 2. This is why an inverter 105 is inserted. If this inverter 105 is not provided, there is a danger of zeroing the output ER00 of the pulse selector 3 not only when the first pulse PA produces the delayed pulse P31, but also on other occasions. In Fig. 2, a known encoder 4 receives the 32 outputs ER00 to ER31 of the pulse selector 3. When one of the 32 outputs ER00 to ER31 becomes zero, the encoder 4 provides a binary digital signal comprising five digits EC1 to EC5 indicating the zeroed output of the pulse selector 3. For example, in Fig. 3, the second pulse PB rises at time t3, and the D-type flip-flops 301 corresponding to the delayed pulses P17 and P18 are zeroed. As a result, among the outputs ER00 to ER31 of the pulse selector 3, only the output ER18 of the EXOR circuit that has received the delayed pulses P17 and P18 becomes zero. The output ER18 is an 18th pulse selector output with the output ER00 being a 0th output. Consequently, the encoder 4 provides a binary digital signal having five digits of 10010 indicating the 18th pulse. In this way, the delayed pulse generating ring circuit 1, pulse selector 3, and encoder 4 provide a binary digital signal of five digits (00000 to 11111) that specify a position of the first pulse PA in the delayed pulse generating ring circuit at the time when the second pulse PB is input. In Fig. 2, counters 21 and 22 count the number of rounds of circulation of the first pulse PA in the delayed pulse generating ring circuit 1, and provide a binary digital signal indicating the counted value. The first counter 21 has a clock input 211 that is connected to an output point 103 of the delayed pulse P15 in the delayed pulse generating ring circuit 1. The second counter 22 has a clock input 221 that is connected to an output point 104 of the delayed pulse P31. The first and second counters 21 and 22 count how many times the first pulse PA has passed through the output points 103 and 104. At the output points 103 and 104, rises and falls of the first pulse PA alternately appear whenever the first pulse PA passes through the output points 103 and 104. The first and second counters 21 and 22 count the rises of the pulse. The first and second counters 21 and 22 have, therefore, pulse rise generating circuits 23 and 24, respectively, for converting a pulse fall signal into a pulse rise signal. With this arrangement, either a rise or a fall of the first pulse PA at the output points 103 and 104 can be counted by the first and second counters 21 and 22. D-type flip-flops 25 and 26 receive outputs C11 to C14 of the first counter 21 and outputs C21 to C24 of the second counter 22 respectively, as well as the second pulse PB. A multiplexer 27 provides outputs D11 to D14 of the first counter 21 side when a most significant bit (MSB) EC5 of the output of the encoder 4 is zero, and D21 to D24 of the second counter 22 side when the MSB EC5 is one. Namely, if the second pulse PB occurs when the first pulse PA triggers one of the delayed pulses P00 to P15 in the delayed pulse generating ring circuit 1, a corresponding one of the outputs ER00 to ER15 of the pulse selector 3 is zeroed. In this case, the output of the encoder 4 will be smaller than 15, i.e., smaller than 01111 as binary representation. This means that the MSB EC5 of the output of the encoder 4 is zero. As a result, an output of the counter 21 for counting the number of rounds of circulation of the first pulse PA passing through the output point 103 of the delayed pulse generating ring circuit 1 is provided as output bits CO1 to CO4 of the multiplexer 27. On the other hand, if the second pulse PB occurs when the first pulse PA causes one of the delayed pulses P16 to P31, the MSB EC5 of the output of the encoder 4 becomes one, so that an output of the second counter 22 for counting the number of rounds of circulation of the first pulse PA passing through the output point 104 of the delayed pulse generating ring circuit 1 is provided as output bits CO1 to CO4 of the multiplexer 27. In this way, the number of rounds of circulation of the first pulse PA is completely counted when the second pulse PB occurs, and an output of any one of the counters is correctly grasped. For example, in Fig. 3, when the second pulse PB rises at time t3, the multiplexer 27 provides the output bits C21 to C24 of the second counter 22 that has not started counting a new round of circulation of the first pulse PA, instead of the output bits C11 to C14 of the counter 21 that has started counting a new round of circulation of the first pulse PA after the first pulse PA caused the dealyed pulse P15. When the second pulse PB rises at time t5, the first pulse PA is in the next circulation in the delayed pulse generating ring circuit 1, so that the multiplexer 27 provides the output bits C11 to C14 of the first counter 21 that has already counted the number of rounds of circulation of the first pulse PA. In Fig. 2, a D-type flip-flop 11 receives the output bits EC1 to EC5 of the encoder 4 as first to fifth bits, and the output bits CO1 to CO4 of the multiplexer 27 as sixth to ninth bits. The D-type flip-flop 11 combines the two inputs and provides a binary digital signal having bits D0 to D8 as an output of the pulse phase difference encoding circuit in response to a clock signal DCK. In this way, a phase difference between the first and second pulses PA and PB is detected based on the 32 delayed pulses produced in the delayed pulse generating ring circuit 1, and represented by an encoder output, i.e., a digital signal of five bits. Added to this encoder output are upper four bits provided by the counter that has counted the number of rounds of circulation of the first pulse PA in the delayed pulse generating ring circuit 1. In Fig. 2, the clock input DCK is supplied to the D-type flip-flop 11 that is the last stage of the pulse phase difference encoding circuit. To stabilize data to be supplied to the D-type flip-flop 11, a sufficient time is interposed after the second pulse PB occurs until the clock input DCK is supplied to the D-type flip-flop 11. In Fig. 2, a reset pulse RGCR resets (zeroes) the first and second counters 21 and 22 after outputs of the counters 21 and 22 are latched in response to the second pulse PB and before the next first pulse PA occurs. In the above embodiment, the two output points 104 and 105 of the delayed pulse generating ring circuit 1 provide count pulses for counting the number of rounds of circulation of the first pulse PA. According to the present invention, it is possible to arrange, if required, more than two output points to provide count pulses. In this case, the number of counters must be increased accordingly. In the embodiment of Fig. 2, the outputs of the delayed pulse generating ring circuit 1 and counters are continuously coupled together. To achieve this, the number of output lines of the delayed pulse generating ring circuit 1 must be 2 n . On the other hand, to sequentially alter delayed pulses generated in the delayed pulse generating ring circuit 1 round by round, the number of inverters 101 forming one round of the delayed pulse generating ring circuit 1 must be odd. Due to this, a delay time between certain two adjacent delayed pulses must be produced by two inverters. This is the reason why the inverter 1011 and NAND circuit 102 are interposed between the delayed pulses P31 and P00 to produce the delay time of two stages. If an operation speed of each inverter has a sufficient margin, the operation speed of each inverter may be set such that a delay time for the section of the two-inverter stage is equal to a delay time of a single inverter stage. This arrangement prevents detection accuracy from deteriorating. In this case, a detecting resolution to be realized without deteriorating the detection accuracy is determined by the delay time of the two inverters. To solve this problem, the present invention provides another embodiment shown in Fig. 4. The resolution of a pulse phase difference encoding circuit of this embodiment is determined by the delay time of a single inverter. The pulse phase difference encoding circuit of Fig. 4 provides a binary digital signal of nine bits indicating a phase difference between a first pulse PA and a second pulse PB. Similar to the first embodiment of Fig. 2, the circuit of Fig. 4 comprises a delayed pulse generating ring circuit 1, a pulse selector 3, an encoder 4, and a counter 2. An output of the encoder 4 provides a lower five bits of the binary digital signal of nine bits, while an output of the counter 2 provides an upper four bits of the binary digital signal. In Fig. 4, a D-type flip-flop 256 reads an output of the counter 2, and a D-type flip-flop 11 reads output bits EC1 to EC5 from the encoder 4 as well as output bits C1 to C4 from the D-type flip-flop 256. The first pulse PA, second pulse PB, and clock input DCK are the same as those of the first embodiment of Fig. 2. The embodiment of Fig. 4 differs from the first embodiment of Fig. 2 in that the number of output lines for delayed pulses P00 to P30 of the delayed pulse generating ring circuit 1 is only 31. The number of the delayed pulses P00 to P30 is odd, namely the number of inverters connected in a ring shape is odd. It is not necessary, therefore, to arrange two inverters for a delay time between certain two adjacent delayed pulses. Namely, detection resolution of this embodiment is determined by a delay time of a single inverter without deteriorating the phase difference detection accuracy. Since the number of the output lines of the delayed pulse generating ring circuit 1 is not 2 n , some operation is needed to continuously couple the outputs of the delayed pulse generating ring circuit 1 and counter 2 together in providing a digital signal. Referring again to Fig. 2, the output bits EC1 to EC5 from the encoder 4 form the bits D0 to D4 of an output of the D-type flip-flop 11, and the output bits CO1 to CO4 from the multiplexer 27 form the bits D5 to D8 of the output of the D-type flip-flop 11. Supposing the output bits EC1 to EC5 express a decimal number n (integer of 0 to 31) and the output bits CO1 to CO4 represent a decimal number N (integer of 0 to 15), the output bits D0 to D8 from the D-type flip-flop 11 express a decimal number of n+32N. On the other hand, the embodiment of Fig. 4 has the 31 output lines for delayed pulses P00 to P30 from the ring delay pulse generating circuit 1 to express a decimal number n, i.e., a integer positive of 0 to 30. This means that an output of the D-type flip-flop 11 must be n+31N with the N being an output from the counter 2 side. However, if the D-type flip-flop 11 reads the output bits EC1 to EC5 as a lower five bits and the output bits C1 to C4 as an upper four bits, the output bits D0 to D8 of the D-type flip-flop 11 of Fig. 4 represent a decimal number of n+32N. To solve this problem, a subtracter 12 is arranged to subtract N from the output bits D0 to D8 of the D-type flip-flop 11, thereby providing a correct output of n+31N. With the above arrangement, resolution can be improved without deteriorating detection accuracy. If the pulse selector 3 of Fig. 4 is the same as the pulse selector 3 of Fig. 2, the embodiment of Fig. 4 can omit the inverter 105 of Fig. 2 for preventing the output ER00 from being zeroed not only when the first pulse PA reaches the output lien for delayed pulse P30 but also on other occasions, because the number of the output lines for delayed pulses P00 to P30 of the delayed pulse generating ring circuit 1 of Fig. 4 is odd. With the above arrangement, a delay time of one delay stage of the delayed pulse generating ring circuit is equal to a delay time of a single inverter. In this case, resolution of phase difference detection can be improved by increasing the operational speed of each inverter. For example, instead of usual silicon CMOS inverters, inverters made of high-speed compound semiconductor transistors may be used to form a delayed pulse generating ring circuit to further improve the resolution of phase difference detection. Since operation speeds of circuits other than the delayed pulse generating ring circuit do not influence the detection resolution, wafer integration, selective epitaxial growing, etc., may be employed to form high-speed devices only for the delayed pulse generating ring circuit on a silicon IC chip, thereby reducing cost. The above arrangements realize a pulse phase difference encoding circuit having an excellent resolution, and are applicable for the following apparatuses and systems. A first application is a system for finding a distance to an object. The system emits a laser beam, detects a reflected wave from the object, and detects a phase difference between a pulse generated at the time the beam is emitted and a pulse generated at the time the reflected wave is detected, thereby finding the distance. This system can employ the above-mentioned pulse phase difference encoding circuit of the present invention to measure the distance at high resolution. For example, if a phase difference of pulses can be detected at a resolution of 1 ns, a distance can be measured at a resolution of 15 cm. A measuring circuit employing the pulse phase difference encoding circuit of the present invention will be explained next. Figure 5 is a block diagram showing a resistance change detecting circuit employing the pulse phase difference encoding circuit. In the figure, numerals 201 and 202 are resistance elements whose resistances change. The resistance elements may be magnetic resistance elements (MREs) for forming a sensor circuit for detecting magnetism. The magnetic resistance elements may be strain gauge resistance wires of a sensor circuit for detecting pressure. Various resistance elements are employable to realize sensor circuits in which resistance values change in response to certain physical quantities. The circuit of Fig. 5 detects a change in a difference between resistance values of the resistance elements 201 and 202. When the difference of the resistance values of the two resistance elements changes in response to a change in a certain physical quantity, the circuit can detect the change in the physical quantity. When the resistance values of the two resistance elements change opposite to each other, a maximum sensitivity is obtainable. Numerals 203 and 204 are oscillators whose oscillation frequencies change in response to changes in the resistance values of the resistance elements 201 and 202 respectively. The oscillators 203 and 204 have waveform shaping circuits and provides pulse signals CKB and CKA shown in Fig. 6 whose frequencies are determined by the resistance values of the resistance elements 201 and 202. Numerals 205 and 206 are known counters for counting the pulse signals CKB and CKA provided by the oscillators 203 and 204 and providing count signals C0B to C3B and C0A to C3A as shown in Figs. 5 and 6. Numerals 207 and 208 are decoders. When the counter 205 reaches a predetermined count value (nine in this embodiment), the decoder 207 provides reset signals RSTB and RSTA shown in Fig. 6 to the counters 205 and 206 respectively. At the same time, to synchronize the start of the next counting of the counters 205 and 206, the decoder 207 provides the oscillator 204 with a synchronizing signal SYNC. When the counter 205 reaches a count of nine, the decoder 207 provides a frequency dividing pulse signal PB as shown in Fig. 6. Similar to the decoder 207, the decoder 208 provides a frequency dividing pulse signal PA when a count of the counter 206 reaches nine. Namely, when the counters 205 and 206 count the same number (nine in Fig. 6) of pulse signals CKB and CKA, the decoders 207 and 208 provide the frequency dividing pulse signals PB and PA, so that a difference between rise times of the frequency dividing pulse signals PB and PA may correspond to a time that represents cumulative phase differences between the respective pulse signals. This arrangement has an improved detection sensitivity with respect to a change in a certain physical quantity, and can detect a slight change in an oscillation frequency due to a change in the physical quantity. The pulses PA and PB of this example correspond to the first and second pulses PA and PB of the first embodiment. Numeral 209 is a pulse phase difference encoding circuit according to any one of the embodiments of the present invention. The pulse phase difference encoding circuit 209 provides a binary signal having "i" bits D0 to Di-1 (i being a positive integer) indicating a phase difference between the pulse signals PA and PB. The pulse signal PB is delayed behind the pulse signal PA by a certain delay time. Numeral 210 is a comparator circuit for comparing a difference between previous binary digital data provided by the pulse phase difference encoding circuit 209 and present binary digital data provided by the same, and providing a pulse signal Pout. The pulse signal Pout is inverted respectively between 1 and 0 at a maximal value and a minimal value of the difference. Figure 7 shows the details of the comparator circuit 210. The comparator circuit 210 has a storage circuit 41 for storing previous binary digital data D-10 to D-1i-1 (present binary digital data being D0 to Di-1) provided by the pulse phase difference encoding circuit 209. The comparator circuit 210 further has a digital subtracter 42 for calculating a difference between the previous binary digital data D-10 to D1i-1 stored in the storage circuit 41 and the present binary digital data D0 to Di-1. The comparator circuit 210 further has a flip-flop 43 for receiving a bit signal indicating whether a result of the operation in the digital subtracter 42 is positive or negative, and providing the pulse signal Pout. When the binary digital data D0 to Di-1 indicating the phase difference of the two frequency dividing pulse signals PA and PB change from increasing to decreasing or from decreasing to increasing, the pulse signal Pout changes from 1 to 0 or from 0 to 1. In the above circuit for detecting a change in a difference in resistance values of a pair of resistance elements in response to a certain physical quantity, the resistance elements should have the same temperature coefficient to omit a special temperature compensating circuit. Since the circuits for handling frequencies that have been produced in response to changes in resistance values of the resistance elements are all digital circuits, the circuit of Fig. 5 is advantageous in operating under a high temperature. The pulse phase difference encoding circuit encodes a phase difference between two pulses representing the difference between the resistance values of the two resistance elements into binary digital data signals, and the encoded signals are compared with each other for every sampling to detect a change in the phase difference between the pulses. Even when the resistance values of the pair of resistance elements fluctuate so that a center value of the changes in the phase difference of the two pulses fluctuates, the phase difference can correctly be detected. Accordingly, it is not necessary to precisely align the resistance values of the two resistance elements. Although the detection circuit of Fig. 5 employs resistance elements, alternatively, it is possible to employ detection elements whose electrostatic capacitances change in response to a change in a certain physical quantity to easily convert changes in the electrostatic capacitances into changes in frequencies with use of known RC oscillators. In this way, the circuit of the present invention is applicable in various ways.

Claims: A pulse phase difference encoding circuit comprising a means (11) for providing a digital signal indicating a phase difference, a delayed pulse generating ring circuit (1) having a number of signal delay circuits (101; 1011) connected to one another in a ring shape, for receiving a first pulse (PA) and circulating the first pulse through the signal delay circuits (101; 1011) to repeatedly generate a plurality of delayed pulses sequentially delayed one after another, the delay time of each of the delayed pulses being determined by the number of the signal delay circuits (101; 1011) passed through by the first pulse (PA) before the delayed pulse in question is generated; counting means (2) for counting the number of rounds of circulation of the first pulse (PA) in the delayed pulse generating ring circuit (1); a pulse selector (3) having a plurality of input lines for receiving the delayed pulses respectively from the delayed pulse generating ring circuit (1), and a plurality of output lines being respectively assigned to one of the delayed pulses, the pulse selector (3) selecting, upon receiving a second pulse (PB) that forms an optional phase difference with respect to the first pulse (PA), the latest one of the delayed pulses provided by the delayed pulse generating ring circuit (1), and changing the voltage of that output line which is assigned to the selected delayed pulse, relative to the voltage of the other output lines; and an encoder (4) for receiving the output voltages from the output lines of the pulse selector (3), and providing a binary digital signal indicating the one output line that is assigned to the selected delayed pulse; wherein the digital signal provided by said means (11) indicates the phase difference between the first (PA) and second (PB) pulses, the digital signal being formed of upper bits and lower bits wherein the upper bits are formed from the number of rounds of circulating of the first pulse (PA) in the delayed pulse generating ring circuit (1) at the time when the second pulse (PB) is provided, and the lower bits are formed from the binary digital signal provided by the encoder (4). A pulse phase difference encoding circuit as set forth in claim 1, wherein the counting means (2) comprises a plurality of counters (21, 22) for counting the number of rounds of circulation of the first pulse (PA) at a plurality of positions (103, 104) in the delayed pulse generating ring circuit (1), one of the counters (21, 22) being selected depending on the position of the first pulse (PA) at the time when the second pulse (PB) is provided, the output of the selected counter and the output of the encoder (4) forming the digital signal indicating the phase difference between the first and second pulses (PA, PB). A pulse phase difference encoding circuit as set forth in claim 1 or 2, wherein the number of output lines of the delayed pulse generating ring circuit (1) is not 2 n , n being a positive integer, and said means (11) processes the digital signal whose upper bits are formed from the output of the counting means (2) and whose lower bits are formed from the output of the encoder (4), through a predetermined operation, thereby providing a continuous binary digital signal indicating the phase difference between the first and second pulses (PA, PB). A pulse phase difference encoding circuit as set forth in claim 1, 2 or 3, wherein the signal delay circuits (101; 1011) are connected in series to form a series circuit, one end of the series receiving the first pulse (PA), and being connected to the other end via a connecting means (102; 1011), the pulse selector (3) is a positional signal generating means for selecting the latest one of the delayed pulses upon receiving the second pulse (PB) a certain time after the first pulse (PA), and generates a positional signal indicating the position of the selected delayed pulse among the other non-selected delayed pulses; which positional signal is received by the encoder (4) which produces the digital signal indicating the time period between a time of input of the first pulse (PA) and the time of input of the second pulse (PB); wherein said time period is defined by supplementing the digital signal provided by the encoder (4) with the number of rounds of circulation counted by the counting means (2). A phase difference encoding cicuit as set forth in anyone of the preceding claims, wherein the signal delay circuits (101; 1011) in the delayed pulse generating ring circuit (1) comprise inverter elements (101) that are connected in series between an input terminal for receiving the first pulse (PA) and an end terminal (104), and the delayed pulses are provided from respective intermediate points between the inverter elements (101). A phase difference encoding circuit as set forth in claim 2, wherein the plurality of positions in the delayed pulse generating ring circuit (1) are located one at the end terminal (104) and one around a center portion between an input terminal and the end terminal (104). A phase difference encoding circuit according to anyone of the preceding claims wherein the delayed pulse generating ring circuit (1) has a plurality of series-connected inverters (101) to which the first pulse (PA) is applied and through which the first pulse is continuously passed, intermediate points between the inverters (101) repeatedly generating a plurality of delayed pulses in response to the passage of the first pulse (PA), the last inverter being connected to the first inverter to circulate the first pulse in the delayed pulse generating ring circuit (1); the pulse selector (3) has a plurality of flip-flops for receiving the delayed pulses respectively from the delayed pulse generating ring circuit (1) as well as the second pulse (PB) as a clock signal, the flip-flops storing and providing statuses of the delayed pulses when the second pulse (PB) occurs, the pulse selector (3) further having logic circuits connected to the flip-flops to provide a positional signal indicating the position of the first pulse (PA) in the inverters (101); the counting means (2) comprises a first counter (21) connected to a first output point (103) located at a middle of the series-connected inverters (101) of the delayed pulse generating ring circuit (1), for receiving a first count signal whenever the first pulse (PA) passes through the first output point (103), counting the number of first count signals, and providing a result of the counting; and a second counter (22) connected to a second output point (104) located at the output of the last inverter which is connected to the first inverter of the series-connected inverters of the delayed pulse generating ring circuit (1), for receiving a second count signal whenever the first pulse (PA) passes through the second output point (104), counting the number of second count signals, and providing a result of the counting; the phase difference encoding circuit further comprising a first flip-flop (25) for receiving and providing the output of the first counter (21); a second flip-flop (26) for receiving and providing the output of the second counter (22); a multiplexer (27) for receiving the output of the encoder (4), and selectively providing one of the outputs of the first and second flip-flops (25, 26) according to the output of the encoder (4); and the means for providing a digital signal indicating the phase differences between the first pulse (PA) and the second pulse (PB) comprises an output flip-flop (11) for receiving the output of the encoder (4) as predetermined bits, as well as the output of the multiplexer (27) as higher bits consecutive to the predetermined bits, and combining the bits to form the said digital signal indicating the phase difference between the first pulse (PA) and second pulse (PB).

Inventors: HOSHINO KOUICHI, OHTSUKA YOSHINORI, WATANABE TAKAMOTO, HOSHINO, KOUICHI, OHTSUKA, YOSHINORI, WATANABE, TAKAMOTO
Applicants: NIPPON DENSO CO, NIPPON SOKEN, NIPPON SOKEN, INC., NIPPONDENSO CO., LTD.
Application year: 1991
Main classification: G01R25
IPC codes: G01R25, H03K5