Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
Hi guys, im new to c in keil and i cant figure out the problem with this sooo simple program. When i write this on at89c52 it doesnt work but same program when programmed in assembly works perfectly.
Im using keil uvision3. Just trying to give output to 4 ports but after writing all ports give high output. Is this something with the header file im using? Should i use regx52.h?
here is the code #include <at89x52.h>
sbit MYBIT = P1^0; sbit MYBIT1 = P1^1; sbit MYBIT2 = P1^2; sbit MYBIT3 = P1^3;
void main (void) { MYBIT=1; MYBIT1=0; MYBIT2=1; MYBIT3=0;
}
Don't know about your assembler, but your C code falls off the end of main!