C code with the C51 compiler error c213 : left side of asn-op not an lvalue code { unsigned char i,error=0; for (i=0x80;i>0;i/=2) { if (i & value) DATA=1; //error else DATA=0; SCK=1; _nop_();_nop_();_nop_(); SCK=0; } DATA=1; SCK=1; error=DATA; SCK=0; return error; }
"error c213 : left side of asn-op not an lvalue" So make it an lvalue, then! http://www.c-faq.com/sx1/index.html http://www.keil.com/support/man/docs/c51/c51_c213.htm Please read the instruction on how to post source code (right above the window where you type your message), then re-post it (in this thread, not a new one) showing which line this error relates to! Also, what is your definition of "DATA"? Hint: check http://www.keil.com/support/man/docs/c51/c51_le_keywords.htm