Hey,
I am still learning how to properly communicate with this ADC with an STM32F4. I cant seem to figure out how to read the channels separately.
When i put voltage on AIN0 and read data from chan_1 and chan_2, the 2 channels show the same data.
For testing i am doing the below
AD7175_ReadData(&AD7175_regs[CH_Map_1]);
chan1 = spiRxBuf[1];
chan1 <<= 8;
chan1 |= spiRxBuf[2];
chan1 <<= 8;
chan1 |= spiRxBuf[3];
HAL_Delay(100);
AD7175_ReadData(&AD7175_regs[CH_Map_2]);
chan2 = spiRxBuf[1];
chan2 <<= 8;
chan2 |= spiRxBuf[2];
chan2 <<= 8;
chan2 |= spiRxBuf[3];
HAL_Delay(100);
Full code is available on github
https://github.com/maxhohenlohe/AD7175-8/blob/master/Src/main.c
Any suggestions are greatly appreciated.
Added MCU
[edited by: maxhohenlohe at 6:36 AM (GMT 0) on 23 Dec 2018]