AnsweredAssumed Answered

DMA ADC Bit shift

Question asked by ferrario.fabio.777 on Mar 29, 2014
Latest reply on Mar 29, 2014 by knik
I am using DMA to transfer ADC data to a uint16 variable @ 1MS/s
Than the value is shifted with another DMA channel to SPI and sent to an external DAC.

Unfortunately the external 14 bit  ADC does not allow for left aligned or right aligned data, the MSBs are control bits  <c0><c1><data:14> and the ADC value are 12 bits and I can't align the data correctly.

Is there any way to shift the incoming ADC data left or right in DMA mode? I tried using unions with no success.

Fabio


 

Outcomes