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

LED code?

im using 8051 and had a problem writing a code to interface the LED using serial port interface.Im using the I/O controller.the problem is when i ON the LED it light all the 7 leds.There is 7 output port.
i try to use a bitwise as to ON the LED of bit 0:
if((c&0x01)=='0'){ OPORT=0x00;}

else if(c=='1')
{ OPORT=0xff;
}

thanks

0