Go Down

Topic: Trouble understanding physical pin numbers vs pin names (Read 147 times) previous topic - next topic

Jun 10, 2014, 02:03 am Last Edit: Jun 10, 2014, 02:22 am by makethings Reason: 1
Hello,

I'm very new and I can't find a good explanation for understanding the relationship between physical pin numbers and actual pin names.

For example, I'm looking at a Leonardo schematic, physical pin 32 shows its pin modes as "(ICP3/CLK0/OC4A)PC7" with a given pin name of "IO13*". I can't for the life of me figure out why calling that pin "IO13*" makes any sense and where that correlation is made. It confuses me to see something like pinMode(13,OUTPUT); that's referring to IO13* not the actual 13th pin.

Furthermore, lets say I want to use physical pin 9, named "SCLK" in the Leonardo schematic, as a digital output. I'm not sure how to relate pin 9 to being a digital IO so I can pass it into the function pinMode();

Thank you for any help!

Here's a link to the Leonardo schematic for reference.
http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf

CrossRoads

Look at pins_arduino.h for the mapping from port to software name.
There are 3 arrays that really define stuff - the first list the order of the ports, the 2nd lists the bits within that port.
Then there is the datasheet that maps the port/bit to a physical pin.

There are also several good guides/pictures that show the mapping, as well as the chart linked to on the Products/Leonardo page
http://arduino.cc/en/Hacking/PinMapping32u4
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Thank you! This is exactly what I was looking for.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy