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

to set a pin value

i am working with lpc2129 to control dc motor

i have a problem to set a port pin value to 1 and then to 0

PINSEL0_bit.P0_7 = 0x00;

i use the above code but it post an error saying that PINSEL0_bit is not defined

please help me to program using mdk arm

Parents
  • but pinsel0 is not the same as PINSEL0_bit - is it?!

    Even disregarding the uppercase/lowercase difference, they are not the same - are they?

    If the compiler tells you that something is "not defined" then that is the case!

    To be more specific, the compiler could be verbose and say, "no valid definition exists at this point".

    So, if you think you have a definition, you must check that it is both valid and that it is visible at the point where you're trying to use it.

    Note that this is standard 'C' stuff - nothing specifically to do with Keil, or ARM, or embedded...

Reply
  • but pinsel0 is not the same as PINSEL0_bit - is it?!

    Even disregarding the uppercase/lowercase difference, they are not the same - are they?

    If the compiler tells you that something is "not defined" then that is the case!

    To be more specific, the compiler could be verbose and say, "no valid definition exists at this point".

    So, if you think you have a definition, you must check that it is both valid and that it is visible at the point where you're trying to use it.

    Note that this is standard 'C' stuff - nothing specifically to do with Keil, or ARM, or embedded...

Children