Method for adaptively regulating coding mode and digital correction circuit thereof
09654127 ยท 2017-05-16
Assignee
Inventors
Cpc classification
H03M1/06
ELECTRICITY
H03M1/468
ELECTRICITY
International classification
Abstract
A method for adaptively regulating a coding mode and a digital correction circuit thereof are provided. The method is for a successive-approximation-register analog-to-digital converter (SAR ADC). In the method, whether to regulate a binary weight corresponding to each of digital bits is determined according to the number of completed comparison cycles to provide a first coding sequence. The first coding sequence is directly compensated according to uncompleted comparison cycles to provide a correct digital output code.
Claims
1. A method for adaptively regulating a coding mode for a successive-approximation-register analog-to-digital converter (SAR ADC), said SAR ADC comprising at least one capacitor array, a comparator, a SAR control logic circuit and a digital correction circuit, said capacitor array comprising N switching capacitors and M redundant capacitors that are connected in parallel, said SAR control logic circuit being configured to correspondingly analyze a digital bit sequence sequentially according to an output result of said comparator, and said method comprising: (a) enabling said digital correction circuit to detect the number of comparison cycles completed by said SAR control logic circuit with respect to an analog signal as a first detected value so that said digital correction circuit acquires said digital bit sequence correspondingly analyzed by said SAR control logic circuit; (b) enabling said digital correction circuit to determine whether said first detected value is equal to (N+M), and enabling said digital correction circuit to determine whether said first detected value is larger than or equal to a pre-determined threshold value if said first detected value is not equal to (N+M); and (c) enabling said digital correction circuit to regulate a coding rule so that said digital correction circuit provides a digital output code corresponding to said analog signal according to said regulated coding rule if said first detected value is larger than or equal to said pre-determined threshold value; wherein N is a positive integer larger than 1, and M is a positive integer larger than 1.
2. The method of claim 1, wherein said pre-determined threshold value is a positive integer larger than or equal to N and smaller than (N+M).
3. The method of claim 1, wherein said digital correction circuit does not regulate said coding rule so that said digital correction circuit provides said digital output code corresponding to said analog signal according to said coding rule unregulated if said first detected value is equal to (N+M).
4. The method of claim 1, wherein step (c) comprises: enabling said digital correction circuit to acquire a difference value between (N+M) and said first detected value; enabling said digital correction circuit to use a binary weighted ratio corresponding to said first detected value to encode said digital bit sequence to provide a first coding sequence comprising N elements; and enabling said digital correction circuit to add a value of each of said N elements in said first coding sequence to said difference value, respectively, to provide said digital output code corresponding to said analog signal.
5. The method of claim 1, wherein step (c) comprises: enabling said digital correction circuit to determine whether said first detected value is equal to (N+M1); enabling said digital correction circuit to renew a (N+M).sup.th digital bit in said digital bit sequence as an inverse of a (N+M1).sup.th digital bit in said digital bit sequence if said first detected value is equal to (N+M1); and enabling said digital correction circuit to use a binary weighted ratio corresponding to (N+M) comparison cycles to encode said digital bit sequence to provide said digital output code corresponding to said analog signal.
6. A digital correction circuit for adaptively regulating a coding mode for a successive-approximation-register analog-to-digital converter (SAR ADC), said SAR ADC comprising at least one capacitor array, a comparator and a SAR control logic circuit, said capacitor array comprising N switching capacitors and M redundant capacitors that are connected in parallel, said SAR control logic circuit being configured to correspondingly analyze a digital bit sequence sequentially according to an output result of said comparator, and said digital correction circuit comprising: a detecting and receiving unit configured to detect the number of comparison cycles completed by said SAR control logic circuit with respect to an analog signal as a first detected value to acquire said digital bit sequence correspondingly analyzed by said SAR control logic circuit; and a deciding and processing unit configured to determine whether said first detected value is equal to (N+M), to determine whether said first detected value is larger than or equal to a pre-determined threshold value if said first detected value is not equal to (N+M), and to regulate a coding rule to provide a digital output code corresponding to said analog signal according to said regulated coding rule if said first detected value is larger than or equal to said pre-determined threshold value; wherein N is a positive integer larger than 1, and M is a positive integer larger than 1.
7. The digital correction circuit of claim 6, wherein said pre-determined threshold value is a positive integer larger than or equal to N and smaller than (N+M).
8. The digital correction circuit of claim 6, wherein said deciding and processing unit does not regulate said coding rule so that said deciding and processing unit provides said digital output code corresponding to said analog signal according to said coding rule unregulated if said first detected value is equal to (N+M).
9. The digital correction circuit of claim 6, wherein said deciding and processing unit is configured to: acquire a difference value between (N+M) and said first detected value; use a binary weighted ratio corresponding to said first detected value to encode said digital bit sequence to provide a first coding sequence comprising N elements; and add a value of each of said N elements in said first coding sequence to said difference value, respectively, to provide said digital output code corresponding to said analog signal.
10. The digital correction circuit of claim 6, wherein said deciding and processing unit is configured to: determine whether said first detected value is equal to (N+M1); renew a (N+M).sup.th digital bit in said digital bit sequence as an inverse of a (N+M1).sup.th digital bit in said digital bit sequence if said first detected value is equal to (N+M1); and use a binary weighted ratio corresponding to (N+M) comparison cycles to encode said digital bit sequence to provide said digital output code corresponding to said analog signal.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The accompanying drawings are included to provide a further understanding of the present disclosure, and are incorporated in and constitute a part of this specification. The drawings illustrate exemplary embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
(2)
(3)
(4)
(5)
(6)
(7)
DESCRIPTION OF THE EXEMPLARY EMBODIMENTS
(8) The detailed description set forth below in connection with the appended drawings is intended as a description of certain embodiments of the present disclosure, and is not intended to represent the only forms that may be developed or utilized. The description sets forth the various functions in connection with the illustrated embodiments, but it is to be understood, however, that the same or equivalent functions may be accomplished by different embodiments that are also intended to be encompassed within the scope of the present disclosure.
(9) The method for adaptively regulating a coding mode and the digital correction circuit thereof according to the present disclosure can be applicable to any SAR ADC. In brief, the present disclosure is not limited to how a SAR ADC is implemented.
(10) For example, referring to
(11) Furthermore, each of the capacitor arrays 11 and 13 includes, respectively, N switching capacitors C.sub.1C.sub.N and M redundant capacitors C.sub.1C.sub.M that are connected in parallel. The redundant capacitors C.sub.1C.sub.M are electrically connected to a grounding terminal GND, while the switching capacitors C.sub.rC.sub.N are switchably electrically connected to a reference voltage Vref or a grounding terminal GND. However, to achieve binary weighted switching, the capacities of the switching capacitors C.sub.1C.sub.N are arranged in ascending powers of 2 (for example, 1C, 2C, 4C, 8C, etc.). Moreover, each of the capacities of the redundant capacitors C.sub.1C.sub.M is equal to the capacity of the switching capacitor C.sub.1 that has the smallest capacity (i.e., 1C). The capacitor arrays 11 and 13 are provided to achieve sample and hold (S/H) and digital-to-analog conversion. More particularly, N is a positive integer larger than 1, and M is a positive integer larger than 1.
(12) Then, the comparator 15 includes two input terminals configured to receive the output of the capacitor arrays 11 and 13, respectively. The SAR control logic circuit 17 is configured to sequentially analyze corresponding digital bits B.sub.1B.sub.N+M according to the output result of the comparator 15, and sequentially control the switching contacts of the switching capacitors C.sub.1C.sub.N in each of the capacitor arrays 11 and 13 based on the binary search algorithm so that the outputs of the capacitor arrays 11 and 13 successively approach to each other. Finally, the digital correction circuit 19 is coupled to the SAR control logic circuit 17 and is configured to process the digital bits B.sub.1B.sub.N+M according to a conventional coding rule to provide a digital output code including N bits. It should be noted that the SAR ADC 1 is known to persons with ordinary skill in the art and thus detailed descriptions of the elements previously stated are not repeated herein.
(13) In summary, the SAR ADC 1 is capable of converting an analog signal to a relatively correct digital output code only after the SAR control logic circuit 17 has successfully completed (N+M) comparison cycles (in other word, the SAR control logic circuit 17 has to correspondingly analyze a digital bit sequence [B.sub.1:B.sub.N+M]). However, as previously stated, due to PVT variations, the SAR control logic circuit 17 may not complete the (N+M).sup.th comparison cycle within a given time period, which results in an incorrect digital output code. Accordingly, the conventional art is limited by the foregoing problem.
(14) Therefore, referring to
(15) First, in Step S201, the digital correction circuit 19 detects the number of comparison cycles completed by the SAR control logic circuit 17 with respect to an analog signal as a first detected value K so that the digital correction circuit 19 acquires the digital bit sequence correspondingly analyzed by the SAR control logic circuit 17. Moreover, in Step S203, the digital correction circuit 19 determines whether the first detected value K is equal to (N+M).
(16) Then, in Step S205, the digital correction circuit 19 determines whether the first detected value K is larger than or equal to a pre-determined threshold value if the first detected value K is not equal to (N+M). Finally, in Step S207, the digital correction circuit 19 regulates a coding rule so that the digital correction circuit 19 provides a digital output code corresponding to the analog signal according to the regulated coding rule if the first detected value K is larger than or equal to the pre-determined threshold value.
(17) More particularly, since the SAR control logic circuit 17 is capable of counting the number of completed comparison cycles, Step S201 in the method according to the present disclosure enables the digital correction circuit 19 to acquire the number of comparison cycles completed by the SAR control logic circuit 17 with respect to an analog signal by detecting the counted value of the SAR control logic circuit 17.
(18) Then, the actual number of digital bits analyzed by the SAR control logic circuit 17 can be evaluated according to the acquired number of comparison cycles completed (i.e., the first detected value K). For example, in Step S201, the digital correction circuit 19 only acquires the digital bits B.sub.1B.sub.6 analyzed by the SAR control logic circuit 17 if the first detected value K is 6.
(19) Moreover, as previously stated, the digital correction circuit 19 is capable of processing the digital bit sequence [B.sub.1:B.sub.N+M] based on the conventional coding rule to provide the correct digital output code only after the SAR control logic circuit 17 has successfully completed (N+M) comparison cycles. Therefore, one of the aspects of the present disclosure is to enable the digital correction circuit 19 to determine whether to regulate the coding rule by detecting the number of comparison cycles completed by the SAR control logic circuit 17 so as to prevent the digital correction circuit 19 from using an inadequate coding rule to provide an incorrect digital output code.
(20) On the other hand, if the first detected value K is equal to (N+M), it indicates that the SAR control logic circuit 17 has successfully completed (N+M) comparison cycles. Therefore, the digital correction circuit 19 can directly process the digital bit sequence [B.sub.1:B.sub.N+M] based on the conventional coding rule to provide a correct digital output code. Therefore, returning to
(21) Moreover, from a more general point of view, if the first detected value K is smaller than a pre-determined threshold value (for example, N), it indicates that the SAR control logic circuit 17 can only complete a very small number of comparison cycles. Therefore, whether or not the digital correction circuit 19 regulates the conventional coding rule, the SAR ADC 1 may fail to provide the correct digital output code. In view of the above problem, the method of the present disclosure will not emphasize further research or investigations thereof. Therefore, if the first detected value K is smaller than a pre-determined threshold value, the teachings of the present disclosure can still be used in Step S209. In summary, the present disclosure is not limited to any implementation when the first detected value K is smaller than a pre-determined threshold value. Persons with ordinary skill in the art may make any modifications according to practical demands or applications. Moreover, a detailed description on how the pre-determined threshold value is defined will be presented herein.
(22) According to the teachings stated above, persons with ordinary skill in the art should understand that one of the aspects of the present disclosure is to dynamically regulate the coding rule of the digital correction circuit 19 by detecting the number of comparison cycles completed by the SAR control logic circuit 17 so that the digital correction circuit 19 may use an adequate coding rule to provide a correct digital output code. Accordingly, the output result of the SAR ADC 1 stays correct under ideal conditions (i.e., when (N+M) comparison cycles successfully completed).
(23) Another example will be presented to further exemplify how the coding rule of the digital correction circuit is regulated to provide a correct digital output code in an adaptive regulating coding method provided by the present disclosure. Referring to
(24) Therefore, according to the teachings stated above, persons with ordinary skill in the art would understand that, in the SAR ADC 1, the digital correction circuit 19 is capable of processing the digital bit sequence [B.sub.1:B.sub.6] based on the conventional coding rule to provide the 4-bit digital output code only after the SAR control logic circuit 17 has to complete 6 comparison cycles. However, due to PVT variations, the digital correction circuit 19 can actually acquire only the digital bits B.sub.1B.sub.5 while the SAR control logic circuit 17 can complete only 5 comparison cycles. Therefore, the digital correction circuit 19 will provide an incorrect 4-bit digital output code if the digital correction circuit 19 in
(25) For example, as known from the conventional art, the processing of the digital bit sequence [B.sub.1:B.sub.6] based on the conventional coding rule uses the binary weighted ratio with respect to 6 (i.e., (N+M)) comparison cycles (for example, the weighting of the 6.sup.th digital bit B.sub.6 is set to be 1, the weighting of the 5.sup.th digital bit B.sub.5 is set to be 2, etc.) to encode the digital bit sequence [B.sub.1:B.sub.6]. However, since the 6.sup.th digital bit B.sub.6 in the digital bit sequence [B.sub.1:B.sub.6] cannot be analyzed, (in other words, the 6.sup.th digital bit B.sub.6 may not even exist), the digital output code [1, 2, 3, 4] which the digital correction circuit 19 should provide may be replaced by an incorrect digital output code [0, 2, 2, 4]. It should be noted that encoding the digital bit sequence using the binary weighted ratio is known to persons with ordinary skill in the art, and thus descriptions thereof are not repeated herein.
(26) Returning to
(27) Similarly, when the SAR control logic circuit 17 in
(28) Therefore, according to the teachings stated above, persons with ordinary skill in the art would understand that the method of the present disclosure determines whether to regulate the binary weight corresponding to the digital bits according to the number of completed comparison cycles (i.e., the first detected value K) to encode the digital bit sequence to provide a first coding sequence. Then, the first coding sequence is compensated with respect to the uncompleted comparison cycle to provide the correct digital output code. Accordingly, the output result stays correct under different numbers of comparison cycles completed by the SAR ADC.
(29) Based on the teachings stated above, the present disclosure further provides implementations of Step S207. Referring to
(30) Referring to
(31) On the other hand, as shown in
(32) Practically, the pre-determined threshold value in the method of the present disclosure can be set to be N to broaden the applications of adaptive regulation, to which the present disclosure is not limited thereof. Furthermore, taking the SAR ADC 1 in
(33) Moreover, another example will be presented to further exemplify how the coding rule of the digital correction circuit is regulated to provide a correct digital output code according to the present disclosure. Referring to
(34) Referring to
(35) Taking the SAR ADC 1 in
(36) In order to describe the flowchart of the adaptive regulating coding method, the present disclosure further provides a digital correction circuit. Referring to
(37) More particularly, the digital correction circuit 19 includes a detecting and receiving unit 61 and a deciding and processing unit 63. These units can be implemented by hardware circuitry, or by hardware circuitry with firmware or with software. In summary, the present disclosure is not limited to the example of the digital correction circuit 19. Moreover, the detecting and receiving unit 61 and the deciding and processing unit 63 can be integrated or disposed separately, to which the present disclosure is not limited.
(38) Furthermore, the detecting and receiving unit 61 is configured to detect a number of comparison cycles completed by the SAR control logic circuit 17 with respect to an analog signal as a first detected value K. The detecting and receiving unit 61 is configured to acquire the digital bit sequence correspondingly analyzed by the SAR control logic circuit 17.
(39) The deciding and processing unit 63 is configured to determine whether the first detected value K is equal to (N+M) to determine whether the first detected value K is larger than or equal to a pre-determined threshold value if the first detected value K is not equal to (N+M). The deciding and processing unit 63 regulates a coding rule to provide a digital output code corresponding to the analog signal according to the regulated coding rule if the first detected value K is larger than or equal to the pre-determined threshold value.
(40) It should be noted that the deciding and processing unit 63 is capable of executing the steps in
(41) As previously stated, the present disclosure provides a method for adaptively regulating a coding mode and a digital correction circuit thereof. The coding rule of the digital correction circuit is dynamically regulated according to the detected number of comparison cycles completed by the SAR control logic circuit so that the digital correction circuit uses an adequate coding rule to provide a correct digital output code. Thereby, under different PVT variations, the SAR ADC effectively eliminates the conversion time variations due to PVT variations to obtain a correct output result with different numbers of completed comparison cycles.
(42) The above-mentioned descriptions represent merely the exemplary embodiment of the present disclosure, without any intention to limit the scope of the present disclosure thereto. Various equivalent changes, alterations or modifications based on the claims of the present disclosure are all consequently viewed as being embraced by the scope of the present disclosure.