Hi
Read the value from ADS1252, the values change in rules. The CLK is 9M.
Please help check the following code:
u32 ADS1252_Red(void)
{
u32 recevice=0,i=0;
while(ADS1252_Out==1);
while(ADS1252_Out==0);
while(ADS1252_Out==1);//t4
while(ADS1252_Out==0);//t2
while(ADS1252_Out==1);//t3
ADS1252_SCLK=0;
for(i=0;i<24;i )
{
recevice<<1;
ADS1252_SCLK=0;
__NOP();
__NOP();
__NOP();
ADS1252_SCKK=1;
Delay_us(1);
if(ADS1252_Out==1)
recevice ;
}
ADS1252_SCLK=0;
Return recevice;
Thanks
Star