user19667: I am building a rather complicated model railroad crossing signal and have moved to using the Mega since I need more pins than the Uno. Upon reading the specs of the Mega on the Arduino.cc website I noticed a potential pin conflict, or not, maybe they serve a dual purpose?

External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2).
I2C: 20 (SDA) and 21 (SCL).

SDA and Interrupt 3 both function on pin 20? Likewise with Interrupt 2 and SCL?
I assume this is true, how/why do they share the same pin?

user4143: Lots of things share pins. It's normal. The "how" is that those pins are connected, internally, to multiple bits of the circuitry.
The "why" is simply because if you had a discrete pin for each possible function you would end up with a chip the size of your desk.
Pretty much every single pin on the chip has multiple functions on it.

19667: <p>I am building a rather complicated model railroad crossing signal and have moved to using the Mega since I need more pins than the Uno. Upon reading the specs of the Mega on the Arduino.cc website I noticed a potential pin conflict, or not, maybe they serve a dual purpose?</p>
<blockquote>
<p>External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2).</p>
<p>I2C: 20 (SDA) and 21 (SCL).</p>
</blockquote>
<p>SDA and Interrupt 3 both function on pin 20? Likewise with Interrupt 2 and SCL?</p>
<p>I assume this is true, how/why do they share the same pin?</p>
 4143: <p>Lots of things share pins. It's normal. The "how" is that those pins are connected, internally, to multiple bits of the circuitry.</p>

<p>The "why" is simply because if you had a discrete pin for each possible function you would end up with a chip the size of your desk.</p>

<p>Pretty much every single pin on the chip has multiple functions on it.</p>
