~ubuntu-branches/ubuntu/precise/arduino/precise

« back to all changes in this revision

Viewing changes to reference/Board.html

  • Committer: Bazaar Package Importer
  • Author(s): Scott Howard
  • Date: 2010-04-13 22:32:24 UTC
  • Revision ID: james.westby@ubuntu.com-20100413223224-jduxnd0xxnkkda02
Tags: upstream-0018+dfsg
ImportĀ upstreamĀ versionĀ 0018+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
2
<html>
 
3
<head>
 
4
  <title>Arduino - Board </title>
 
5
  <link rel='stylesheet' href='arduino.css' type='text/css' />
 
6
</head>
 
7
<body>
 
8
<div id="page">
 
9
<!--PageHeaderFmt-->
 
10
<div id="pageheader">
 
11
  <div class="title"><a href="http://www.arduino.cc"/>Arduino</a></div>
 
12
  <div class="search">
 
13
    <!-- SiteSearch Google -->
0
14
   <FORM method=GET action="http://www.google.com/search">
1
15
   <input type=hidden name=ie value=UTF-8>
2
16
   <input type=hidden name=oe value=UTF-8>
3
17
   <INPUT TYPE=text name=q size=25 maxlength=255 value="">
4
18
   <INPUT type=submit name=btnG VALUE="search">
5
19
   <input type=hidden name=domains value="http://www.arduino.cc/">
 
20
    <input type=hidden name=sitesearch value="http://www.arduino.cc/">
 
21
    </FORM>
6
22
   <!-- SiteSearch Google -->
 
23
  </div>
 
24
</div>
 
25
<!--/PageHeaderFmt-->
 
26
<!--PageLeftFmt-->
 
27
<div id="pagenav" style="text-align: right">
 
28
  <div style="float: left;">
 
29
  <p><a class='wikilink' href='http://www.arduino.cc/en/Main/Buy'>Buy</a>
 
30
|
 
31
<a class='wikilink' href='http://www.arduino.cc/en/Main/Software'>Download</a>
 
32
|
 
33
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
 
34
|
 
35
<a class='wikilink' href='http://www.arduino.cc/en/Tutorial/HomePage'>Learning</a>
 
36
|
 
37
<a class='wikilink' href='index.html'>Reference</a>
 
38
|
 
39
<a class='wikilink' href='http://www.arduino.cc/en/Main/Hardware'>Hardware</a>
 
40
|
 
41
<a class='wikilink' href='FAQ.html'>FAQ</a>
 
42
</p>
 
43
<p class='vspace'></p>
 
44
 
 
45
  </div>
 
46
  <a class="urllink" href="http://www.arduino.cc/blog/" rel="nofollow">Blog &raquo;</a> |
 
47
  <a class="urllink" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl" rel="nofollow">Forum &raquo;</a> |
 
48
  <a class="urllink" href="http://www.arduino.cc/playground/" rel="nofollow">Playground &raquo;</a>
 
49
</div>
 
50
<!--/PageLeftFmt-->
 
51
<div id="pagetext">
 
52
<!--PageText-->
 
53
<div id='wikitext'>
 
54
<p><strong>Reference</strong> &nbsp;  <a class='wikilink' href='index.html'>Language</a> (<a class='wikilink' href='Extended.html'>extended</a>) | <a class='wikilink' href='Libraries.html'>Libraries</a> | <a class='wikilink' href='Comparison.html'>Comparison</a> | <a class='selflink' href='Board.html'>Board</a>
 
55
</p>
 
56
<p class='vspace'></p><h2>Introduction to the Arduino Board</h2>
 
57
<p>Looking at the board from the top down, this is an outline of what you will see (parts of the board you might interact with in the course of normal use are highlighted):
 
58
</p>
 
59
<p class='vspace'></p><div><img src='http://www.arduino.cc/en/uploads/Reference/arduino_board.png' alt='' title='' /></div>
 
60
<p class='vspace'></p><p>Starting clockwise from the top center:
 
61
</p>
 
62
<p class='vspace'></p><ul><li>Analog Reference pin (orange)
 
63
</li><li>Digital Ground (light green)
 
64
</li><li>Digital Pins 2-13 (green)
 
65
</li><li>Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - <em>These pins cannot be used for digital i/o (<strong>digitalRead</strong> and <strong>digitalWrite</strong>) if you are also using serial communication (e.g. <strong>Serial.begin</strong>)</em>.
 
66
</li><li>Reset Button - S1 (dark blue)
 
67
</li><li>In-circuit Serial Programmer (blue-green)
 
