Other Parts Discussed in Thread: ADS124S08, ADS1248, LMP90100
Hi,
I have integrated LMP90098 with the PT-100 RTD sensor and ADCout is given to MCU (STM33 controller with HAL API's) with SPI interface
The initial configuration of LM90098:
void LMP90098_Init_Config(SPI_HandleTypeDef *hspi)
{
LMP90098_Write(hspi,0x01,0x08); // argument 2- Register address; argument 3-Value
LMP90098_Write(hspi,0x03,0x00);
LMP90098_Write(hspi,0x08,0x00);
LMP90098_Write(hspi,0x10,0x02);
LMP90098_Write(hspi,0x11,0x83);
LMP90098_Write(hspi,0x12,0x2A);
LMP90098_Write(hspi,0x13,0x00);
LMP90098_Write(hspi,0x17,0x01);
LMP90098_Write(hspi,0x20,0x41);
}
And ADC_OUT value Read is as follows,
uint32_t ADC_Read(SPI_HandleTypeDef *hspi)
{
uint8_t ADC_RxBuff[6]={0x10,0x01,0xCA,0x00,0x00,0x00}; // To read 3 bytes of data, starting from address 0x1A
uint32_t ADC_Out=0;
Val=LMP90098_Read(hspi,0x1E); // Reading register 0x1E to Checking channel for scanning
if(Val>>1==0)
{
LMP90098_Write(hspi,0x1F,0x80);
LMP90098_Write(hspi,0x17,0x02);
if(DRDY_Flg)
{
DRDY_Flg = 0;
HAL_GPIO_WritePin(GPIOA,GPIO_PIN_4,GPIO_PIN_RESET); //asserting CSB
HAL_SPI_Receive(hspi,ADC_RxBuff,6,100); //Reading ADC_DOUT
HAL_GPIO_WritePin(GPIOA,GPIO_PIN_4,GPIO_PIN_SET); //Deasserting CSB
}
ADC_Out = ((ADC_RxBuff[5]) | ((ADC_RxBuff[4]<<8) | (ADC_RxBuff[3]<<16)));
return ADC_Out;
}
return 0;
}
Here is the schematics of AFE in our board:
1. If ADC_DOUT is 2 byte value then what will be the ADC_DOUTH will be filled with?
2. How can I improve ADC_DOUT accuracy?
3. Is it sufficient to monitor DRDYB signal to identify the new output in ADC_DOUT or should I even read the value in register 0x18.
4. And for the same temperature the ADC_DOUT value fluctuating, what might be the issue?
Please help me to resolve this..