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

accessing bit addressable memory

hi friend's i am new user to the keil c51 i want your help. my question is how to assess the bit addressable memory i have tried with follwing thing but it does not work
bdata unsigned char ibase;
sbit ON_DEG1 = 0x20^0;
asper the user manual but it gives error as the

error C142: 'SFR': invalid base address

plz help me

Parents
  • thank you Mr.Erik Malund I tried in your way and it work's.but i have a question. When the line

    bdata unsigned char ON_REG;
    

    is wrote in the define.h file it not working can you explain me why it happens the file define.h is included properly. itworking nice for the other code

Reply
  • thank you Mr.Erik Malund I tried in your way and it work's.but i have a question. When the line

    bdata unsigned char ON_REG;
    

    is wrote in the define.h file it not working can you explain me why it happens the file define.h is included properly. itworking nice for the other code

Children
  • "... in the define.h file it not working"

    In what way, exactly, is it "not working"?!

    How do you expect anybody to help to fix your problem if you don't actually say what the problem is?!

    If you phoned a mechanic, and just told him that your car was "not working", do you think he would be able to do anything based on that??

    Anyhow, as we're talking header files, what normally happens if you put a variable definition in a header file and then include that in multiple places...?

  • thankking you for the advice
    form this post i will take care of all these thing
    putting a variable definition in a header file and then include that in multiple places...?
    but this file is only included in this project only
    so what is the problem.

  • "but this file is only included in this project only"

    How many source files in the Project?

    "so what is the problem."

    I have no idea - you need to clearly describe what problem you are seeing!