This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using TM4C123G With 12 Bit DAC?

Other Parts Discussed in Thread: DAC7512, TLV320AIC3254, MIKROELEKTRONIKA

Hi guys!  With some help from some of the fine folks on this forum a week or so ago I now have my TM4C123G working with this MAX549 8 bit DAC.  I'm thrilled and can't thank you guys enough.  I'm now trying to get it to work with a 12 bit DAC - the MAX5353.  One problem: According to the datasheet it requires a reference input voltage of 1.5 Volts.  This surprised me as the MAX549 doesn't have a REF IN pin.

After a good bit of Googling, the best I can tell is that I'm supposed to provide this 1.5 volt input and could possibly use something like this LM4041CILPR part paired with the 3.3v output of the TM4C123G and proper resistor to create this 1.5 volt reference input as depicted in Figure 15 of the datasheet here.  Am I at least on the right track?   ...It's odd to me the 8 bit DAC did not require this reference voltage but the 12 bit DAC does.. 

  • Hi,

    It seems to be on a good track, but you have to check for the required accuracy needed to satisfy 12 bits conversion.

    We successfully used DAC7512 and REF3030 from TI, 3V/5V output, this is also important for your design; the inherent digital noise also is important.

  • Hi Petrei - Thank you for the reply.  I have a few questions:

    1. When you say "you have to check for the required accuracy needed to satisfy 12 bits conversion", I'm not sure I fully understand, can you explain this a little farther?
    2. How do you interface the REF3030 and DAC7512 together?  Looking at the data sheet for the DAC7512 I see it doesn't have a REF IN pin like the MAX5353 does.  It simply only has a power supply input pin.
    3. Are these ICs available in DIP format?  I'm currently just working with a bread board. 

    Thanks again.  I'm a total newbie at this and really appreciate any info or assistance.

  • Hi,

    The responses are in reverse order:

    3) No; MSOP8 for DAC, easy to handle, SOT-23 for reference.

    2) Excerpt from DACs data sheet: 

    The reference for the DAC7512 is derived from the power supply, resulting in the widest dynamic output range possible. 

    the Vdd is wired to Vref, direct connection.

    1) The accuracy: the output voltage to be within +/- 1 LSB value; in some applications you may use electronic calibration and consequently a reference with lower precision (like I do); on others - the reference should have higher accuracy to satisfy the requirements.

  • Bob Jennings said:
    When you say "you have to check for the required accuracy needed to satisfy 12 bits conversion", I'm not sure I fully understand

    The accuracy of a DAC is only as good as its reference (at best, it can be worse and there are additional errors to take into account). So for a 10bit accurate output you need a reference that is accurate and stable to at least 1 part in 210 or < 0.1%. I think you will find that 12 bits approaches the accuracy of available references. I don't think you can actually buy 16 bit accurate reference off the shelf.

    DAC's w/o a reference input are limited to either their own reference accuracy or power supply accuracy. Both are usually less capable than an external reference.

    Bob Jennings said:
    Are these ICs available in DIP format?

    Digikey's active, in-stock, through hole references. Digikey's parametric search is your friend.

    www.digikey.com/.../2556223

    Robert

  • Robert and Petrei - Thanks for the additional info, unfortunately I can honestly say I'm a bit lost :)  ...I'm a very capable and experienced software engineer but have done only basic things with electronics.  I have, however, read through and largely understood the better part of this book, it doesn't cover DACs though. My Tiva Launchpad hobby projects are audio related and I'd eventually like to work up to a 16 bit DAC and maybe even a 24 bit DAC (if possible).  

    So, I'm quite eager to learn more about DACs or at least understand how to properly interface them with my Tiva Launchpad.  Possibly someone could recommend a book to read to learn more or an online reference? 

  • Browse through the bookshelf or robert's bookshelf tags. You will find references to TI's analog interface seminars (mostly A/D IIRC but A/D and D/A have some common ground)

    Robert
  • Hi,

    For audio projects,  it is useful to look out to TI's audio codecs - such as TLV320AiC3254, which simplify the hardware  and software due to features embedded on that chip.

    As for more info about DACs, Google is your friend.

  • Petrei said:
    Google is your friend.

    Well, beg to disagree on that ...;-)

    Google might be useful, but not really a friend.

    But back to the topic, I suggest an evaluation or breakout board for DAC or audio codec experiments. Analog hardware design is no trivial matter, especially for resolutions beyond 12 bit.

  • f. m. said:
    I suggest an evaluation or breakout board for DAC or audio codec experiments.

    Thank you, FM..  Yes, the more I research this, the more it seems like this is the way to go.  Some Googling led me to this MikroElektronika Audio Codec Board.  It appears to be just what I need:  Operates on 3.3v, has a 24 bit audio DAC and uses SPI and I2C communication.  Just wanted to ask if anyone had any reservations about this board working for me before I go ahead and order it?

  • Bob,
    This is no answer to you, but more trouble: measure the signal of your 8-bit DAC converter output at one steady value... Or measure the signal of its INPUT, for what is worth... I'm sure there will be lots of ripple there, if your overall circuit is just a "normal power supply".
    Now, play with the numbers... 1 bit of your 8-bit dac at 3V3 ref is ~0.013V. I'll bet this is less that the ripple you see above.
    Conclusion? There a lot of other things to work when you move into more precise conversion. 12 bits, 24 bits, 128bits won't matter... That is probably why a 12-bit IC has a voltage reference into it: is is natural that it expects something smoother to provide 4096 thin slices of voltage on the output...
    Reference IC's are all around... look at REF5025 for example (though this particular family does not have a 1.5v version). And the fact that the DAC you chose needs 1.5V is a particular requirement of such part, but not a universal thing - other converters do fine with 3V, 5V, etc.
    But I have no experience in audio, and your project is for such... so different parts might be better. Just remember garbage-in-sh%#-out.
    BUT, to mess thing up a bit further: for the little I know, audio these days is no longer converted to analog signals by translating digital values into a voltage - rather, it uses a pulse width modulation... Ain't that probably what you should look for?
    Cheers
    Bruno
  • Just one reservation: the examples are most probably unusable for you, unless you are willing to pay for the MikroE toolchain and libs.

    Last time I checked, this libs were encrypted, and useless without the MikroE toolchain. But you will find plenty of examples in source elsewhere - which should not be a problem for you as experienced SW guy.

  • Bob Jennings said:
    appears to be just what I need

    Or not!   That's a hobbyist board - is it not?   Is that firm - highly/finely skilled in advanced audio?

    Hi end Audio Magazines frequently have in depth "tear downs" of the "latest/greatest" - designed & implemented by "specialists!"  

    Should not "this" be your (next) destination?  Often - you may call/contact these firms - and if you can convey your need properly - great technical riches may flow...   (everything else is "second best" and the "GAP" between "top cabin" and "ordinary" is large)

  • No direct thoughts on the board, a few on the device.

    Without reading the spec, these are the immediate concerns I would have

    • Audio. Audio DACs are usually AC specified not DC and can have a fair offset to them with poor DC response.
    • 24 bit, you will not get anywhere close to 24 bit accuracy. That is dynamic range not accuracy
    • Codec, this may be the most alarming. A codec may want to see an encoded rather than binary data stream (i.e. compressed)
    • Finally, it's quite possible this is a fixed (or narrow frequency) device and will only operate correctly if continually updated.

    As I said I've not read the datasheet. The first two points are almost certainly true, the second two should be checked before you commit to using the device.

    Robert

  • Hi Bruno - Thanks for the thoughts.  I think I am understanding how a DAC works a little bit better.  If I understand correctly, the reference voltage must be precise and smooth to provide high precision output.  And yes, I agree my 8 bit DAC is likely noisy and nowhere near what one would call "quality audio".  

    However, after looking farther DAC breakout boards, like the aforementioned MikroElektronika Audio Codec Board, I think this is the way to for me to go for now.  My primary goal for now is to use the Tiva LaunchPad (TM4C123G) to create some audio projects - for example, a simple synthesizer.

    So, using something like this MikroElektronika audio board I think should make the problems you mention above not an issue.  Do you agree?

  • Hi Guys - Thanks for the many replies and concerns.  Much appreciation for helping out such a newbie, please know that each point you make I am pondering, researching and frequently learning from.  Some replies to your comments:

    f.m. said:

    ..the examples are most probably unusable for you, unless you are willing to pay for the MikroE toolchain and libs  Last time I checked, this libs were encrypted, and useless without the MikroE toolchain. But you will find plenty of examples in source elsewhere - which should not be a problem for you as experienced SW guy.

    Got it.  I didn't even consider this, thanks.  I just figured the way it works is that, in my Tiva LaucnhPad c program, I would do some simple initialization with the audio codec board and then it would be ready for me to send it data (just like with the 8 bit DAC I've already used).  But I think you may be right, in the examples, it appears there are function calls that do not have definitions and these would require a library.  Researching this more in a moment...   

    Robert Adsett72 said:
    • Codec, this may be the most alarming. A codec may want to see an encoded rather than binary data stream (i.e. compressed)

    Ah, gotcha.  My whole line of thinking so far (based on my experience with my 8 bit DAC experiment) is that I'm essentially sending it raw PCM samples (e.g. for 8bit a value in the range of 0-to-255) and a codec (i.e. encoder/decoder) may very well be wanting to see encoded data (e.g. MP3 frame data).  Thanks for the heads up.  

    cb1_mobile said:

    That's a hobbyist board - is it not?   Is that firm - highly/finely skilled in advanced audio?  Hi end Audio Magazines frequently have in depth "tear downs" of the "latest/greatest" - designed & implemented by "specialists!"   Should not "this" be your (next) destination?

    Well, I  suspect any typical consumer level 16 or 24 bit DAC should be fine for me for now.  It doesn't need to be high end audiophile quality, at least not at this point where I'm just learning.  As a point of reference, I just completed a project that uses an 8 bit DAC.  The difference in audio quality between an 8 bit DAC and typical audio quality of a DAC in any typical, or even low end, cell phone, laptop, etc is huge.  I would be happy with this "typical" 16 bit level of audio quality for the time being.

  • Getting you to "high-end" audio quality - "In one go" - was not my recommendation.

    While those here (to include moi) and your (proposed) audio board may mean well - are any of us fully/properly qualified in audio? And - are you?

    Thus - seeking out (real) experts - admiring their design - and then asking (them) for such guidance - may make (much) sense...

    And - I can report - our young college interns (more than once) have wrangled (early) yet superior development boards from such firms - along w/key/critical, "Do's and Don'ts!"   (which would never have resulted, otherwise...)   Thus - NO "fine-pitch soldering", NO "mismatched/ineffectual components", AND a board (most likely) "generations beyond" what you'd develop - via "normal" (trial & error) means.   Done correctly - you'll develop a relationship w/an established "expert" - worth its weight in gold - I'd say...

  • Bob Jennings said:
    Robert Adsett72
    • Codec, this may be the most alarming. A codec may want to see an encoded rather than binary data stream (i.e. compressed)

    Ah, gotcha.  My whole line of thinking so far (based on my experience with my 8 bit DAC experiment) is that I'm essentially sending it raw PCM samples (e.g. for 8bit a value in the range of 0-to-255) and a codec (i.e. encoder/decoder) may very well be wanting to see encoded data (e.g. MP3 frame data).  Thanks for the heads up.

    It may well take raw data (codec is a sometime malleable term) but it's something you should check in advance.

    A side note on 24 bit converters. They are universally sigma delta and while some are interfaced similarly to regular DACs (i.e. you send a value and the DAC takes care of everything else) there are a fairly large number of them (often labelled serial) that take the sigma delta serial stream directly. That means they must be fed a continuous serial stream and it complicates the interface considerably. So far I've managed to avoid dealing with it.

    Robert