Abstract:
A digital to analog converting method insensitive to code-dependent distortions is implemented by a digital to analog converter (DAC) having a plurality of unit current sources. A plurality of binary-weighted input codes are received by the DAC and rotated to generate dynamic element matched (DEM) encoded signals. Between the adjacent DEM encoded signals is a purposely added pre-determined return-to-zero (RTZ) code. When the DAC generates analog outputs according to the alternately received DEM encoded signals and the RTZ codes, a zero-voltage phase during the level transition of the analog outputs is obtained by the RTZ codes. With the DEM encoded signals and the RTZ codes, each level transition is independent. Furthermore, code-dependent problems such as mismatch- and transient-related distortion are mitigated by the DEM encoded signals.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a digital to analog (D/A) converting method and a D/A converter, and more particularly to a D/A converting method and a D/A converter with mismatch and glitch insensitivity. 
     2. Description of the Prior Art 
     With reference to  FIG. 5 , a digital to analog converter (DAC) is mainly comprised of a current source array  200  including a plurality of unit current sources  201  for converting received digital binary-weighted input codes to analog signals. The circuit architecture of a single unit current source  201  is shown in  FIG. 6  as an example, mainly having a pair of current switches M sw,p  and M sw,n  and current sources. 
     With reference to  FIG. 7 , when the DAC receives a 3-bit binary-weighted input code B 2 -B 3 , seven unit current sources U 7 -U 1  will be controlled by the binary-weighted input code B 2 -B 0 . The first digit B 2 , of the binary-weighted input code controls the unit current sources U 7 -U 4 , the second digit B 1  controls the unit current sources U 3 -U 2 , and the third digit B 0  controls the unit current source U 1 . 
     In accordance with the conventional digital return-to-zero (DRZ) technique as shown in  FIG. 8 , three current groups (U 7 , U 6 , U 5 , U 4 ), (U 3 , U 2 ), (U 1 ) are permanently fixed and respectively correspond to the three digits B 2 , B 1  and B 0 . For a 3-bit binary-weighted input code, either “100” or “011” can be selected as a mid-code. According to the DRZ method, the binary-weighted input codes and the mid-code are alternately input to the DAC during a signal phase and a return-to-zero (RTZ) phase respectively. As can be seen, for the same binary-weighted input codes encountered again, the unit current source switched by the mid-code is always the same. For example, if the received binary-weighted input code is “101” and the mid-code is “100”, the unit current source “U 1 ” is always selected and switched by the mid-code. In other words, the switching transient induced glitches are correlated with the received binary-weighted input codes. This correlation induced distortion tones will degrade the spurious free dynamic range (SFDR) of the DAC. 
     To overcome the shortcomings of the transition nonlinearity, the present invention develops a D/A converting method to implement the digital return-to-zero with randomization function, whereby the glitches causes by switching transient can be immunized. 
     SUMMARY OF THE INVENTION 
     The main objective of the present invention is to provide a method for converting digital to analog data, wherein the glitch problems causes by switching transient can be immunized and the current mismatch is also randomized by the randomization function. 
     According to an aspect of the present invention, the method for converting digital data to analog data is implemented by a digital to analog converter (DAC) having a plurality of unit current sources and two output nodes, and the method comprises the steps of: 
     receiving a plurality of binary-weighted input codes and generating a respective random rotation number for each binary-weighted input code, wherein each binary-weighted input code is interpreted as a unit current control code for selecting and controlling the plurality of the unit current sources; 
     rotating each unit current control code of each binary-weighted input code according to the respective random rotation number for generating rotated digital codes; 
     inserting a pre-determined return-to-zero (RTZ) code after each rotated digital code; and 
     producing analog signals by the plurality of the unit current sources selected and controlled by the rotated digital codes and the pre-determined RTZ code. 
     According to another aspect of the present invention, a D/A converter using the foregoing method is provided. 
     The D/A converter comprises a first dynamic element matching (DEM) encoder receiving a plurality of binary-weighted input codes and generating DEM encoded signals based on the binary-weighted input codes received; a current source array connected to the first DEM encoder and comprising a plurality of unit current sources and receiving the DEM encoded signals and pre-determined return-to-zero (RTZ) signals alternately during signal phases and RTZ phases; wherein the plurality of unit current sources generate analog outputs based on the received DEM encoded signals and the pre-determined RTZ codes. 
     In accordance with the present invention, even though the DAC encounters the same binary-weighted input codes, different unit current sources will be switched during the RTZ phase. Hence, transition nonlinearity is suppressed. Furthermore, code-dependent issues such as the mismatch- and transient-related distortion can be mitigated due to the characteristics of the dynamic element matching (DEM) technique. 
     Other objectives, advantages and novel features of the invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  shows a first preferred embodiment of a digital to analog converter (DAC) for performing the method of the present invention; 
         FIG. 2  is a block circuit diagram of a DEM encoder of the present invention; 
         FIG. 3A  shows the transition from the signal phase to the RTZ phase, wherein the random rotation number for the received binary-weighted input code is 0; 
         FIG. 3B  shows the transition from the signal phase to the RTZ phase, wherein the random rotation number for the received binary-weighted input code is 6; 
         FIG. 3C  shows the transition from the signal phase to the RTZ phase, wherein the random rotation number for the received binary-weighted input code is 3; 
         FIG. 4  shows a second preferred embodiment of a digital to analog converter (DAC) for performing the method in accordance with the present invention; 
         FIG. 5  shows an exemplary circuit diagram of a digital to analog converter (DAC) in accordance with the prior art; 
         FIG. 6  shows a circuit diagram of a single unit current source in the DAC of  FIG. 5 ; 
         FIG. 7  shows the relationships of a binary-weighted input code B 2 -B 0  and unit current sources U 7 -U 1 ; 
         FIG. 8  shows an example of the unit current source switching based on conventional DRZ technique; 
         FIG. 9A  shows a simulation waveform of SFDR performance according to the conventional DEM-based D/A converting method; 
         FIG. 9B  shows a simulation waveform of SFDR performance according to the present invention. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     With reference to  FIG. 1 , an example of a digital to analog converter (DAC) for performing the method of the present invention is shown. The DAC mainly comprises a dynamic element matching (DEM) encoder  10  and a current source array  100 . The current source array  100  outputs a differential voltage V out  from a positive output node I O+  and a negative output node I O− . The current source array  100  is comprised of multiple unit current sources. Each of the unit current sources has a switch driver  20  and a pair of current switches M sw,p  and M sw,n  and a current source I u . 
     The DEM encoder  10  receives the binary-weighted input code and generates a DEM encoded signal. The current source array  100  alternately receives the DEM encoded signal and a predetermined return-to-zero (RTZ) code during a signal phase and a RTZ phase in a clock cycle. The DEM encoded signals are available from any randomization methodology and are not limited to any particular DEM technique. During the signal phase, the DEM encoded signals are passed to the switch drivers  20  of the unit current sources. The switch drivers  20  thus generate complementary driving signals to control current switches M sw,p  and M sw,n . During the RTZ phase, the RTZ code is passed to the switch drivers  20  and controls the current switches M sw,p  and M sw,n . 
     With reference to  FIG. 2 , a DEM encoder  10  is proposed here as an example for producing the DEM encoded signal. The DEM encoder  10  comprises a random rotation unit  11 . The random rotation unit  11  receives the binary-weighted input code B 2 B 0  and generates rotated digital outputs W 7 -W 1  as the DEM encoded signal according to a random rotation number R(#). The random rotation unit  11  comprises a pseudo-random number generator  12  and a rotator  13 . The pseudo-random number generator  12  generates the random rotation number R(#), wherein # represents the number of rotation steps randomly generated. For a 3-bit binary-weighted input code B 2 -B 0 , the number of rotation steps is in a range of 0 to 6, where 7 equals 0 in the 3-bit case and no rotation step will be made. The binary-weighted input code B 2 -B 0  can be interpreted as a unit current control code for selecting and controlling the corresponding unit current sources. For example, a binary-weighted input code “101” can be converted to the unit current control code “1111001” to select unit current sources U 7 , U 6 , U 5 , U 4  and U 1  correspondingly. The rotator  13  rotates the unit current control code according to the random rotation number R(#) in either a leftward-rotating direction or a rightward-rotating direction. 
     With reference to  FIG. 3A , when the received binary-weighted input code is “101” and the generated random rotation number is R(0), five unit current sources U 7 , U 6 , U 5 , U 4  and U 1  will be selected and no rotation is performed during the signal phase. The digit B 2  of the binary-weighted input controls the four unit current sources U 7 , U 6 , U 5 , U 4  while the digit B 0  controls the unit current source U 1 . If a mid-code “100” is selected as the predetermined return-to-zero (RTZ) code, four unit current sources U 7 , U 6 , U 5  and U 4  will be selected during the subsequent RTZ phase. Obviously, the unit current source U 1  is switched while the signal phase is transiting to the RTZ phase. 
     With reference to  FIG. 3B , as the same binary-weighted input code is “101”, when the random rotation number is R(6), the original unit current control code is rotated to “1111100”. Therefore, five different unit current sources U 7 , U 6 , U 5 , U 4  and U 3  will be selected because a 6-step rotation is performed during the signal phase. It is noted that the original sequence of the unit current sources U 7 -U 1  is changed to a new sequence. The digit B 2  of the binary-weighted input code controls the four unit current sources U 6 , U 5 , U 4  and U 3  while the digit B o  controls the unit current source U 7 . The same mid-code “100” is used as the predetermined return-to-zero (RTZ) code. Therefore, the four unit current sources U 7 , U 6 , U 5  and U 4  will be selected during the subsequent RTZ phase. The unit current source U 3  is switched while the signal phase is transiting to the RTZ phase. 
     With reference to  FIG. 3C , as the same binary-weighted input code is “101”, if the random rotation number is R(3), the five unit current sources U 7  and U 4 -U 1  will be selected because a 3-step rotation is performed during the signal phase. The digit B 2  of the binary-weighted input controls the four unit current sources U 7 , U 3 , U 2  and U 1  while the digit B 0  controls the unit current source U 4 . The same mid-code “100” is used as the RTZ code, four unit current sources U 7 , U 6 , U 5  and U 4  will be selected during the subsequent RTZ phase. In this case, the switched unit current sources are U6, U5, U3, U2 and U1, and which are different from those that are switched in last case. 
     According to the examples as shown on  FIGS. 3A to 3C , even though the received binary-weighted input codes are the same, different unit current sources will be switched during the RTZ phases because of the randomly generated rotation step. In other words, the current switching of the unit current sources is randomized. Hence, transition nonlinearity is suppressed. Furthermore, code-dependent issues such as the mismatch- and transient-related distortion can be mitigated due to the characteristics of the DEM technique. 
     With reference to  FIG. 4 , in accordance with a second preferred embodiment, a first DEM encoder  10   a  receives and rotates the binary-weighted input code to generate the DEM encoded signal as described above. A second DEM encoder  10   b  is further implemented in this embodiment for receiving and rotating the RTZ code and producing the randomly rotated RTZ code. The DEM encoded signal and the randomly rotated RTZ code are alternately input to the current source array  100 . As a result, the average output current flowing through the positive output I O+  will closely approximate to that flowing through the negative output node I O− . Thus, the differential output voltage V out  between the two nodes I O+  and I O−  is almost zero during the RTZ phase. 
     For a 3-hit DAC, when the mid-code “100” is selected as the RTZ code, 2 2 =4 unit current sources will be selected during the RTZ phase and switched to the positive output nodes I O+ . Since “011” is complementary to the mid-code “100”, 2 2 −1=3 current cells will be switched to the negative output node I O− . If an extra unit current source is added to the output node that has a lower current level, i.e. the negative output node I O−  in this example, a true zero differential output V out =0 can be obtained during the RTZ phase. 
     With reference to  FIGS. 9A and 9B , two SPICE (simulation program with integrated circuit emphasis) simulation waveforms are shown for the conventional DEM-based conversion method and the method of the present invention. In these two simulations, 4% mismatch is applied to the whole switch and the current source array. According to the DEM-based conversion method in  FIG. 9A , the transition nonlinearity dominates the SFDR performance with 63 dB. By contrast, as shown in  FIG. 9B , the SFDR performance of the present invention is improved to about 72 dB. 
     Even though numerous characteristics and advantages of the present invention have been set forth in the foregoing description, together with details of the structure and features of the invention, the disclosure is illustrative only. Changes may be made in the details, especially in matters of shape, size, and arrangement of parts within the principles of the invention to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.