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

doubts

hello everyone,
I am writing a code in which, a variable is used in interrupt routine as well as in while(1) loop
I am changing that variable value in interrupt and in while(1) loop
I am confused, while handling it
how can I avoid clashes occurred in interrupt as well as in while(1) loop

another doubt is, if in c language, I want to change the value in a certain location say 0x1234H then how is it possible?

thank you all
take care

Parents
  • Have you spent any time with the example programs supplied with the compiler?

    If not, do so now.

    Have you spent any time with the manual for the compiler?

    If not, do so now.

    bool is a C++ data type. C != C++. C and C++ does not have a one-bit data type, other than as a bit-field in a struct.

    The Keil examples and the C51 manual will clearly inform you about the Keil-specific extention for using bit variables on the C51 architecture.

    Don't ask generic questions about absolute addressing of variables. Post a specific question, with a specific reason for requiring an absolute address.

    The include file for your processor should take care of how to address special function registers in your processor. Your own program should normally not need any variables with absolute address, unless you are implementing a boot loader or similar, or you have added external hardware (other than memory) that you need to access.

    The majority of people who ask about absolute addressing have made a bad design decision, and are doing their best to quickly complicate their lives.

Reply
  • Have you spent any time with the example programs supplied with the compiler?

    If not, do so now.

    Have you spent any time with the manual for the compiler?

    If not, do so now.

    bool is a C++ data type. C != C++. C and C++ does not have a one-bit data type, other than as a bit-field in a struct.

    The Keil examples and the C51 manual will clearly inform you about the Keil-specific extention for using bit variables on the C51 architecture.

    Don't ask generic questions about absolute addressing of variables. Post a specific question, with a specific reason for requiring an absolute address.

    The include file for your processor should take care of how to address special function registers in your processor. Your own program should normally not need any variables with absolute address, unless you are implementing a boot loader or similar, or you have added external hardware (other than memory) that you need to access.

    The majority of people who ask about absolute addressing have made a bad design decision, and are doing their best to quickly complicate their lives.

Children
No data