#include<stdio.h> #include<reg51.h> void main () { int i; p1=0x0FF; while(1) { for (i=0;i<10000;i++); p1=0x0FF; for (i=0;i<10000;i++); p1=0x00; } } i am getting a syntax error haelp me to resolve this
"help" implies some effort on your part - so what have you done to resolve the problem?
For a start, you could pay attention to the instructions for posting source code: www.danlhenry.com/.../keil_code.png
What, exactly, was the specific "syntax error" that was reported?
Where, exactly, was it reported?
Look at the message - read it carefully - look at your code; check your 'C' textbook
Check the message description in the Manual: http://www.keil.com/support/man/docs/c51/c51_errors.htm
It's P1 not p1.