Page 1 of 1

NUCLEO-F103RB pinout and pin declaration

Posted: Fri Mar 25, 2022 9:14 am
by nektariosb
Hello.

I am new here, and I am looking for some help about the pinout of the NUCLEO-F103RB.

I am writting code in Arduino IDE and I want to use some digital inputs and outputs.
But I dont know wich and also I dont know the names.
My project has an AD7606 adc in parallel mode (16bits),
so I need 16 inputs and some more for control signals
(a total of 19 inputs and 7 outputs).

While I was looking around I found these https://www.instructables.com/Quick-Sta ... duino-IDE/
where the guy remapped the pins (gave new easier names) and made a very simple header file
Image
Image

in the code he writes int a = pinMap(14);
and the library translates to:
int pinMap(int pin)
{
switch (pin)
{
case 1: return 2;
break;
case 2: return 3;
break;
case 3: return 4;
break;
etc. etc.

It look convenient but he made it for Nucleo-F401RE.

Do you think it is the same for NUCLEO-F103RB (it looks like the same)?

Thank you

Re: NUCLEO-F103RB pinout and pin declaration

Posted: Fri Mar 25, 2022 3:21 pm
by GonzoG
Why bother with such complications ??
Use Arduino style pin numbering (0-21: 0-15 for D0-D15, 16-21 for A0-A5) or general pin symbols (eg. PA1).
Pinouts for all Nucleo-64 boards are available on ST's page: https://www.st.com/resource/en/user_man ... ronics.pdf

Re: NUCLEO-F103RB pinout and pin declaration

Posted: Sat Mar 26, 2022 2:51 pm
by nektariosb
@GonzoG that was truth, the general pin symbols (eg. PA1) was the easiest way.
Thank you! 8-)