AnsweredAssumed Answered

Configuring Register as Analog Input on LPC4088

Question asked by Blake Diamond on Mar 2, 2019
Latest reply on Mar 3, 2019 by xiangjun.rong

I am using the LPC4088 development board and my primary goal is to configure a certain GPIO pin as an analog input. In theory, I understand what bits need to be changed in order to achieve this, but I am finding it difficult to actually program this in the LPCXpresso environment.

 

Specifically I want to configure  IOCON_P0_24 (0x4002 C060) to act as an analog input. My plan to do this was to define the register and then use the |= operator to change the value, for example:

 

...

 #define IOCON_P0_24 0x4002C060

...

IOCON_P0_24  |=  (0x1 << 0);

...

 

I am getting an error that is saying "lvalue required as left operant of assignment". This leads me to believe that I need to define IOCON_P0_24 differently or include it from somewhere else.

 

Could anyone suggest what the best way to adjust the register value? Any help is very much appreciated!

Outcomes