Jump to content

LaunchPad library-TLV5620, w/ example waveform generator

Recommended Posts

Hi all. I've written a quick library to support the TLV5620 8-bit, quad-channel DAC from TI. This is a relatively powerful chip, and available in TI's magnificent sample program, in quantities of up to five in two temperature ranges (C and I).


Anyways, as I'm lazy and don't want to rewrite my blog post here, and as I'd also like to attract more traffic to my blog, I'll just post the link here.


If you have any questions or comments, feel free to leave them here or on my blog. I'll try to answer everything to the best of my knowledge :)


Blog post:


Link to post
Share on other sites

@bluehash - Thanks for the second feature! I will write an MSPhere version of the library as this version is standalone and doesn't use the MSPhere pin numbers. I will release it at an add-on library.


@sparky - The circuit details are on the blog, in the post. Basically, tie pins 2-5 and 14 to VCC, pin 1 to gnd, pin 6 to P1.0, pin 7 to P1.2, pin 8 to P1.3, and pin 13 to P1.1. The remaining four pins (pins 9-12) are the outputs of each DAC. Tie those to whatever you'd like to use the signals for. That's all there is! Be sure to read the datasheet though, it's helpful.

Link to post
Share on other sites
So, for example, an RGB LED and an audio amplifier?

I'm thinking equalizer. :)


Those are both great ideas :) To test it I attached a quick and dirty Arduinoscope to the four outputs. After I confirmed that the waveforms were being generated correctly (more or less, the waves are very rough approximations due to being constrained to a small 32 cycle sample), I then attached it to a .25" mono jack and plugged it into my amp, and tested the four channels that way, annoying my roommate and his girlfriend in the process. They both thought it was geeky as hell, but they loved that I could do that.


I'm planning on designing an audio synthesis shield around this DAC, with a few potentiometers (or other analog voltage sources), a few mono outputs, a tact switch, a DIP switch, and maybe a few jumpers to make customization easy. This will be a flexible platform for creating instruments, which is my main goal with the LaunchPad, aside from some simple lab equipment, such as an oscilloscope and a function generator (a bit more advanced than the one presented...). But yes, you can use this chip to control anything that needs a variable voltage. Just attach it to the DAC of your choice.

Link to post
Share on other sites
There is an error for each of the functions; "Undefined external "tlv_updateMode"....".I have the example code and the two source files in the same directory. Am i missing something?


That... is strange. Have you created a new project for it, added the files to the project, and set the MSP430 chip that you are using in the project settings?


Here's a step by step of what I did to get it to work:

1. Extracted all files to the same directory

2. Started IAR

3. Went to Project -> Create New Project...

4. Right clicked on the new project name in the workspace pan on the left

5. Options -> first page, click on the button next to device, and selected my chip (MSP430G2231 in my case)

6. OK

7. Right click on project -> Add -> Add Files...

8. Added the three files from earlier.

9. Plugged in a LaunchPad

10. Hit CTRL+D to start download and debug (could also go to Project -> Download and Debug)


It worked for me. The only thing I got errorwise was two "non-native end of line" warnings, which means that the editor from CCS doesn't necessarily keep the correct endline characters. Completely harmless warnings. Most of all, it worked.


I hope this helps. I don't really use IAR (but I might start... it seems a lot less bloated than CCS, but I eventually want to work with MSPGCC4, I live on the command line), so I can't be of too much help, but it's probably just the standard IDE-getting-in-the-way troubles.


Anyway, glad that you've given me a reason to look into IAR support :) Let me know if this helps.

Link to post
Share on other sites

well....this is kind of embarrasing.bear with me... I'm learning... :roll:

I have done some projects in IAR before but i'm not used to work with libraries, although i will start using them, they seem to be pretty handy.

The problem was in the 7th step. I thought that with the "include" at the beginning was enough, now is working!!! I only make a little test of the soft, I'm looking forward to try it in hardware (I happen to have the TLV ) but this will have to wait, I ave an exam on thursday!!! :(

Once again thanks for all the help

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...