1. tush

    Thread Starter New Member

    Aug 31, 2008
    1
    0
    i have problem with port P0 in 89c51.

    P0=0x01;
    P0=P0<<1;

    when i do this operation P0.1 become low.

    what can i do
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Have you configured port 0.1 as an output?

    hgmjr
     
  3. amolhshah

    Member

    Aug 12, 2008
    13
    1
    have you used Pull up resistors for P0?
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,152
    1,793
    When you do an operation like this you ar reading the value of the PIN, not the contents of the output data latch. You gotta understand how an I/O port works before you can actually use it.

    The other poster is correct. On all the 8051's that you will ever see, besides all the ones that you won't, Port 0 has OPEN COLLECTOR OUTPUTS, which need an external pullup resistor in order to output a '1'.
     
Loading...