void main()
{
unsigned short c=0;
portb=0;
porta=0;
trisb=0;
do
{
if(button(&PORTA,0,1,1))//Button(port,pin,time,active_state)
{c++;
if(c=1)
portb.f0=1;
else if(c==2)
PORTB.f1=1;
else if(c==3)
portb.f2=1;
}
else if(porta.f0=0);
{
if(button(&PORTA,0,3000,1))
{portb.f0=1;
portb.f1=1;
portb.f2=1;
}
}
else if(button(&PORTA,0,3000,0))
{portb.f0=0;
portb.f1=0;
portb.f2=0;
}
}while(1);
}
if I click the button awwal marra : b0=1
2 marra :b1=1
3 marra: b2=1
والباقي مبين
الخطأ وين ؟؟