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.

关于TLV2542 ADC的问题

Other Parts Discussed in Thread: TLV2542

/*TLV2542转换*/

void tlv2542()

 {     

 unsigned char  n;  

unsigned char i; 

 //sclk_1;  

cs_1;

 nop();

 cs_0;  

for(i=0;i<6;i++)   //复位  

{  

sclk_1;  //1

  nop();  

sclk_0  ;

  nop();  }

 cs_1;  

nop();  

cs_0;  

nop();

 nop();

 nop();

 nop();

 sclk_1;

 sclk_0;

 sclk_1;  

h_byte=0;

 for(n=0;n<8;n++)  

{   sclk_0;  

 if(sdo_read)  

  h_byte|=0x01;  

 sclk_1;

  if(n!=7)   

 h_byte<<=1;  }

 l_byte=0;  

for(n=0;n<4;n++)  

{   sclk_0;  

 if(sdo_read)  

  l_byte|=0x01;

  sclk_1;   

if(n!=3)   

 l_byte<<=1;  }

 for(n=0;n<4;n++)

  {   sclk_0;  

 sclk_1;  }  

 nop();  

 nop();

  cs_1; } 用单片机进行读取的,一直读不正确,显示的总是最大值4095,求解答,最后能给个程序或者时序分析图,,,谢谢