This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error c141:

here is a simple program for lcd .I get an error c141 while accessing port.Can anyone help me rectifying it.

#include<reg51.h>
#define data=P2;
sbit en=P1^0;
sbit rs=P1^1;
sbit rw=P1^2;
void delay()
{ int i,j; for (i=0;i<1000;++i) for(j=0;j<1085;j++);
}

void main()
{ int k; char a; char *n="Revaapriyan"; for(k=0;n[k]!="\0";k++) { a=n[k]; rs=1; rw=0; en=1; data = a; //"clcd.c(24): error C141: syntax error near '=' " delay(); en=0; }
}