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

PROBLEM WITH THE C CODE

#include<reg51.h>

sfr port= 0x80;
void main()
{ port=~port;
}

This code was successfully compiled...but yu expect the port pins are complemented only once..But what i experiened when used with a simulator software, was the port pins get complemented for infinite times( somthing like the 'port=~port;' instruction was put in a while(1) loop..)

What could be the wrong?

0