Digital to analog converter with iterative stepping to each output value
10243580 ยท 2019-03-26
Assignee
Inventors
Cpc classification
International classification
Abstract
A digital to analog converter (DAC) that provides an output that is iteratively stepped as the DAC increments or decrements from its digital input to analog output. The DAC has configurable registers to store a timer count value, an iteration value, and the input value. A state machine compares the iteration value to current DAC values, and adds or subtracts the iteration value until the final output is reached.
Claims
1. An iterative digital-to-analog converter (DAC), the iterative DAC having a serial clock signal, comprising: a shift register for receiving a serial data stream, comprising data words, each data word having address bits and input data bits; a DAC value register for storing a digital input value as DAC Value, whose analog is to be the output of the iterative DAC as VOUT; an iteration value register for storing a DAC Iteration Value; a timer count value register for storing a number of clock periods that occur between iterations of the iterative DAC; a state machine for receiving the serial clock signal and for calculating VOUT, and having the following states: Idle, Value Load, DAC Calculate, and Exit; wherein in the Idle state, the state machine compares DAC Value to a current DAC Value Out, and if the values are not equal, activates a busy signal and proceeds to the Value Load state; wherein in the Value Load state, the state machine stores the current DAC Value Out and proceeds to the DAC Calculate state; wherein in the DAC Calculate state, the state machine compares the DAC Value to the current DAC Value Out, and if the difference is less than or equal to the DAC Iteration Value, changes DAC Value Out to DAC Value, and if the difference is greater than the DAC Iteration Value, adds or subtracts the DAC Iteration Value to or from the DAC Value Out; updates a DAC Timer Count, and jumps to the Exit state; and wherein in the Exit state, the state machine decrements the DAC Timer Count until it reaches zero.
2. The iterative DAC of claim 1, wherein all elements are fabricated as an integrated circuit.
3. The iterative DAC of claim 1, wherein iterative DAC is implemented with a commercially available DAC device.
4. The iterative DAC of claim 3, wherein the busy signal is added to the device as a new input.
5. The iterative DAC of claim 3, wherein the busy signal is implemented using an existing SDOUT input.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) A more complete understanding of the present embodiments and advantages thereof may be acquired by referring to the following description taken in conjunction with the accompanying drawings, in which like reference numbers indicate like features, and wherein:
(2)
(3)
(4)
(5)
(6)
DETAILED DESCRIPTION OF THE INVENTION
(7) The following description is directed to a digital to analog converter (DAC) that receives a digital value, and increments (or decrements) its output voltage until it reaches the analog of the digital input.
(8)
(9)
(10) Referring to both
(11) These registers 102, 103, 104 allow DAC 100 to be configured with several values. A DAC Value register 102 stores the voltage level to be placed on the VOUT pin. A DAC Iteration Value register 103 stores the incremental value that is successively added or subtracted as each iteration occurs. A DAC Timer Count Value register 104 stores the number of clock periods that occur between each iteration.
(12) Registers 102, 103, 104 are loaded using the protocol shown in
(13) The loading of a DAC value into register 102, initiates the DAC State Machine 110 and causes a BUSY# signal to activate. As explained below, the DAC State Machine 110 iteratively sets the VOUT signal to its final desired value, i.e. the voltage analog of the digital value written to the DAC Value register 102.
(14) The stepping calculations of the DAC State Machine 110 depend on a comparison between a current DAC Value minus VOUT and a newly assigned DAC Iteration Value. The comparison determines which of the two has the greater value. In one case, VOUT is incremented, and in the other, VOUT is decremented. Each case is described below.
(15) DAC state machine 110 is a state machine in the sense that it identifies an appropriate process to execute in response to a given event, based on both the nature of the event and the current state of the system. As explained below, state machine 110 transitions from an Idle state, to a Value Load state, to a DAC Calculate state, to an EXIT state. DAC state machine 110 is implemented with appropriate processing hardware and software.
(16)
(17)
(18) 1. The (DAC Value (3584)VOUT (0))=3584 is greater than the DAC Iteration Value (1024), so the DAC Iteration Value (1024) is added to VOUT: 1024. The BUSY# signal activates, indicating that the DAC update is in process.
(19) 2. The DAC Timer Counter increments until it reaches the DAC Timer Count Value (8), and the DAC Timer Counter is reset to 0.
(20) 3. The (DAC Value (3584)VOUT (1024))=2560 is greater than the DAC Iteration Value (1024), so the DAC Iteration Value (1024) is added to VOUT: 2048.
(21) 4. The DAC Timer Counter increments until it reaches the DAC Timer Count Value (8), and the DAC Timer Counter is reset to 0.
(22) 5. The (DAC Value (3584)VOUT (2048))=1536 is greater than the DAC Iteration Value (1024), so the DAC Iteration Value (1024) is added to VOUT: 3072.
(23) 6. The DAC Timer Counter increments until it reaches the DAC Timer Count Value (8), and the DAC Timer Counter is reset to 0.
(24) 7. The (DAC Value (3584)VOUT (3072))=512 is not greater than the DAC Iteration Value (1024), so the DAC Value (3584) is placed on VOUT.
(25) 8. The DAC Timer Counter increments until it reaches the DAC Timer Count Value (8), and the DAC Timer Counter is reset to 0. The BUSY# signal returns to its inactive state, indicating that the DAC update has completed.
(26)
(27) 1. The (VOUT (3584)DAC Value (0))=3584 is greater than the DAC Iteration Value (1024), so the DAC Iteration Value (1024) is subtracted from VOUT: 2560. The BUSY# signal activates, indicating that the DAC update is in process.
(28) 2. The DAC Timer Counter increments until it reaches the DAC Timer Count Value (8), and the DAC Timer Counter is reset to 0.
(29) 3. The (VOUT (2560)DAC Value (0))=2560 is greater than the DAC Iteration Value (1024), so the DAC Iteration Value (1024) is subtracted from VOUT: 1536.
(30) 4. The DAC Timer Counter increments until it reaches the DAC Timer Count Value (8), and the DAC Timer Counter is reset to 0.
(31) 5. The (VOUT (1536)DAC Value (0))=1536 is greater than the DAC Iteration Value (1024), so the DAC Iteration Value (1024) is subtracted from VOUT: 512.
(32) 6. The DAC Timer Counter increments until it reaches the DAC Timer Count Value (8), and the DAC Timer Counter is reset to 0.
(33) 7. The (VOUT (512)DAC Value (0))=512 is not greater than the DAC Iteration Value (1024), so the DAC Value (0) is placed on VOUT.
(34) 8. The DAC Timer Counter increments until it reaches the DAC Timer Count Value (8), and the DAC Timer Counter is reset to 0. The BUSY# signal returns to its inactive state, indicating that the DAC update has completed.
(35) The user also has the option to change the SCLK frequency to a lower frequency once the BUSY# signal activates. This provides the capability to set the iteration periods to any length.
(36)
(37) In an IDLE State, if DAC Value is not equal to the current DAC Value Out, activate the BUSY# signal and jump to the next state VALUE_LOAD. Otherwise, return the BUSY# signal to its inactive state.
(38) In a value VALUE_LOAD State, load a holding register DAC Step 51 with the current contents of DAC Value Out. Then, jump to the next state DAC_CALCULATE.
(39) In the DAC_CALCULATE State, if no stepping is desired, the user has the option to place a default value of 0 in the DAC Iteration Value. If this is the case, load DAC Value Out with DAC Value.
(40) Otherwise, if the difference between DAC Value and the current DAC Value Out is less than or equal to DAC Iteration Value, load DAC Value Out with DAC Value.
(41) If the difference between DAC Value and the current DAC Value Out is not less than or equal to DAC Iteration Value, and if the DAC Value is incrementing, i.e. DAC Value is greater than DAC Value Out, add DAC Iteration Value to DAC Value Out.
(42) If the difference between DAC Value and the current DAC Value Out is not less than or equal to DAC Iteration Value, and if the DAC Value is decrementing, i.e. DAC Value is less than DAC Value Out, DAC Iteration Value is subtracted from DAC Value Out.
(43) Next load the DAC Timer Counter with DAC Timer Count Value.
(44) Then jump to the EXIT state.
(45) In the EXIT State, decrement the DAC Timer Counter until it reaches 0. When that occurs, return to the IDLE state.
(46) DAC state machine 110 loops until DAC Value Out is equal to DAC Value.
(47) In the case of a decrementing VOUT, the AB is changed to BA, the A>B is changed to B>A, and the adder signs are swapped. Also, in the DAC Value Out, the DAC Step is .
(48) A feature of the above-described incrementing/decrementing method is that the user need not take special precautions when changing a DAC from one value to another when the difference between the new and current values is significant. These scenarios without this stepping function have the potential for causing hardware failures especially in cases when the DAC is controlling a high voltage power supply. Thus, this invention eliminates the need for the user to implement lengthy tables or costly mathematical functions in the user's hardware.
(49) Referring again to
(50) For conventional DAC devices, such as the ones described in the preceding paragraph, the BUSY# signal is a new input signal. An alternative to using the BUSY# signal is for the user to implement the SDOUT signal, a common implementation found in many DACs in the market today. This signal is the output complement to the input SDIN signal and gives the user the ability to be notified through a commonly used serial protocol that provides the user with the same information that the BUSY# signal provides. The DAC can be periodically queried to determine if a final value has been reached.