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

Controling GPIO.

How To Assign a Variable To Single Pin In GPIO

In IAR I Can Write Code Like Following:

#define rs IO1PIN_bit.P1_24
#define rw IO1PIN_bit.P1_25
#define en IO1PIN_bit.P1_26

But I Want To know How to write above code in KEIL.

Someone Please Help Me With this.

Parents
  • And you don't feel that the actually used processor may matter?

    An 8051 processor has bit-addressable I/O signals.
    ARM chips might have - if they support bit banding. Else they do not.
    What time have you spent looking through the relevant header file(s) for your specific processor?

    Keil's 8051 compiler has special constructs to handle bit variables. ARM processors on the other hand doesn't have bit variables - but maybe aliased words, in case the processor in question has bit banding.

Reply
  • And you don't feel that the actually used processor may matter?

    An 8051 processor has bit-addressable I/O signals.
    ARM chips might have - if they support bit banding. Else they do not.
    What time have you spent looking through the relevant header file(s) for your specific processor?

    Keil's 8051 compiler has special constructs to handle bit variables. ARM processors on the other hand doesn't have bit variables - but maybe aliased words, in case the processor in question has bit banding.

Children