The invention relates to an electric counter circuit and to an electric circuit.
Electric counter circuits, which are often used to measure time, are clocked by a clock signal. The time resolution of the counter circuit depends on the cycle duration of the clock signal, i.e. on the associated fundamental frequency of the clock signal. Nevertheless, it is not only the count resolution that increases with an increasing clock frequency, but also the power consumption of the clock signal generator.
U.S. Pat. No. 6,388,492 B2 discloses a clock generation circuit including a multiphase clock generation circuit for generating multiphase clocks of a predetermined frequency, pulse generation circuits for generating a plurality of non-overlap pulses by using at least a part of the multiphase clocks, and a circuit for obtaining an OR of the plurality of non-overlap pulses, thereby generating a clock not having a simple whole multiple ratio relationship with respect to a frequency of the multiphase clocks or a clock having a higher frequency without causing an increase of power consumption and an increase of chip area. Thus, a clock having a frequency which is different from that of the multiphase clocks is generated.
It is an object of the invention to provide an electric counter circuit which affords the time resolution associated with a relatively high clock frequency without putting up with the relatively high power consumption associated with the relatively high clock frequency.
According to the invention, the above object is achieved by an electric counter circuit comprising: a clock generator for generating a plurality of clock signals, each having the same cycle duration and being phase-shifted with respect to each other, a sampling device for sampling the clock signals at a first moment in time when a first characteristic signal section of a digital signal appears; and a calculation device for calculating the time which has elapsed between the first moment and a second moment in time which is later than said first moment, based on the clock signals at the first moment and based on the clock signals at the second moment in time. The second moment may be the current moment in time so that the counter circuit according to the invention measures the time which has elapsed since the first signal section appeared in an ongoing way. The first characteristic signal section may be particularly a rising or a falling edge of the digital signal. The characteristic signal section may also be a minimum or a maximum of the digital signal. The counter circuit according to the invention starts counting when the characteristic signal section of the digital signal appears. Then, the sampling device, for instance, a sample-and-hold device or a latch circuit, samples the actual clock signals at that moment in time, i.e. at the first moment. In order to obtain all the states of the clock signals, it is sometimes possible to sample only some of the clock signals. This is especially the case if each clock signal lags its preceding clock signal by the same time period. For example, if four clock signals are used and each clock signal lags its preceding clock signal by a quarter of their cycle durations, i.e. by 90°, the four clock signals define four different states. However, the four different states can also be determined if the states of two consecutive clock signals are evaluated. If the counter device according to the invention is supposed to determine the time which has elapsed since the appearance of the first characteristic signal section, the second moment in time is the present moment. Then, the relationship between the current states of the clock signals and the states of the clock signals at the first moment of the characteristic signal section have to be evaluated.
If the calculating device determines the time between the two moments only on the clock signals at these two moments, the maximum count will correspond to a time which is less than the cycle duration of the clock signals. In a limited version of the counter circuit according to the invention, the counter circuit therefore comprises a counter device which is clocked by one of the clock signals and generates a count based on this clock signal. The calculation device is further configured to determine the time between the two moments based on the corresponding clock signals and based on the count of the counter device.
The clock generator generates the plurality of clock signals. Particularly, the clock generator may comprise an oscillator for generating a base clock signal, and a signal-processing device for generating the plurality of clock signals from the base clock signal. The clock generator may also be a ring oscillator.
The counter circuit according to the invention may be used to measure the time between two characteristic signal sections of the digital signal. Then, the second characteristic signal section lags the first characteristic signal section and the circuit according to the invention comprises a device for sampling the clock signals when the second characteristic signal section of the digital signal appears, i.e. at the second moment. The second characteristic signal section may be particularly a rising or a falling edge of the digital signal or a maximum or a minimum of the digital signal.
The counter circuit according to the invention may be particularly part of an electric circuit which comprises an additional sampling circuit for sampling the digital signal. Such an electric circuit is, for instance, a transponder, which may be used in an RFID tag or in a smart card. When such a transponder receives the digital signal, it has to estimate the data rate of an associated reader. For this reason, the digital signal may have a prefix signal section and a main data section. The prefix section may have the first characteristic signal section leading the second signal characteristic section. The time between the two characteristic sections comprises information about the data rate of the transponder. Then, the electric circuit according to the invention is preferably configured to estimate the time between the two characteristic signal sections using the counter circuit of the invention. The sampling circuit, which may be a sample-and-hold circuit, is especially provided to sample the main data section of the digital signal. Since the counter circuit according to the invention determines the states of the clock signals at the moment of the first characteristic signal section of the digital signal, it is advantageous to select the clock signal, whose rising edge immediately follows after this point in time, as the clock sampling signal for the sampling circuit. Consequently, the counter circuit according to the invention does not just provide a counter with a certain resolution which is normally associated with a much higher clock frequency, but it also provides a clock-sampling signal for the sampling circuit with a lower clock frequency than is normally necessary to achieve a certain synchronization error.
Such a synchronization is necessary to provide satisfactory data transmission between a sender and a receiver. In general, the internal clock of the receiver is synchronized with the internal clock of the sender when transmitting data between a sender and a receiver. Otherwise, the transmitted data would be sampled by a sampling device of the receiver at bad points in time, resulting in transmission errors. It should be noted that the stated problem arises for any sender/receiver combination having independent internal clocks, regardless of the physics of the transmission channel. This means that the problem equally arises for transmitting data by use of sound, light, radio waves and any other medium.
These and other aspects of the invention are apparent from and will be elucidated by way of non-limiting examples described hereinafter.
In the drawings,
A first embodiment of a clock generator in the form of a ring oscillator 1 is shown in
The second inverter 5 is connected downstream to the output of the first inverter 4 and generates the third clock signal 23 by inverting the first clock signal 21. The third inverter 6 is connected downstream to the output of the first delay element 2 and generates the fourth clock signal 24 by inverting the second clock signal 22.
Although the ring oscillator 1 obviously requires power to operate, an appropriate power supply providing an appropriate supply voltage is not shown in the Figures for the sake of brevity. However, the ring oscillator 1 begins to oscillate spontaneously above a certain threshold of the supply voltage.
The ring oscillator 1 outputs the four clock signals 21, 22, 23, 24, which are fed to the latch circuit 31. Signals 21′, 22′, 23′, 24′ are present at the output of the latch circuit 31. Additionally, the digital signal DS is fed to the clock input 32 of the latch circuit 31. In this embodiment, the latch circuit 31 is configured to detect a rising edge LE of the digital signal DS. As long as the latch circuit 31 does not detect a rising edge LE of the digital signal DS, the output signals 21′, 22′, 23′, 24′ of the latch circuit 31 are the four clock signals 21, 22, 23, 24. If the latch circuit 32 detects a rising edge LE of the digital circuit DS, the present output signals 21′, 22′, 23′, 24′ of the latch circuit 31 are frozen.
The four clock signals 21, 22, 23, 24 and the output signals 21′, 22′, 23′, 24′ of the latch circuit 31 are the input signals of a logic device 33. The logic device 33 is configured to determine the time ΔT which has elapsed since the latch circuit 31 detected the rising edge LE of the digital signal DS. The logic device 33 determines the time ΔT by comparing the states of the four clock signals 21, 22, 23, 24 with the states of the output signals 21′, 22′, 23′, 24′ of the latch circuit 31. An output signal representing the time ΔT is present at the output 34 of the logic circuit 33. Since the states of the four clock signals 21, 22, 23, 24 recur after every cycle duration T, the logic device 33 cannot correctly measure a time ΔT, which is longer than the cycle duration T. Accordingly, when designing a counter circuit 30, care should be taken that the longest time ΔT, which shall be measured, is less than the cycle duration T of the four clock signals 21, 22, 23, 24.
The counter circuit 40 of
The logic device 34 is configured to determine the time ΔT, which has elapsed since the latch circuit 31 detected the rising edge LE of the digital signal DS. The logic device 34 determines the time ΔT by comparing the states of the four clock signals 21, 22, 23, 24 with the states of the output signals 21′, 22′, 23′, 24′ of the latch circuit 32 and by considering the states of the output signals 43, 44, 45 of the counter device 41. An output signal representing the time difference ΔT is present at the output 33 of the logic circuit 34.
The main difference between the counter circuit 50 of
The latch circuit 31 freezes the states of the two clock signals 51, 52 at its output when it detects a rising edge LE of the digital signal DS. Then, a signal representing the time ΔT which has elapsed since the detection of the rising edge LE of the digital signal DS is present at the output 34 of the logic device 33. The time ΔT is calculated in accordance with the following equation:
ΔT=4*CNT+CORR1+CORR2
wherein CNT is the current count of the counter device 41, CORR1 is determined in accordance with
In addition to the counter circuit 40 shown in
The general purpose of the counter circuit 80 in this embodiment is to measure time, particularly the time ΔT′ between two characteristic signal sections of the digital signal DS, and to generate a clock-sampling signal for a sampling circuit 90 depicted in
In this embodiment, the two characteristic signal sections of the digital signal DS are a rising edge LE and a falling edge TE of the prefix signal section of the digital signal DS as shown in
The second latch circuit 81 comprises a first input 82, which is fed by the first clock signal 21, and a second input 83, which is fed by the second clock signal 22. The second latch circuit 81 outputs a first output signal L1, which is fed to the first address ADR1 of the multiplexer MX and to the logic device 33, and a second output signal L2, which is fed to the second address ADR2 of the multiplexer MX and to the logic device 33. The second latch 81 comprises a clock input 84 to which the digital signal DS is fed. As long as the second latch 81 does not detect a rising edge LE of the digital signal DS, the output signals L1, L2 of the second latch circuit 81 are the first and second clock signals 21, 22. If the second latch circuit 81 detects a rising edge LE of the digital circuit DS, the present output signals L1, L2 of the second latch circuit 81 are frozen.
The multiplexer MX is configured in such a way that the first clock signal 21 is the clock signal CLK if the first address input ADR1 has the state “0” and the second address input ADR2 has the state “0”. If the first address input ADR1 has the state “1” and the second address input ADR2 has the state “0”, the clock signal CLK is the second clock signal 22. If the first address input ADR1 has the state “1” and the second address input ADR2 has the state “1”, the clock signal CLK is the third clock signal 22. Finally, if the first address input ADR1 has the state “0” and the second address input ADR2 has the state “1”, the clock signal CLK is the fourth clock signal 24.
In contrast to the counter circuit 40 of
Consequently, as soon as the second latch circuit 81 and the counter device 41 detect the rising edge LE, the output signals L1, L2 of the second latch circuit 81, and thus the signals for the two addresses ADR1, ADR2 of the multiplexer MX are fixed, and the counter device 41 starts to count. Additionally, the clock signal CLK for the counter device 41 and for the sampling device 60 is selected. As long as the first latch circuit 31 and the counting device 41 do not detect the falling edge TE of the prefix signal section of the digital signal, the output signals 21,′, 22′, 23′, 24′ of the first latch circuit 31 are the four clock signals 21, 22, 23, 24, and the counter device 41 continues to count. As soon as the first latch circuit 31 and the counter device 41 detect the falling edge TE, the output signals 21,′, 22′, 23′, 24′ of the first latch circuit 31 are frozen, the counter device 41 stops to count, and the time ΔT′ remains constant.
In this embodiment, and for the digital signal DS shown in
The logic device 33 is configured to determine the time ΔT′ which has elapsed since the rising edge LE of the digital signal DS was detected. The logic device 33 determines the time ΔT′ in accordance with the following equation:
ΔT′=4*CNT+CORR3+CORR4
wherein CNT is the actual count of the counter device 41, CORR3 is determined in accordance with
In the present embodiment, the main data signal section of the digital signal DS is sampled by the sampling circuit 90 shown in
In addition to the clock signal CLK, which is also fed to the counter device 41, the output signal DT of the logic device 33 is fed to the frequency divider 91. The signal DT represents a constant time ΔT′ after the falling edge TE of the digital signal DS occurred. Since the sampling device 90 is used to sample the main data section of the digital signal DS, the signal DT represents the time difference between the rising edge LE and the falling edge TE of the prefix section of the digital signal DS and is constant. As stated before, a sender can transmit a pulse, whose duration is representative of a certain data rate. In this particular example, the duration of the pulse can be directly used as a divisor for the frequency divider 91, which is configured in a well-known manner to divide the clock signal CLK into the clock-sampling signal CLK′ being appropriate for the sample-and-hold device 92. However, in principle, also other methods of defining a data rate are feasible. In this case, the signal DT is computed in another appropriate way.
In an alternative embodiment, the output signal CLK of the multiplexer MX is fed to the calculation device 33, instead of the output signals L1, L2 of the second latch 81 to calculate the time ΔT′.
The counter circuits 30, 40, 80 comprise a clock generator which generates four clock signals 21, 22, 23, 24. However, the electric circuit according to the invention is not limited to four clock signals. Furthermore, the counter circuits 30, 40, 80 comprise the ring oscillator 1 as a clock generator, whereas other types of clock generators are also feasible.
The clock generator 110 of
Although the clock generator 110 obviously requires power to operate, an appropriate power supply providing an appropriate supply voltage is not shown in the Figures for the sake of brevity.
The clock generator 120 comprises an oscillator OS, which may be a quartz oscillator again (however, any other oscillator is applicable as well), a first delay element 126, a second delay element 127, a third delay element 128, and a fourth delay element 129. The oscillator OS outputs a base clock signal which is the first clock signal 121 generated by the clock generator 120.
The four delay elements 126, 127, 128, 129 are each connected downstream to the oscillator OS. The first delay element 126 delays the first clock signal 121 by a time period of T/5 (equivalent to a phase shift of 72°), generating the second clock signal 122. The second delay element 127 delays the first clock signal 121 by a time period of 2T/5 (144°), generating the third clock signal 123. The third delay element 128 delays the first clock signal 121 by a time period of 3T/5 (216°), generating the fourth clock signal 124. The fourth delay element 129 delays the first clock signal 121 by a time period of 4T/5 (288°), generating the fifth clock signal 125.
Although the clock generator 120 obviously requires power to operate, an appropriate power supply providing an appropriate supply voltage is not shown in the Figures for the sake of brevity.
The ring oscillator 1 and the clock generators 110, 120 each generate a plurality of clock signals 21-24, 121-125, each having the same cycle duration T and the same phase shift with respect to the preceding and succeeding clock signals.
In this embodiment, the ring oscillator 130 comprises an inverter 135, a first delay element 136, a second delay element 137, a third delay element 138, and a fourth delay element 139. The output of the inverter 135 is connected to the input of the first delay element 136, the output of the first delay element 136 is connected to the input of the second delay element 137, the output of the second delay element 137 is connected to the input of the third delay element 138, the output of the third delay element 138 is connected to the input of the fourth delay element 139, and the output of the fourth delay element 139 is connected to the input of the inverter 135, closing the ring oscillator 13. Each delay element 136, 137, 138, 139 delays an input signal by a constant time period which corresponds to a phase shift of 45° of the four clock signals 131, 132, 134, 135. Accordingly, there is a phase shift of 45° between the first and the second clock signal 131 and 132, between the second and the third clock signal 132 and 133, between the third and the fourth clock signal 133 and 134, and a phase shift of 225° between the fourth and the (succeeding) first clock signal 134 and 131. One can easily see that the rising and falling edges of the clock signals 131-134 are not evenly distributed over time. However, the invention is also applicable to such embodiments of a clock generator.
Although the ring oscillator 130 requires power to operate, an appropriate power supply providing an appropriate supply voltage is not shown in the Figures for the sake of brevity. However, the ring oscillator 60 begins to oscillate spontaneously above a certain threshold voltage.
It should be noted that all clock signals in the afore-mentioned examples have a duty cycle of 50%, which means that the time periods during which a clock signal is “0” or “1” are equal. However, this measure is not mandatory for the invention. One skilled in the art will easily perceive that the invention also works well with clock signals having a different duty cycle.
It should further be noted that the invention is applicable to all problems ranging from simple clocks to more sophisticated problems where time has to be measured. As stated, one advantage of the electric circuit according to the invention is that a comparably high accuracy can be achieved by using a clock signal for the sampling device having a relatively low frequency. Accordingly, the power consumption is relatively low due to the low frequency, which is particularly advantageous when receiving devices must cope with limited power resources. Examples are smart cards and RFID devices. Particularly when using passive devices (without onboard battery), the radio range of a transponder is a function of the power consumption, i.e. the lower the power consumption, the higher the radio range, which is obviously a fundamental feature of a transponder. Accordingly, the invention is particularly advantageous for passive transponders.
Although the counter devices 41 shown in
It is also easy to understand that the invention does not only relate to the presented combination of rising and falling edges LE and TE of the digital signal DS, but rather to any combination of signal characteristics. One example is to define the first moment in time by detecting a maximum of an input signal and to define the second moment in time by detecting a subsequent rising edge. Thus, the invention is of course not limited to digital input signals, but is also applicable to analog signals.
Although freezing the states of the clock signals was shown only by means of latches, one skilled in the art can easily conceive alternative devices without departing from the scope of the invention. Examples for freezing states of clock signals are all types of memories and registers. Furthermore, one will easily understand that the presented latch mechanism is not the only feasible one. Latch mechanisms which work on a rising or a falling edge, on a pulse, or on a minimum or a maximum of an input signal are also feasible. In addition, switches may be used, which disconnect the clock inputs of the latches. In this case, a special logic device controls the switches in such a way that the electric counter circuit provides a proper time-measuring function. The teachings presented herein are also applicable to such a case without departing from the scope of the invention.
Finally, it should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be capable of designing many alternative embodiments without departing from the scope of the invention as defined by the appended claims. In the claims, any reference signs placed in parentheses shall not be construed as limiting the claims. Use of the verb “comprise” and its conjugations does not exclude the presence of elements or steps other than those stated in any claim or the specification as a whole. The singular reference of an element does not exclude the plural reference of such elements, and vice-versa. In a device claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
Number | Date | Country | Kind |
---|---|---|---|
05111956.8 | Dec 2005 | EP | regional |
PCT/IB2006/054627 | Dec 2006 | IB | international |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/IB06/54627 | 12/6/2006 | WO | 00 | 6/11/2008 |