I'm writing this as a "Blog Post", because I did not see a way to make it a document: Which I would have preferred.
I ran into a problem on the Intel Edison board, that stuck me for a while on coding, until I finally found the issue was with the Arduino Atmega328 chip on the Intel's Arduino breakout board. My personal problem was that I was unable to run I2C while using some of the Analog pins. While the detailed hardware information can be found linked below, I wanted to create an "easier" guide to know what pins you CAN NOT use, if you plan to use others, so you don't keep re-writing your code, and can plan your wiring in advance, to also be able to purchase any expansions you need in advance as well to compensate for the pins you'll be locked out of by using another pin.
From this point forward, I'll refer to these pins you cannot use as "Zombie Pins", because they're physically present, but pretty much dead for use, with their life being somewhere else.
I'm going to make a list of pins in a grid. To the left is the Atmega pin number, to the right is all pins/functions on that pin. You can only use one of those pins listed on the right at a time, or you'll have some odd/unwanted behavior.
Notes:
-This is NOT an all-encompassing guide to all functions, just conflicts for the most common used ones.
- I am going by the actual CHIP pin number listing.
- A = Analog Input, D = Digital I/O
- Some conflicts are labeled on the board (such as D pins having a function), but I'm including them anyhow, to allow people to plan their wiring in advance, and be able to know what they need to program before they even buy their board!
Atmega Pin | Pin Functions |
---|---|
1* | Reset |
2** | D1 / RXD |
3** | D2 / TXD |
4 | D3 |
5 | D4 / PWM |
6 | D5 |
7/20* | VCC |
8/22 | Ground |
9/10 | Unknown |
11 | D5 / PWM |
12 | D6 / PWM |
13 | D7 |
14 | D8 / CLK0 |
15 | D9 / PWM |
16 | D10 / PWM |
17*,*** | D11 / PWM / MOSI |
18*,*** | D12 / MISO |
19* | D13 / SCK |
21 | AREF |
23 | A0 |
24 | A1 |
25 | A2 |
26 | A3 |
27 | A4 / SDA |
28 | A5 / SCL |
* = Also known to be used for some of the smaller holes you can solder into the board, near AREF and the "ON" LED (forget what they're called).
** = Also used for Atmega for USB programming. If you have trouble writing, try disconnecting device from these ports.
*** = There is a secondary of this function of this type in the ICSP circuit, near the Reset button
For these markers, please refer to the Reference link below for the breakout board for more information.
-I believe one of the Digital pins also controls the "L" LED, near 13.
Anyhow, I hope this helps others with the Arduino, including the Intel Edison when using the Arduino Breakout board!
Reference:
Intel Edison Breakout Board: http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edison-arduino-hardware-guide.pdf