from timing description of datasheet, i can't find how to read/write CFR register and read ADC data. Is there any sample code for ADS8239?
(1) Is it necessary to send read ADC data command every time? and if send cmd and read data is in the same CS/FS valid period?
(2) why the SDO oupput is so low(about 1.5V, My Vdd is 5V) when i execute the test functions below? Is there any hardware problem?
/*************ADS8329 AD_Converter********************/
unsigned int ads8329_get_data(void)
{
unsigned char i;
unsigned int x = 0;
ADC_CS = 0;
ADC_CLK = 0;
for(i=0; i<16; i++)
{
ADC_CLK = 0;
ads8329_delay(T_DELAY);
x<<=1;
if(ADC_SDO == 1)
{
x++;
}
ADC_CLK = 1;
ads8329_delay(T_DELAY);
}
ADC_CS = 1;
x &= 0xffff;
return (x);
}
Thanks a lot