68
</li><li>Analog In Pins 0-5 (light blue)
 
69
</li><li>Power and Ground Pins (power: orange, grounds: light orange)
 
70
</li><li>External Power Supply In (9-12VDC) - X1 (pink)
 
71
</li><li>Toggles External Power and USB Power (place jumper on two pins closest to desired supply) - <span class='wikiword'>SV1</span> (purple)
 
72
</li><li>USB (used for uploading sketches to the board and for serial communication between the board and the computer; can be used to power the board) (yellow)
 
73
</li></ul><p class='vspace'></p><h3>Microcontrollers</h3>
 
74
<table  width='100%' border='0' cellpadding='5' cellspacing='0'><tr><td  width='50%' valign='top'>
 
75
<p class='vspace'></p><p><em><span class='wikiword'>ATmega168</span></em> (used on most Arduino boards)
 
76
</p>
 
77
<p class='vspace'></p>
 
78
<table border='0'><tr ><td  align='left'>Digital I/O Pins</td><td  align='left'>14  (of which 6 provide PWM output)</td></tr>
 
79
<tr ><td  align='left'>Analog Input Pins</td><td  align='left'>6 (DIP) or 8 (SMD)</td></tr>
 
80
<tr ><td  align='left'>DC Current per I/O Pin</td><td  align='left'>40 mA</td></tr>
 
81
<tr ><td  align='left'>Flash Memory</td><td  align='left'>16 KB</td></tr>
 
82
<tr ><td  align='left'>SRAM</td><td  align='left'>1 KB</td></tr>
 
83
<tr ><td  align='left'>EEPROM</td><td  align='left'>512 bytes</td></tr>
 
84
</table>
 
85
<p class='vspace'></p><p>(<a class='urllink' href='http://www.atmel.com/dyn/resources/prod_documents/doc2545.pdf' rel='nofollow'>datasheet</a>)
 
86
</p>
 
87
<p class='vspace'></p></td><td  width='50%' valign='top'>
 
88
<p class='vspace'></p><p><em><span class='wikiword'>ATmega8</span></em> (used on some older board)
 
89
</p>
 
90
<p class='vspace'></p>
 
91
<table border='0'><tr ><td  align='left'>Digital I/O Pins</td><td  align='left'>14  (of which 3 provide PWM output)</td></tr>
 
92
<tr ><td  align='left'>Analog Input Pins</td><td  align='left'>6</td></tr>
 
93
<tr ><td  align='left'>DC Current per I/O Pin</td><td  align='left'>40 mA</td></tr>
 
94
<tr ><td  align='left'>Flash Memory</td><td  align='left'>8 KB</td></tr>
 
95
<tr ><td  align='left'>SRAM</td><td  align='left'>1 KB</td></tr>
 
96
<tr ><td  align='left'>EEPROM</td><td  align='left'>512 bytes</td></tr>
 
97
</table>
 
98
<p class='vspace'></p><p>(<a class='urllink' href='http://www.atmel.com/dyn/resources/prod_documents/doc2486.pdf' rel='nofollow'>datasheet</a>)
 
99
</p>
 
100
<p class='vspace'></p></td></tr></table>
 
101
<p class='vspace'></p><h3>Digital Pins</h3>
 
102
<p>In addition to the specific functions listed below, the digital pins on an Arduino board can be used for general purpose input and output via the <a class='wikilink' href='PinMode.html'>pinMode()</a>, <a class='wikilink' href='DigitalRead.html'>digitalRead()</a>, and <a class='wikilink' href='DigitalWrite.html'>digitalWrite()</a> commands.  Each pin has an internal pull-up resistor which can be turned on and off using digitalWrite() (w/ a value of HIGH or LOW, respectively) when the pin is configured as an input.  The maximum current per pin is 40 mA.  
 
103
</p>
 
104
<p class='vspace'></p><ul><li><strong>Serial: 0 (RX) and 1 (TX).</strong>  Used to receive (RX) and transmit (TX) TTL serial data.  On the Arduino Diecimila, these pins are connected to the corresponding pins of the FTDI USB-to-TTL Serial chip.  On the Arduino BT, they are connected to the corresponding pins of the <span class='wikiword'>WT11</span> Bluetooth module.  On the Arduino Mini and <span class='wikiword'>LilyPad</span> Arduino, they are intended for use with an external TTL serial module (e.g. the Mini-USB Adapter).
 
105
<p class='vspace'></p></li><li><strong>External Interrupts: 2 and 3.</strong> These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value.  See the <a class='wikilink' href='AttachInterrupt.html'>attachInterrupt()</a> function for details.
 
