Seattle, WA USA
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #4 on: March 11, 2011, 08:52:47 pm » |
Other pins have specific purposes. Pins 3, 5, 6, 9, 10, and 11 are PWM pins. There are several timers associated with those pins. Depending on what those timers are also doing, like driving servos, some of the pins may not be available for PWM purposes.
Pin 13 has a LED and resistor associated with that. Sometimes that resistor gets in the way of using that pin as an input pin. Pins 0 and 1 also have resistors associated with them that can cause problems using them for input when they are not being used for serial.
Pins 2 and 3 are the external interrupt pins. If you have hardware generating interrupts that the Arduino needs to process, one (or both) of those pins needs to be used,
Pins 10 through 13 are the SPI pins. They are used for communication with certain external hardware, such as the ethernet shield and SD card.
Analog pins 4 and 5 are the I2C pins. Again, used for communication with some external hardware, such as RTCs.
So, you can see that there are a lot of pins that serve more than one purpose. Choosing which pins to use for what purposes is not necessarily an easy task, if the Arduino needs to communicate with specific devices.
|