Other Parts Discussed in Thread: ADS1271, ADS1274, ADS1278
Dear all,
We are using the ADS1271 High speed ADC for our Weigh scale application. Can anybody give us the sample code for ADS1271? For just reference.
Thanks and Regards,
Vijay
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Vijay,
I'm not sure what sort of sample code we might have for the ADS1271 - I'll check. We do have code examples for the ADS1274 and ADS1278 though. Attached is a Code Composer Studio project for the TMS320C5510 and the ADS1274 which you might find useful.
2677.ADS1274-DSK5510-CCS3v1.zip
Hi Tom,
Thank you for your valuable reply.
We are using the LPC2368 ARM7 processor for our application. We are using the polling method for Reading the ADC count. We are using the SPI interfacing and High speed mode. We are presently using the single ended input. MCLK = 1Mhz. But the ADC counts are drastically varying.
Here, we are posting our code for ADS1271. Please check it. whether the code flow is correct or not?
signed long int Read_ADCA_Count(void)
{
unsigned char i,NegativePol = 0;
signed long int AdcCount=0;
Read_ADCA_DRDY = Read_ADCA_DRDY_Func(); //Read DRDY pin status
while(Read_ADCA_DRDY ==1)
{
Read_ADCA_DRDY = Read_ADCA_DRDY_Func(); //It will stay in loop upto DRDY goes low.
}
for(i=0;i<24;i++) //After that We have to read the 24 bit data
{
/* During the falling edge we have to read the data */
ADCA_CLK_SET
ADCA_SclkDelay(400); //Delay approximately 75 micro seconds.
ADCA_CLK_CLR
ADCA_SclkDelay(200);
Read_ADCA_SDO = Read_ADCA_SDO_Func(); //Read the DOUT pin status
if((Read_ADCA_SDO == 1) && (i ==0 )) //MSB bit is uesd to check the polarity
NegativePol = 1;
else
{
if(Read_ADCA_SDO != 0)
AdcCount |=1;
else
AdcCount |=0;
}
ADCA_SclkDelay(200);
if(i<23)
AdcCount<<=1;
}
if(NegativePol) // For negative sign indication with apropriate calculation.
{
AdcCount = 0x7FFFFF - AdcCount; // 23 bit
AdcCount = AdcCount * (-1);
}
return(AdcCount/64); // We used only 17 bit for desired application.
}
Regards,
Vijay.
Raj,
No, we are suffering the ADC fluctuation problem and also we are missing some data bits.
Regards,
Vijay