106
<p class='vspace'></p></li><li><strong>PWM: 3, 5, 6, 9, 10, and 11.</strong>  Provide 8-bit PWM output with the <a class='wikilink' href='AnalogWrite.html'>analogWrite()</a> function.  On boards with an <span class='wikiword'>ATmega8</span>, PWM output is available only on pins 9, 10, and 11.
 
107
<p class='vspace'></p></li><li><strong>BT Reset: 7.</strong> (Arduino BT-only) Connected to the reset line of the bluetooth module.
 
108
<p class='vspace'></p></li><li><strong>SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK).</strong>  These pins support SPI communication, which, although provided by the underlying hardware, is not currently included in the Arduino language.
 
109
<p class='vspace'></p></li><li><strong>LED: 13.</strong> On the Diecimila and <span class='wikiword'>LilyPad</span>, there is a built-in LED connected to digital pin 13.  When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.
 
110
</li></ul><p class='vspace'></p><h3>Analog Pins</h3>
 
111
<p>In addition to the specific functions listed below, the analog input pins support 10-bit analog-to-digital conversion (ADC) using the <a class='wikilink' href='AnalogRead.html'>analogRead()</a> function.  Most of the analog inputs can also be used as digital pins: analog input 0 as digital pin 14 through analog input 5 as digital pin 19.  Analog inputs 6 and 7 (present on the Mini and BT) cannot be used as digital pins.
 
112
</p>
 
113
<p class='vspace'></p><ul><li><strong>I<sup>2</sup>C: 4 (SDA) and 5 (SCL).</strong>  Support I<sup>2</sup>C (TWI) communication using the <a class='urllink' href='http://wiring.org.co/reference/libraries/Wire/index.html' rel='nofollow'>Wire library</a> (documentation on the Wiring website).
 
114
</li></ul><p class='vspace'></p><h3>Power Pins</h3>
 
115
<ul><li><strong>VIN</strong>  (sometimes labelled "9V").  The input voltage to the Arduino board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source).  You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.  Note that different boards accept different input voltages ranges, please see the <a class='urllink' href='http://www.arduino.cc/en/Main/Hardware' rel='nofollow'>documentation for your board</a>.  Also note that the <span class='wikiword'>LilyPad</span> has no VIN pin and accepts only a regulated input.
 
116
<p class='vspace'></p></li><li><strong>5V.</strong> The regulated power supply used to power the microcontroller and other components on the board.  This can come either from VIN via an on-board regulator, or be supplied by USB or another regulated 5V supply.
 
117
<p class='vspace'></p></li><li><strong>3V3.</strong>  (Diecimila-only) A 3.3 volt supply generated by the on-board FTDI chip.
 
118
<p class='vspace'></p></li><li><strong>GND.</strong> Ground pins.  
 
119
</li></ul><p class='vspace'></p><h3>Other Pins</h3>
 
120
<ul><li><strong>AREF.</strong> Reference voltage for the analog inputs.  Used with <a class='wikilink' href='AnalogReference.html'>analogReference</a>().
 
121
<p class='vspace'></p></li><li><strong>Reset.</strong> (Diecimila-only) Bring this line LOW to reset the microcontroller.  Typically used to add a reset button to shields which block the one on the board.
 
122
</li></ul><p class='vspace'></p><p><a class='wikilink' href='index.html'>Reference Home</a>
 
123
</p>
 
124
<p class='vspace'></p><p><em>Corrections, suggestions, and new documentation should be posted to the <a class='urllink' href='http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?board=swbugs' rel='nofollow'>Forum</a>.</em>
 
125
</p>
 
126
<p class='vspace'></p><p>The text of the Arduino reference is licensed under a
 
127
<a class='urllink' href='http://creativecommons.org/licenses/by-sa/3.0/' rel='nofollow'>Creative Commons Attribution-ShareAlike 3.0 License</a>.  Code samples in the reference are released into the public domain.
 
128
</p>
 
129
</div>
 
130
 
 
131
</div>
 
132
<!--PageFooterFmt-->
 
133
<div id="pagefooter">
 
134
  <a href='#'>Edit Page</a> | <a href='#'>Page History</a> | <a href='#' target='_blank'>Printable View</a> | <a href='http://www.arduino.cc/en/Site/AllRecentChanges'>All Recent Site Changes</a>
 
135
</div>
 
136
<!--/PageFooterFmt-->
 
137
</div>
 
138
</body>
 
139
</html>