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.
#include <reg51.h> sbit Read = P2^5; sbit Write = P2^6; sbit INTR = P2^7; //#define MYDATA = P1; sfr MYDATA = 0x80; void ConvertAndDispaly(unsigned char value); void MSDelay(unsigned int value); int value; void main () { MYDATA = 0xFF; INTR = 1; Read=1; Write =1; while (1) { Write = 0; Write = 1; while (INTR ==1); Read = 0; value = MYDATA; ConvertAndDisplay(value); Read = 1; } } void ConvertAndDisplay(unsigned char value) // { unsigned char x, d1,d2,d3; x=value/10; d1=value%10; d2=x%10 ; d3=x/10; P0=d1; MSDelay(250); P0=d2; MSDelay(250); P0=d3; MSDelay(250); // } void MSDelay(unsigned int value) { // unsigned char i,j; unsigned int i,j; for(i=0;i<=value;i++) for(j=0;j<=1275;j++) } </prev> the following error occurs, please help me out with this. Build target 'Target 1' compiling temp.c... TEMP.C(24): warning C206: 'ConvertAndDisplay': missing function-prototype TEMP.C(24): error C267: 'ConvertAndDisplay': requires ANSI-style prototype TEMP.C(31): error C132: 'x': not in formal parameter list TEMP.C(31): error C132: 'd1': not in formal parameter list TEMP.C(31): error C132: 'd2': not in formal parameter list TEMP.C(31): error C132: 'd3': not in formal parameter list TEMP.C(32): error C244: 'x': can't initialize, bad type or class TEMP.C(32): error C132: 'x': not in formal parameter list TEMP.C(33): error C244: 'd1': can't initialize, bad type or class TEMP.C(33): error C132: 'd1': not in formal parameter list TEMP.C(34): error C244: 'd2': can't initialize, bad type or class TEMP.C(34): error C202: 'x': undefined identifier TEMP.C(34): error C132: 'd2': not in formal parameter list TEMP.C(35): error C244: 'd3': can't initialize, bad type or class TEMP.C(35): error C202: 'x': undefined identifier TEMP.C(35): error C132: 'd3': not in formal parameter list TEMP.C(36): error C244: 'P0': can't initialize, bad type or class TEMP.C(36): error C202: 'd1': undefined identifier TEMP.C(36): error C132: 'P0': not in formal parameter list TEMP.C(37): error C141: syntax error near '250' TEMP.C(37): error C132: 'MSDelay': not in formal parameter list TEMP.C(38): error C244: 'P0': can't initialize, bad type or class TEMP.C(38): error C202: 'd2': undefined identifier TEMP.C(38): error C132: 'P0': not in formal parameter list TEMP.C(39): error C141: syntax error near '250' TEMP.C(39): error C132: 'MSDelay': not in formal parameter list TEMP.C(40): error C244: 'P0': can't initialize, bad type or class TEMP.C(40): error C202: 'd3': undefined identifier TEMP.C(40): error C132: 'P0': not in formal parameter list TEMP.C(41): error C141: syntax error near '250' TEMP.C(41): error C132: 'MSDelay': not in formal parameter list TEMP.C(46): error C132: '_MSDelay': not in formal parameter list TEMP.C(46): error C141: syntax error near '{' TEMP.C(48): error C136: 'i': 'void' on variable TEMP.C(48): error C132: 'i': not in formal parameter list TEMP.C(48): error C136: 'j': 'void' on variable TEMP.C(48): error C132: 'j': not in formal parameter list TEMP.C(49): error C141: syntax error near 'for' TEMP.C(49): error C141: syntax error near '=', expected ')' TEMP.C(49): error C129: missing ';' before '<=' Target not created