[an error occurred while processing this directive]
|
U8 i2c_byte_in()
{
U8 temp=0,i;
for(i=8;i>0;i--)
{ SCL = 0;
SDA = 1;
SCL = 1;
temp <<=1;
if(SDA==1)
{
temp |=1;
}
U2Led(1,"SDA=",SDA);
U2Led(0,"I = ",i);
KeySwitch = 3;
while (KeySwitch !=1){}
}
return temp;
}
E-mail: info@telesys.ru