[an error occurred while processing this directive]
|
unsigned char i,mask;
for (i=7;i!=0;i--){
mask = ~(1 << i);
if (addr & mask) SET(SDA) else CLR(SDA);
}
или так
unsigned char i,mask;temp=addr;
for (i=7;i!=0;i--){
if (temp & 0x80) SET(SDA) else CLR(SDA);
temp <<= 1;
}
E-mail: info@telesys.ru