LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Convert a Number to a 10 bit array that will go into an external DAC (AD7533)

Solved!
Go to solution

Hello,

 

Here's is my situation.  I am using LABVIEW with to program a uC in the following fashion:

1. Laview computes the values of a sine wave, depending on the loop iteration number. (i.e. generating a sine value at different frequencies).

2. This is scaled between -/+ 1.

3.  I am connecting an array of digital output ports to an external, stand-alone, four quadrant, 10-bit DAC. The part is AD7533, and I hope to use it in the Bipolar configuration.

 

My question is,  how can I convert the number from the sine wave (or triangal, sqr, etc) into an array of T/F values that I can stream through my DAC and get a sine wave out?

 

I've tried number to Boolean array with the computed sine value, but it doesn't seem to give me high bits.

 

Any suggestions greatly apprec.

 

RTom 

0 Kudos
Message 1 of 3
(3,147 Views)
Solution
Accepted by RTom

Post what you have done so far.  Are you starting off with a a U16 or I16 bit integer (or larger)?  How are you doing the scaling between +/- 1 and an integer.  It should be just a matter of using the number to boolean array, and then using a subset of the array to reduce it down to 10 boolean elements.  If you are starting with an I16 integer, it may be a matter of taking the element of array corresponding to the sign bit, and the 9 elements corresponding to the least significant bits, than putting them together to make a 10 element array.

0 Kudos
Message 2 of 3
(3,142 Views)
This is explained in the AD7533 data sheet. But if you still struggle please post some code, and explain more accurate why you struggle.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 3
(3,123 Views)