How Can I transfer data stored in a variable to DAC?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello Everyone,

   

I know the concept of data transfer via DMA. But i have still confusion, how i can transfer an 8 bit data to DAC if for example:

   

1. I performed some calculation (e.g over sampling) on my ADC real data and save it into a variable X. So now, my data would be like this:

   

ADC-Data = adc_Startconversion ();

   

I know i can directly transfer data from ADC to DAC via DMA wizard.

   

But, How i can send my Data stored in "X" to DAC? Through write command or is it possible to transfer it via dac?

   

X = Oversampling (ADC-Data);

   

Looking forward for your reply.

   

Best Regards

   

Awais

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

But, How i can send my Data stored in "X" to DAC? Through write command or is it possible to transfer it via dac?

   

When "X" is a variable you will have to use VDAC8_SetValue(X) 

   

 

   

Bob

View solution in original post

0 Likes
7 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

But, How i can send my Data stored in "X" to DAC? Through write command or is it possible to transfer it via dac?

   

When "X" is a variable you will have to use VDAC8_SetValue(X) 

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

But Its not showing me my filter or the value that i a writing into. Can you please have a look on the code please?

   

I attached the project with this message.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You return from main(). This will start over the project and spoil the results.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

You mean the return 0 ?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Well, without the return 0 the main will exit when the last closing "}" is reached. Same effect. What is missing is the infinite loop that lets the program run as long as power is applied.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Oh yes.

   

But still, output doesn't changed 😞

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Use debugger to find reason.

   

 

   

Bob

0 Likes