break;
case 2 :
sonuc1=sonuc1-zerocrossdistance;
sonuc=0x00;
while (sonuc1<=8000)
{
sonuc1=sonuc1-stepdis;
sonuc++;
}
ilk=make8(sonuc,0);
son=make8(sonuc,1);////////gives error
putc(son);
delay_us(20);
putc(ilk);
}
}
both gives error:
Invalid parameters to built in function
why is that??
Ttelmah Guest
Posted: Thu Sep 14, 2006 7:13 am
Of course it does.
'Sonuc' as you have declared it, is a _single bit_. The 'make8' function, allows you to take one byte of a multi byte value. You can't use a function expectingf a value larger than a byte, with a variable that is smaller than a byte...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum