10-19-2015 06:27 PM
10-19-2015 06:34 PM
okay well how do you bring back the numbers can you help me. and i also attached the micro code, the main is the dma testing.c, maybe you can tell me what i doing wrong.
10-19-2015 06:35 PM
you can view all code in text files
10-19-2015 06:40 PM
10-19-2015 06:42 PM
10-19-2015 07:00 PM
@muscles05 wrote:
it not random cause when i send it to a dataviewer program that designed to view the ADC it actually produces my AC signal. and forms a sine wave.
Do you start the ADC before or after the data viewer? Here is the thing with streaming data, you need something to tell you which byte is what. If you just have the ADC streaming the data and then your program randomly starts reading it, you have no clue if you started reading half way through the sample. What I typically see with something like this is a synch byte (typically 0x02) and possibly even a CRC after the message.
So your ADC is sending an I16, Big Endian. So what I would do is read X bytes and then use the Unflatten From String to convert that read string into an array of I16.
10-19-2015 07:28 PM
Here is the code I am using to send data to LabVIEW. First I fill a buffer with a long int the with a max value of 16,777,215 because it is a 24-bit ADC. The buffer counts the number of 10millions, millions, 100thousand,...,ones. The LSB value of the buffer is '!' to signal the beginning of the buffer and the MSB value is '0x38' to signal the end of the buffer. The write buffer is then force sent through the UART to LabVIEW.
----------------------------------------------------------------------------------------------------------------------------------------------------
10-19-2015 07:54 PM
10-19-2015 08:05 PM
Can you explain a little better how do you get them to display correctly, what function looks for this and do I need to use the visa W or can I just keep using visa R without it in labview
10-19-2015 08:57 PM