gatesphere 45 Posted September 6, 2010 Share Posted September 6, 2010 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: http://blog.suspended-chord.info/?c=9 bluehash and larsie 2 Quote Link to post Share on other sites
bluehash 1,581 Posted September 6, 2010 Share Posted September 6, 2010 Will this be included in the MSPHere library? Nice work Gatesphere. Will update the main blog with this. Quote Link to post Share on other sites
sparky 1 Posted September 6, 2010 Share Posted September 6, 2010 o_o nice! One question though - Is the schematic as simple as connecting the VCC, GND, DATA and CLK? Quote Link to post Share on other sites
gatesphere 45 Posted September 6, 2010 Author Share Posted September 6, 2010 @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. Quote Link to post Share on other sites
GeekDoc 226 Posted September 6, 2010 Share Posted September 6, 2010 Thanks gatesphere! 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. So, for example, an RGB LED and an audio amplifier? -Doc Quote Link to post Share on other sites
sparky 1 Posted September 7, 2010 Share Posted September 7, 2010 Thanks! So, for example, an RGB LED and an audio amplifier? I'm thinking equalizer. Quote Link to post Share on other sites
gatesphere 45 Posted September 7, 2010 Author Share Posted September 7, 2010 Thanks!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. Quote Link to post Share on other sites
juani_c 66 Posted September 7, 2010 Share Posted September 7, 2010 has anyone tried it on IAR? I'm having some troubles when I compile it :oops: Quote Link to post Share on other sites
gatesphere 45 Posted September 7, 2010 Author Share Posted September 7, 2010 has anyone tried it on IAR? I'm having some troubles when I compile it :oops: I just compiled and loaded it using IAR with no problems. Could you describe the problems you're having? Quote Link to post Share on other sites
juani_c 66 Posted September 7, 2010 Share Posted September 7, 2010 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? Quote Link to post Share on other sites
gatesphere 45 Posted September 7, 2010 Author Share Posted September 7, 2010 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. Quote Link to post Share on other sites
juani_c 66 Posted September 7, 2010 Share Posted September 7, 2010 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 Quote Link to post Share on other sites
gatesphere 45 Posted September 7, 2010 Author Share Posted September 7, 2010 It's not a problem. Like I said, IDEs tend to get in the way... But yeah, glad to help Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.