my program is this:
#include <REGX51.h> #include <math.h>
#define s_pin P2^0; #define w_sensor P2^7; #define red_led P3^0; #define yellow_led P3^1; #define buzr P1^0;
main() { while(1) { if(s_pin==0 & w_sensor==1) { SET yellow_led; CLR red_led; } else if(switch_pin==1) { SET red_led; CLR yellow_led; SET buzr; }
} }
and error are these:
Build target 'Target 1' compiling ff.c... FF.C(14): error C141: syntax error near ';' FF.C(14): error C141: syntax error near '==' FF.C(14): error C141: syntax error near '==' FF.C(14): error C141: syntax error near ')' FF.C(16): error C202: 'SET': undefined identifier FF.C(17): error C202: 'CLR': undefined identifier FF.C(17): error C141: syntax error near 'P3' FF.C(19): error C141: syntax error near 'else' FF.C(19): error C202: 'switch_pin': undefined identifier FF.C(21): error C202: 'SET': undefined identifier FF.C(21): error C141: syntax error near 'P3' FF.C(22): error C202: 'CLR': undefined identifier FF.C(22): error C141: syntax error near 'P3' FF.C(23): error C202: 'SET': undefined identifier FF.C(23): error C141: syntax error near 'P1' Target not created
Bro, I told u earlier also... i am new on this... i have checked the line...its fine.. and i dnt know much about that... if you could provide me the running program....plz