my dma just taking first bite from ADC and giving to DAC so DAC giving me 1 bite as 8 bite looks like there is no time to take all bites how can I fix this?
This is an inherent problem: the ADC delivers a 3 byte wide result in its registers, the DAC is only 1 byte wide (8 bits). So the example project you're using transmits the "middle" byte from the ADC which is correct when the resolution is set to 16 bits: Upper = 0, middle = 0 to 255 lower is skipped. So DMA delivers a result from 0 to 255 into the DAC.
I am afraid that the code in line 130: LCD_Char_1_PrintU32Number(VDAC8_1_Data_REG) may not work, use a PrintInt8().
All you said you are ok. I understand So how can I fix it should I use 10 bit ADC and 10 bit DVDAC?
and I did as your said line 130: LCD_Char_1_PrintU32Number(VDAC8_1_Data_REG) I changed it to print Int8 it just slowed down not be stable as my wish
That's an approach, you may even use an 8 bit ADC and an 8 bit DAC. It all depends on what you want to perform.
Using the 8 bit configuration has a precision of < 1% which might be enough for many applications. So the question is:
What do you want to perform.
Which frequency? Every 250ms is very slow, absolutely no need for a (complicated) DMA solution.Just read an ADC result, scale it to 8 bit and send to DAC. You may use a timer component for the general timing.
Why an analog output?
What is the overall project performing?
My project is looks like engine control unit
I'm checking voltage,electricity 50 times per sec is enoughI guess maybe more (100 times maybe) and at the same time I should read the
heat (degree , *C or *K)
After these I just write the code if heat going up cut the power ... bla bla or resistors are down (short circuit) cut the power ... bla bla
My issue is just these
So I'm using MAX6675 for heat control
overall project is this So idk about precision But if input be more bites precision will be more
(after ',' So X,nnnnnnn(if my inputs max value is 2^32 I will give max voltage from output(4,080V))) sensitive