PIC16f877A Stepper Motor controller source code ( Need Help)

Status
Not open for further replies.

isuru66

New Member
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…
 
You appear to be using some strange character instead of a lower case x.

You have,
TRISB = 0×00;
If I type the same I get,
TRISB = 0x00;

My x is different!!

Mike.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…