HOME - - - - - - - - - Other material for programmers - - - - - - - - - Arduino Help Top Page    -d- Bookmark this on Delicious   Recommend to StumbleUpon

Pins of the Arduino

This page is far from complete at this time, but I wanted to get one (or two) candles lit for you, at least.

This page is more "Wikipedia" in nature than the more "tutorial" nature of most of my pages.

This page will be most useful to readers who are already a bit of familiar with the Arduino, or a clone.




The basic digital pins....

A simple Arduino has digital I/O pins 0-13. Of these, several are "special"...

----------------

D0 and D1 are used in the serial interface between your Arduino and the PC you are using to program the Arduino. The same channel is used by the system's very useful serial monitor. (If you aren't using that yet, try to learn how!)

Unless you are very short of digital I/O for your needs, it is probably best to leave D0 and D1 out of your plans, so that what you are doing with them and what the system is doing with them don't clash.

----------------

D10-D13 are used to create the SPI bus. You may not know what that is now, but someday you will learn to love it. If you are using a "fancy" shield, for instance one to give your Arduino access to an SD memory card, you are probably using the SPI bus.

If you are using the SPI bus, it is probably best to avoid using D10- D13 for other things at the same time. There are situations of shared use which are okay... but if you don't already know that, you aren't ready to start doing it!

D13 is "special" in another way: In many cases, on the Arduino's PCB, there will be an LED connected to D13 and thence, through an appropriate resistor, to ground. Not only then, is D13 "compromised" by this "extra" hardware, but you should also be aware of the following little "gotcha": As the system boots up, D13 will be made an output. (All the other i/o lines come out of a reset as inputs.) And the system software, before it executes whatever you've put in setup();, will briefly take D13 high before returning it to low.

----------------

A0-A5, the analog pins: If you don't happen to need them as analog pins, you can use them as digital pins! Just refer to them as pins 14 to 19, or as "A0" to "A5". Thus, the following would work, although I would recommend that you use "14" throughout, and eschew the "A0" option....

   pinMode(A0,OUTPUT);
   digitalWrite(14,HIGH):

(That would make the "Analog0" pin a digital output, and set it high.)



Additional reading

At a very much more advanced level, I have another page on pin use for you. It focuses on pins used by ethernet interface and SD card carrier shields, but many general issues about pin usage arise.




For the future...

That's all I have for you in the time available just now. Any suggestions for other material like the above welcome.

To come....







Please also note that I have two other sites, and that the following search will not include them. They have their own search buttons.

My Sheepdog Guides site.
My Arunet site.

   Search this site or the web        powered by FreeFind
 
  Site search Web search
Site Map    What's New    Search
The search engine merely looks for the words you type, so....
*    Spell them properly.
*    Don't bother with "How do I get rich?" That will merely return pages with "how", "do", "I"....

You can also search this site without using forms.
Ad from page's editor: Yes.. I do enjoy compiling these things for you... hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!
Click here to visit editor's freeware, shareware page.


Want a site hosted, or email? You can also help me if you sign up via this link to 1&1's services. (I wouldn't recommend them unless I was happy after several years as one of their customers, but yes, they do pay me if you use this link! As do the Google advertisers, about whom I know nothing, of course.)



Valid HTML 4.01 Transitional Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org

CSS behind the page checked, at least once upon a time!, with http://jigsaw.w3.org/css-validator/
Why does this page cause a script to run? Because of the Google panels, and the code for the search button. Also, I have some of my pages' traffic monitored for me by eXTReMe tracker. They offer a free tracker. If you want to try one, check out their site. Why do I mention the script? Be sure you know all you need to about spyware.


Editor's Main Homepage
How to email or write this page's editor, Tom Boyd

....... P a g e . . . E n d s .....