Dear All:
I have use ADS8326 to convert a voltage:0--5V;
My Program is:
////////////////////////////////////////
uint AD_Convert(void)
{
uint i;
uint result;
CS=1;
delay(1,1);
CS=0;
delay(1,1);
for(i=0;i<6;i++)
{
DCLOCK=0;
delay(1,1);
DCLOCK=1;
delay(1,1);
}
for(i=0;i<16;i++)
{
DCLOCK=0;
delay(1,1);
DCLOCK=1;
result=(result<<1)|DOUT;
delay(1,1);
//delay(1,1);
}
CS=1;
return result;
}
///////////////////////////////////
by use oscilioscope to see it's signal wave,timing is right,
but Dout isn't right, it has some fix output value,such as:0x07c0,0x0f83,0x3e3e,and so on.
please help me this problem.
thank you.