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, 5 months ago.
Nucleo-F401RE Analog Input Pins (max 16 channels ?)
Hello !
I wrote code for Nucleo-F401RE below -
AnalogIn A_3(PA_7); AnalogIn F_2(PC_5);
AnalogIn I_3(PA_4);
AnalogIn I_2(PB_0);
AnalogIn J_3(PC_1);
AnalogIn J_2(PC_0);
AnalogIn A_2(PB_6);
AnalogIn B_3(PA_8);
AnalogIn B_2(PB_10);
AnalogIn C_3(PB_3);
AnalogIn C_2(PA_10);
AnalogIn D_3(PC_14);
AnalogIn D_2(PC_15);
AnalogIn E_3(PC_11);
AnalogIn E_2(PD_2);
AnalogIn F_3(PC_6);
AnalogIn G_3(PB_12);
AnalogIn G_2(PB_2);
AnalogIn H_3(PB_14);
AnalogIn H_2(PB_13);
And now, the upper 6 channels works well, but if I add any one of lower 14 channels, the system does not work. (Compiler says "OK" with over 16 channels A/D !)
And I found the document "A/D - up to 16 channels". https://developer.mbed.org/platforms/ST-Nucleo-F401RE/ http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1577/LN1810/PF258797
So I want to know : which pin can be used as A/D input. (maximum 16 channels !)
1 Answer
9 years, 5 months ago.
You should use the pins that are marked 'analog in' on the mbed f401 nucleo page (orange box in pinmap drawing). Your code uses several pins that are not identified as analog inputs on that page (eg pb_13, pb_14).
Oh, I understand the "orange box in pinmap drawing". We must merge the Arduino map and Morpho map, so we can usethese pins !
Arduino-compatible headers PA_0, PA_1, PA_4, PB_0, PC_1. PC_0 PA_5, PA_6, PA_7, PA_2, PA_3
Morpho headers PC_2, PC_3, PC_5, PB_1, PC_4
Thank you very much !!
posted by 28 Jun 2015