Hi all,
i have try out above source code in MikroC.
but it provide 3 errors.. tell me whats wrong in this code….
void main()
{
TRISB = 0×00;
PORTB = 0×00;
//routine to move in one direction
for (i=0;i<50;i++)// increse i=50 no i=100 to cover double the distance
{
PORTB=0×80;
delay_ms(20);
PORTB=0×40;
delay_ms(20);
PORTB=0×20;
delay_ms(20);
PORTB=0×10;
delay_ms(20);
}
//routine to move in the other direction
for (i=0;i<50;i++) // increse i=50 no i=100 to cover double the distance
{
PORTB=0×10;
delay_ms(20);
PORTB=0×20;
delay_ms(20);
PORTB=0×40;
delay_ms(20);
PORTB=0×80;
delay_ms(20);
}
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
error message is
‘;’ expected but x found
internal error
internal error
i think errors are in line 3 o 11
please give me a solution…