- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone!
I got some problem about DAC(8 bit)
I got 32 bit ADC input and I'm trying to configurate this input with DAC 8 bit output I made something but i have some problem looks like
while I changing my input my DAC output changing too but not stable I change my input such as 36725 to 36027 my DAC output is
255 to 0 it is ok but if I change my input to down such as from 36027 to 35822 my output turning back to 255 and in continues time to 0
but I want my input was 2^32 output should be 255 my input was 0 output should be 0
How can I do it?
I attached my file
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The DMA is configured to transfer 1 byte only from the ADC to the VDAC, not a 32 bit value.
Using both DMA and Getresult() API at the same time will not work at all.
You need to call IsEndConversion() API to wait until a conversion is complete.
The expression
A_OUTPUT = ((ADC_DelSig_1_GetResult32() - 1000) * 0.0015625);
will deliver negative values for counts < 1000.
Getting all together:
When the output frequency is low (kHz) you have time enough not to use DMA at all and do a conversion to optimize the output to the VDAC
There are examples for DELSIG that are not using DMA, try one of those
Bob