Jump to content

  • Log In with Google      Sign In   
  • Create Account

Photo

LaunchPad library-TLV5620, w/ example waveform generator


  • Please log in to reply
12 replies to this topic

#1 gatesphere

gatesphere

    Level 3

  • Members
  • 430 posts

Posted 06 September 2010 - 08:39 PM

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 like this
MSPhere - a framework of functions for rapid prototyping with the LaunchPad platform
My other pages: home page/portfolio || development blog

#2 bluehash

bluehash

    Site Admin

  • Administrators
  • 5,308 posts

Posted 06 September 2010 - 08:55 PM

Will this be included in the MSPHere library? Nice work Gatesphere.
Will update the main blog with this.

Stellarisiti - Join the new Tiva-C/Stellaris ARM Forums discussing Tiva-C(Stellaris) Microcontrollers.

C2kCentral - C2000 News, Projects and Forums
43oh - MSP430 Discussion, News, Projects and Hacks
MachineGrid - Robots, Hacks and Technology!


#3 sparky

sparky

    Member

  • Members
  • PipPip
  • 24 posts

Posted 06 September 2010 - 09:33 PM

o_o nice!
One question though - Is the schematic as simple as connecting the VCC, GND, DATA and CLK?

#4 gatesphere

gatesphere

    Level 3

  • Members
  • 430 posts

Posted 06 September 2010 - 10:25 PM

@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.
MSPhere - a framework of functions for rapid prototyping with the LaunchPad platform
My other pages: home page/portfolio || development blog

#5 GeekDoc

GeekDoc

    Level 4

  • Administrators
  • 1,392 posts
  • LocationO'Fallon, Illinois (St. Louis Metro area)
  • Sparkfun Wishlist


Posted 06 September 2010 - 11:58 PM

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
Public Service Announcement: I am a microcontroller / electronics noob! I should usually be quietly ignored or patiently instructed.
http://blog.DocsTech.net

#6 sparky

sparky

    Member

  • Members
  • PipPip
  • 24 posts

Posted 07 September 2010 - 12:21 AM

Thanks!

So, for example, an RGB LED and an audio amplifier?

I'm thinking equalizer. :)

#7 gatesphere

gatesphere

    Level 3

  • Members
  • 430 posts

Posted 07 September 2010 - 12:53 AM

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.
MSPhere - a framework of functions for rapid prototyping with the LaunchPad platform
My other pages: home page/portfolio || development blog

#8 juani_c

juani_c

    Level 1

  • Members
  • 106 posts
  • LocationParanĂ¡-Entre Rios-Argentina

Posted 07 September 2010 - 01:09 AM

has anyone tried it on IAR? I'm having some troubles when I compile it :oops:
Improving my english a couple of words at a time...
http://ssihla.wordpress.com/

#9 gatesphere

gatesphere

    Level 3

  • Members
  • 430 posts

Posted 07 September 2010 - 05:41 AM

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?
MSPhere - a framework of functions for rapid prototyping with the LaunchPad platform
My other pages: home page/portfolio || development blog

#10 juani_c

juani_c

    Level 1

  • Members
  • 106 posts
  • LocationParanĂ¡-Entre Rios-Argentina

Posted 07 September 2010 - 04:23 PM

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?
Improving my english a couple of words at a time...
http://ssihla.wordpress.com/

#11 gatesphere

gatesphere

    Level 3

  • Members
  • 430 posts

Posted 07 September 2010 - 09:36 PM

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.
MSPhere - a framework of functions for rapid prototyping with the LaunchPad platform
My other pages: home page/portfolio || development blog

#12 juani_c

juani_c

    Level 1

  • Members
  • 106 posts
  • LocationParanĂ¡-Entre Rios-Argentina

Posted 07 September 2010 - 10:03 PM

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
Improving my english a couple of words at a time...
http://ssihla.wordpress.com/

#13 gatesphere

gatesphere

    Level 3

  • Members
  • 430 posts

Posted 07 September 2010 - 11:19 PM

It's not a problem. Like I said, IDEs tend to get in the way... But yeah, glad to help :)
MSPhere - a framework of functions for rapid prototyping with the LaunchPad platform
My other pages: home page/portfolio || development blog




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users