Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 9 months ago.
Analog inputs with LPC11U68
Board: LPC11U68 Rev C
Hi all. I'm just getting started with my NXP LPC11U68 Rev C and mbed. I started by trying some of the analog inputs. But while I was testing I found I got the lights of death whenever I added the line:
AnalogIn ain(A4);
So what gives? I'm thinking this might be a mistake in mbed's library since it has A4 = P0_5, but there's no corresponding ADC function in the data sheet. Maybe it's supposed to be A4 = P0_11. But while making that substitution (AnalogIn ain(P0_11)) fixes the lights of death, it still doesn't read anything. Maybe despite fixing the pin number, the correct function still isn't selected... Does anyone have any ideas or workarounds? I'm still super new to this.
1 Answer
9 years, 9 months ago.
There are difference between Rev.B and Rev.C about the LPCXpresso11U68 pin out. Please refer following table. For Rev.C, you can use P0_23 for A4 pin.
| Arduino shield pin name | Rev.B | Rev.C |
|---|---|---|
| D0 (for Rev.B) | P0_18 | P2_11 |
| D1 (for Rev.B) | P0_19 | P2_12 |
| A4 (for Rev.B) | P0_5 | P0_23 |
| A5 (for Rev.B) | P0_4 | P0_11 |
Assigned to 9 years, 9 months ago.
This means that the question has been accepted and is being worked on.