We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, when trying to compile an C program with uVision2 v2.38a . compilation errors, following is the complete program,pls help me : #include <regc51.H> #include <intrins.H> void wrt_lcd(unsigned char*); void lcd_init(void); void cmd(unsigned int); bit station1,station2; void delay(unsigned int); sbit v1=P2^2; sbit v2=P2^3; void main() { lcd_init(); P2=0xFF; //P2_0=0; cmd(0x01); cmd(0x80); wrt_lcd("RF Base station"); cmd(0xC0); wrt_lcd(" Name Display "); delay(65000); delay(65000); delay(65000); //P2_0=1; while(!P2_0&&!P2_1); while(1) { if((P2_0==0)&&!station1) { P2_3=0; cmd(0x01); cmd(0x80); wrt_lcd("Nagerkoil"); delay(65000); delay(65000); delay(65000); delay(65000); delay(65000); delay(65000); cmd(0x01); cmd(0x80); wrt_lcd("RF Base station"); cmd(0xC0); wrt_lcd(" Name Display "); station1=1; station2=0; P2_3=1; } if((P2_1==0)&&!station2) { P2_2=0; cmd(0x01); cmd(0x80); wrt_lcd("Chennai"); delay(65000); delay(65000); delay(65000);delay(65000);delay(65000); cmd(0x01); cmd(0x80); wrt_lcd("RF Base station"); cmd(0xC0); wrt_lcd(" Name Display "); P2_2=1; station1=0; station2=1; } // } } _________________________________________________________________________________________________ following error are how to avoid _________________________________________________________________________________________________
Build target 'lcdw.c' compiling lcdw.c... LCDW.C(24): error C202: 'P2_0': undefined identifier LCDW.C(27): error C202: 'P2_0': undefined identifier LCDW.C(29): error C202: 'P2_3': undefined identifier LCDW.C(46): error C202: 'P2_3': undefined identifier LCDW.C(48): error C202: 'P2_1': undefined identifier LCDW.C(50): error C202: 'P2_2': undefined identifier LCDW.C(62): error C202: 'P2_2': undefined identifier Target not created