1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

how to access the bits in MCU 8051 IDE. P0.0=0x55;

Discussion in '8051/8951' started by gsatish10, Apr 30, 2013.

  1. gsatish10

    gsatish10 New Member

    Joined:
    Apr 30, 2013
    Messages:
    1
    Likes:
    1
    Location:
    India
    I am trying to write bit access prg in 8051 MCU IDE
    I am getting the syntax error with the following options
    P0.0=0x55;
    P0^0=0x55;

    above options I am getting syntax error with ".0" "^"

    Can you please guys help me out what is option to get the righ toption in MCU 8051 IDE.


    Thanks to all
     
    • Like Like x 1
  2. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,310
    Likes:
    914
    Location:
    Rochdale UK
    You can write byte wise

    Code (text):
    P0 = 0x55
    Or you can write bitwise

    Code (text):
    P0.0 = 0
    P0.0 = 1

    But you cant write 0x55 to a single bit...
     
    • Like Like x 1

Share This Page