hello sir;
what is the exact delay between SCLK high to SCLK low to get all 24 bit ADC DATA without any bit loss
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.
hello sir;
what is the exact delay between SCLK high to SCLK low to get all 24 bit ADC DATA without any bit loss
Hi Balaganesh R,
Welcome to the E2E forum! I'm not sure what information you are asking for, but have you looked at the information in the ADS1232 datasheet and sections 8.3.11 and 8.3.12? In section 8.3.11 it is recommended that the rise time and fall time of the SCLK signal be less than 50ns. There is also a timing diagram Figure 8-9 that shows the high time and low time of the SCLK must be a minimum of 100ns. With a 50% duty-cycle (equal high and low times) the maximum SCLK frequency is 5MHz (1/200ns).
All 24-bits of data must be read from the ADC after completion of a conversion but before completion of the next conversion or data corruption can occur while reading the result.
I hope that answers your question. If not, please give more detail specifically as to what you are needing to know.
Best regards,
Bob B
Thanks Sir;
Sir as u told i already try the delay for SCLK High to Low 2mSec also for Low to High. But I got the various ADC result for same analog voltage. I cant get the stable result.
long ADS1232_read( bool Calibrating)
{
long int value = 0;
int i=0;
unsigned int waitingTime = 0;
delay_ms(801);//Require 801msec delay
while((PORTA.IN & (PIN5_bm))); //Wait for Data ready
// Read 24 bits but 24th bit is sign bit
for(i=0 ; i < 24; i++)
{
PORTA.OUTSET = PIN6_bm; //_SCLK, HIGH
delay_ms(2);
if((PORTA.IN & (PIN5_bm)))
{
value = (value << 1) + 1;
}
if(!(PORTA.IN & (PIN5_bm)))
{
value = (value << 1) + 0;
}
PORTA.OUTCLR = PIN6_bm; //_SCLK, LOW
delay_ms(2);
}
if(Calibrating)
{
for(i=1 ; i >= 0; i--) // 2 extra bits for calibrating
{
PORTA.OUTSET = PIN6_bm; //_SCLK, HIGH
delay_ms(2);
PORTA.OUTCLR = PIN6_bm; //_SCLK, LOW
delay_ms(2);
}
}
/* Bit 23 is acutally the sign bit. Shift by 8 to get it to the
* right position (31), divide by 256 to restore the correct value.
*/
value = (value << 8) / 256;
if(!Calibrating)
{
PORTA.OUTSET = PIN6_bm; //_SCLK, HIGH
delay_ms(2);
PORTA.OUTCLR = PIN6_bm; //_SCLK, LOW
delay_ms(2);
}
return value;
}
Hi Balaganesh R,
It appears from the code that you are using a bit-bang type solution to retrieve the data. There are a few things that I see in your code that can cause issues.
Best regards,
Bob B