}
uchar read165(void)
{
uchar temp,i;
init165();
RC0=0; //进入内部寄存器
delay(20);
RC0=1; //允许移位输出
temp=0;
for (i=0;i <8;i++){
temp=temp < <1;
if(RA0) temp|=0x01;
RC5 = 0;
NOP();
RC5 = 1;
NOP();
}
return(temp);
}
这个程序读的RA0的状态永远是0,不知道是为什么,请指教,谢谢急!