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

No subject

#include<reg51.h>
sbit ALE =P2^4;
sbit OE = P2^5;
sbit SC = P2^6;
sbit EOC = P2^7;
sbit ADDR_A = P2^0;
sbit ADDR_B = P2^1;
sbit ADDR_C = P2^2;
sfr MYDATA = P1;
void main (void)
{ unsigned char value;
MYDATA = 0xFF;
EOC =1;
ALE =0;
OE = 0;
SC =0;
while (1)
{ ADDR_C = 0; ADDR_B =0; ADDR_A =1; MSDELAY (1); ALE =1; MSDELAY (1); SC =0; WHILE (EOC ==1); WHILE (EOC ==0); OE =1; MSDELAY(1) VALUE =MYDATA; OE =0; CONVERTANDDISPLAY(VALUE); }}

This is the code for adc program i used but i am getting undefined identifier at "MYDATA" AND at "p1" expected constant. please give the suggestion for this.

0