TI 12-bit DAC object (TLV5630)
ry.david
Posts: 63
I have temporarily mocked up a TLV5630 on a breadboard and altered Beau Schwabe's AD8803 code to get it running.· Once I get the Spin code working properly, I am going to convert it into assembly and add it to the Object Exchange.
I do have one question though.· During updates, the channel seems to go low.· Unfortunatley, I did not have time to monitor FS and CLK on the same plot, but you can see that after 10ms the output goes low for ~1ms.·· This corresponds with my waitcnt(clkfreq/100 + cnt) between updates.· Am I missing something in the datasheet or have it wired wrong?· Attached is code, scope plots, datasheet, and schematic of how I have it wired currently.
Thanks!
Ryan
I do have one question though.· During updates, the channel seems to go low.· Unfortunatley, I did not have time to monitor FS and CLK on the same plot, but you can see that after 10ms the output goes low for ~1ms.·· This corresponds with my waitcnt(clkfreq/100 + cnt) between updates.· Am I missing something in the datasheet or have it wired wrong?· Attached is code, scope plots, datasheet, and schematic of how I have it wired currently.
Thanks!
Ryan
Comments
1. The pre line is floating, if it is read as a low then it will force a 0 ouput - which maybe what you are seeing.
2. Outputing MSB first - it may be easier to reverse the bits (the >< operator) , e.g.
1.· I corrected the schematic and added a jumper on my breadboard.
2.· Your code is a lot cleaner...
I will access to a scope again tomorrow to check the output.
Thanks again!
Ryan
Thanks!
Ryan
If anyone is interested, I can update code and test this.· If I am correct, this DAC would require 4 propeller pins (unless maybe you could drive LDAC on a inverted FS?) and my end application already has used all available pins.· I am switching over to the TI DAC7568 which actually I think may work out for the better (smaller footprint, and a little cheaper).
I just love the forums, the "><" command wasn't in my programming vocab. Now it is - thanks Timmoore.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com