Hello,
I am trying to test the DAC8 model for an application/study, but it does not match my reference model. I don’t understand why at A7=3.3 and the rest 0, I don’t get half of my reference voltage exactly, and I get it with an offset of a few mV. Picture attached below.
It seems the offset is proportional to the Reference voltage, but not to anything else.
Is this a bug or a feature?
I got it. We are supposed to get half with bin2dec('10000000) {or 128 in dec} / bin2dec(‘100000000’) {or 256 in dec).
But what I still don’t understand is where the extra +1.94mV comes from.
OK, there are several aspects in this case that need clarification.
Firstly, I noticed something yesterday and checked with Mike. He confirmed that in Qspice, the DAC is supposed to range from 1/256 to 1, and he will update the documentation to reflect this. If you input ‘00000000’, you will get a non-zero output from this DAC. This is not a typical R-2R formula to expect.
Secondly, my calculation using the formula bin2dec('10000000')/bin2dec('11111111') to determine the mid-point voltage was incorrect if considering R-2R digital to analog conversion.
I was thinking D / (2^n - 1) , which give output 0 at ‘00000000’ and 1 at ‘11111111’.
Thirdly, it is common for a DAC to be constructed with an R-2R ladder network. If you refer to Wikipedia, you can find that the output voltage of an R-2R ladder network follows the formula Vout = Vref * D / (2^n), where Vref is the logic high voltage, D is the digital integer, and n is the number of bits. Therefore, a R-2R ladder network can provide exactly half of Vref output at ‘1000000’, which aligns with your expectation. However, note that an R-2R ladder network will not give you Vref at ‘11111111’. Here is my summary.
I have a custom symbol for R-2R ladder DAC, which perform the same as reference to Wiki.
Qspice/Symbols-KSKelvin/digital/.digital to analog · KSKelvin-Github/Qspice
example.R-2R Ladder DAC.qsch (6.4 KB)
Also attach the concept schematic I used to made the 8-bits and 12-bits R-2R DAC.
concept.DAC-R-2RLadder.qsch (22.1 KB)
Thank you for the time and effort to reply!
Update Qspice to the latest version; the use of LSB is fixed, allowing you to switch between the two types of R-2R DAC configurations.
01/26/2026 Corrected some errors in the 1- to 12-bit R-2R DAC device.
DAC - LSB.qsch (13.9 KB)





