Arduino uno User manual

ARDUINOUNOREV3
Code:A000066
TheUNOisthebestboardtogetstartedwithelectronicsand
coding.Ifthisisyourfirstexperiencetinkeringwiththeplatform,
theUNOisthemostrobustboardyoucanstartplayingwith.The
UNOisthemostusedanddocumentedboardofthewholeArduino
family.

ArduinoUnoisamicrocontrollerboardbasedontheATmega328P(datasheet).It
has14digitalinput/outputpins(ofwhich6canbeusedasPWMoutputs),6analog
inputs,a16MHzquartzcrystal,aUSBconnection,apowerjack,anICSPheader
andaresetbutton.Itcontainseverythingneededtosupportthemicrocontroller;
simplyconnectittoacomputerwithaUSBcableorpoweritwithaAC‐to‐DC
adapterorbatterytogetstarted..YoucantinkerwithyourUNOwithoutworring
toomuchaboutdoingsomethingwrong,worstcasescenarioyoucanreplacethe
chipforafewdollarsandstartoveragain.
"Uno"meansoneinItalianandwaschosentomarkthereleaseofArduino
Software(IDE)1.0.TheUnoboardandversion1.0ofArduinoSoftware(IDE)were
thereferenceversionsofArduino,nowevolvedtonewerreleases.TheUnoboard
isthefirstinaseriesofUSBArduinoboards,andthereferencemodelforthe
Arduinoplatform;foranextensivelistofcurrent,pastoroutdatedboardsseethe
Arduinoindexofboards.
Youcanfindhereyourboardwarrantyinformations.
https://www.arduino.cc/en/Main/warranty
GettingStarted
YoucanfindintheGettingStartedsectionalltheinformationyouneedto
configureyourboard,usetheArduinoSoftware(IDE),andstarttinkerwithcoding
andelectronics.
https://www.arduino.cc/en/Guide/HomePage
TECHSPECS
MicrocontrollerATmega328P
OperatingVoltage5V
InputVoltage(recommended)7‐12V
InputVoltage(limit)6‐20V
DigitalI/OPins14(ofwhich6providePWMoutput)
PWMDigitalI/OPins6
AnalogInputPins6
DCCurrentperI/OPin20mA
DCCurrentfor3.3VPin50mA

FlashMemory32KB(ATmega328P)ofwhich0.5KBusedbybootloader
SRAM2KB(ATmega328P)
EEPROM1KB(ATmega328P)
ClockSpeed16MHz
LED_BUILTIN13
Length68.6mm
Width53.4mm
Weight25g
OSH:Schematics
ArduinoUnoisopen‐sourcehardware!Youcanbuildyourownboardusingthe
followingfiles:
EAGLEFILESIN.ZIP
https://www.arduino.cc/en/uploads/Main/arduino_Uno_Rev3‐02‐TH.zip
SCHEMATICSIN.PDF
https://www.arduino.cc/en/uploads/Main/Arduino_Uno_Rev3‐schematic.pdf
BOARDSIZEIN.DXF
http://arduino.cc/documents/ArduinoUno.dxf
Programming
TheArduinoUnocanbeprogrammedwiththe(ArduinoSoftware(IDE)).Select
"Arduino/GenuinoUnofromtheTools>Boardmenu(accordingtothe
microcontrolleronyourboard).Fordetails,seethereferenceandtutorials.
TheATmega328ontheArduinoUnocomespreprogrammedwithabootloaderthat
allowsyoutouploadnewcodetoitwithouttheuseofanexternalhardware
programmer.ItcommunicatesusingtheoriginalSTK500protocol(reference,C
headerfiles).
Youcanalsobypassthebootloaderandprogramthemicrocontrollerthroughthe
ICSP(In‐CircuitSerialProgramming)headerusingArduinoISPorsimilar;seethese
instructionsfordetails.

TheATmega16U2(or8U2intherev1andrev2boards)firmwaresourcecodeis
availableintheArduinorepository.TheATmega16U2/8U2isloadedwithaDFU
bootloader,whichcanbeactivatedby:
OnRev1boards:connectingthesolderjumperonthebackoftheboard(nearthemapof
Italy)andthenreseingthe8U2.
OnRev2orlaterboards:thereisaresistorthatpullingthe8U2/16U2HWBlineto
ground,makingiteasiertoputintoDFUmode.
YoucanthenuseAtmel'sFLIPsoftware(Windows)ortheDFUprogrammer(Mac
OSXandLinux)toloadanewfirmware.OryoucanusetheISPheaderwithan
externalprogrammer(overwritingtheDFUbootloader).Seethisuser‐contributed
tutorialformoreinformation.
Warnings
TheArduinoUnohasaresettablepolyfusethatprotectsyourcomputer'sUSBports
fromshortsandovercurrent.Althoughmostcomputersprovidetheirowninternal
protection,thefuseprovidesanextralayerofprotection.Ifmorethan500mAis
appliedtotheUSBport,thefusewillautomaticallybreaktheconnectionuntilthe
shortoroverloadisremoved.
Differenceswithotherboards
TheUnodiffersfromallprecedingboardsinthatitdoesnotusetheFTDIUSB‐to‐
serialdriverchip.Instead,itfeaturestheAtmega16U2(Atmega8U2uptoversion
R2)programmedasaUSB‐to‐serialconverter.
Power
TheArduinoUnoboardcanbepoweredviatheUSBconnectionorwithanexternal
powersupply.Thepowersourceisselectedautomatically.
External(non‐USB)powercancomeeitherfromanAC‐to‐DCadapter(wall‐wart)or
battery.Theadaptercanbeconnectedbyplugginga2.1mmcenter‐positiveplug
intotheboard'spowerjack.LeadsfromabatterycanbeinsertedintheGNDand
VinpinheadersofthePOWERconnector.
Theboardcanoperateonanexternalsupplyfrom6to20volts.Ifsuppliedwith
lessthan7V,however,the5Vpinmaysupplylessthanfivevoltsandtheboard
maybecomeunstable.Ifusingmorethan12V,thevoltageregulatormayoverheat
anddamagetheboard.Therecommendedrangeis7to12volts.

Thepowerpinsareasfollows:
Vin.TheinputvoltagetotheArduino/Genuinoboardwhenit'susinganexternalpower
source(asopposedto5voltsfromtheUSBconnectionorotherregulatedpowersource).
Youcansupplyvoltagethroughthispin,or,ifsupplyingvoltageviathepowerjack,
accessitthroughthispin.
5V.Thispinoutputsaregulated5Vfromtheregulatorontheboard.Theboardcanbe
suppliedwithpowereitherfromtheDCpowerjack(7‐12V),theUSBconnector(5V),or
theVINpinoftheboard(7‐12V).Supplyingvoltageviathe5Vor3.3Vpinsbypassesthe
regulator,andcandamageyourboard.Wedon'tadviseit.
3V3.A3.3voltsupplygeneratedbytheon‐boardregulator.Maximumcurrentdrawis50
mA.
GND.Groundpins.
IOREF.ThispinontheArduino/Genuinoboardprovidesthevoltagereferencewithwhich
themicrocontrolleroperates.AproperlyconfiguredshieldcanreadtheIOREFpinvoltage
andselecttheappropriatepowersourceorenablevoltagetranslatorsontheoutputsto
workwiththe5Vor3.3V.
Memory
TheATmega328has32KB(with0.5KBoccupiedbythebootloader).Italsohas2
KBofSRAMand1KBofEEPROM(whichcanbereadandwrittenwiththeEEPROM
library).
https://www.arduino.cc/en/Reference/EEPROM
InputandOutput
SeethemappingbetweenArduinopinsandATmega328Pports.Themappingfor
theAtmega8,168,and328isidentical.
PINMAPPINGATmega328P
https://www.arduino.cc/en/Hacking/PinMapping168
Eachofthe14digitalpinsontheUnocanbeusedasaninputoroutput,
usingpinMode()https://www.arduino.cc/en/Reference/PinMode,
digitalWrite()https://www.arduino.cc/en/Reference/DigitalWrite,
anddigitalRead()https://www.arduino.cc/en/Reference/DigitalReadfunctions.
Theyoperateat5volts.Eachpincanprovideorreceive20mAasrecommended
operatingconditionandhasaninternalpull‐upresistor(disconnectedbydefault)
of20‐50kohm.Amaximumof40mAisthevaluethatmustnotbeexceededonany
I/Opintoavoidpermanentdamagetothemicrocontroller.

Inaddition,somepinshavespecializedfunctions:
Serial:0(RX)and1(TX).Usedtoreceive(RX)andtransmit(TX)TTLserialdata.These
pinsareconnectedtothecorrespondingpinsoftheATmega8U2USB‐to‐TTLSerialchip.
ExternalInterrupts:2and3.Thesepinscanbeconfiguredtotriggeraninterruptonalow
value,arisingorfallingedge,orachangeinvalue.SeetheattachInterrupt()functionfor
details.
PWM:3,5,6,9,10,and11.Provide8‐bitPWMoutputwiththeanalogWrite()function.
SPI:10(SS),11(MOSI),12(MISO),13(SCK).ThesepinssupportSPIcommunicationusing
theSPIlibrary.
LED:13.Thereisabuilt‐inLEDdrivenbydigitalpin13.WhenthepinisHIGHvalue,the
LEDison,whenthepinisLOW,it'soff.
TWI:A4orSDApinandA5orSCLpin.SupportTWIcommunicationusingtheWirelibrary.
TheUnohas6analoginputs,labeledA0throughA5,eachofwhichprovide10bits
ofresolution(i.e.1024differentvalues).Bydefaulttheymeasurefromgroundto5
volts,thoughisitpossibletochangetheupperendoftheirrangeusingtheAREF
pinandtheanalogReference()function.Thereareacoupleofotherpinsonthe
board:
AREF.Referencevoltagefortheanaloginputs.UsedwithanalogReference().
Reset.BringthislineLOWtoresetthemicrocontroller.Typicallyusedtoaddareset
buttontoshieldswhichblocktheoneontheboard.
Communication
Arduino/GenuinoUnohasanumberoffacilitiesforcommunicatingwitha
computer,anotherArduino/Genuinoboard,orothermicrocontrollers.The
ATmega328providesUARTTTL(5V)serialcommunication,whichisavailableon
digitalpins0(RX)and1(TX).AnATmega16U2ontheboardchannelsthisserial
communicationoverUSBandappearsasavirtualcomporttosoftwareonthe
computer.The16U2firmwareusesthestandardUSBCOMdrivers,andnoexternal
driverisneeded.However,onWindows,a.inffileisrequired.TheArduino
Software(IDE)includesaserialmonitorwhichallowssimpletextualdatatobe
senttoandfromtheboard.TheRXandTXLEDsontheboardwillflashwhendata
isbeingtransmittedviatheUSB‐to‐serialchipandUSBconnectiontothecomputer
(butnotforserialcommunicationonpins0and1).

ASoftwareSeriallibraryallowsserialcommunicationonanyoftheUno'sdigital
pins.
https://www.arduino.cc/en/Reference/SoftwareSerial
TheATmega328alsosupportsI2C(TWI)andSPIcommunication.TheArduino
Software(IDE)includesaWirelibrarytosimplifyuseoftheI2Cbus;see
thedocumentationfordetails.ForSPIcommunication,usetheSPIlibrary.
https://www.arduino.cc/en/Reference/Wire
https://www.arduino.cc/en/Reference/SPI
Automatic(Software)Reset
Ratherthanrequiringaphysicalpressoftheresetbuttonbeforeanupload,the
Arduino/GenuinoUnoboardisdesignedinawaythatallowsittoberesetby
softwarerunningonaconnectedcomputer.Oneofthehardwareflowcontrollines
(DTR)oftheATmega8U2/16U2isconnectedtotheresetlineoftheATmega328via
a100nanofaradcapacitor.Whenthislineisasserted(takenlow),theresetline
dropslongenoughtoresetthechip.TheArduinoSoftware(IDE)usesthis
capabilitytoallowyoutouploadcodebysimplypressingtheuploadbuttoninthe
interfacetoolbar.Thismeansthatthebootloadercanhaveashortertimeout,as
theloweringofDTRcanbewell‐coordinatedwiththestartoftheupload.
Thissetuphasotherimplications.WhentheUnoisconnectedtoeitheracomputer
runningMacOSXorLinux,itresetseachtimeaconnectionismadetoitfrom
software(viaUSB).Forthefollowinghalf‐secondorso,thebootloaderisrunning
ontheUno.Whileitisprogrammedtoignoremalformeddata(i.e.anything
besidesanuploadofnewcode),itwillinterceptthefirstfewbytesofdatasentto
theboardafteraconnectionisopened.Ifasketchrunningontheboardreceives
one‐timeconfigurationorotherdatawhenitfirststarts,makesurethatthe
softwarewithwhichitcommunicateswaitsasecondafteropeningtheconnection
andbeforesendingthisdata.
TheUnoboardcontainsatracethatcanbecuttodisabletheauto‐reset.Thepads
oneithersideofthetracecanbesolderedtogethertore‐enableit.It'slabeled
"RESET‐EN".Youmayalsobeabletodisabletheauto‐resetbyconnectinga110
ohmresistorfrom5Vtotheresetline;seethisforumthreadfordetails.
Revisions
Revision3oftheboardhasthefollowingnewfeatures:
1.0pinout:addedSDAandSCLpinsthatareneartotheAREFpinandtwoothernewpins
placedneartotheRESETpin,theIOREFthatallowtheshieldstoadapttothevoltage

providedfromtheboard.Infuture,shieldswillbecompatiblewithboththeboardthat
usestheAVR,whichoperateswith5VandwiththeArduinoDuethatoperateswith3.3V.
Thesecondoneisanotconnectedpin,thatisreservedforfuturepurposes.
StrongerRESETcircuit.
Atmega16U2replacethe8U2.
https://store.arduino.cc/usa/arduino‐uno‐rev312‐8‐17
Other manuals for uno
4
Table of contents
Other Arduino Motherboard manuals

Arduino
Arduino WiFI Shield User manual

Arduino
Arduino MKR Vidor 4000 User manual

Arduino
Arduino ESP 8266 User manual

Arduino
Arduino MEGA 2560 R3 User manual

Arduino
Arduino Nano A000005 User manual

Arduino
Arduino ABX00053 User manual

Arduino
Arduino Nano ESP32 User manual

Arduino
Arduino MEGA 2560 User manual

Arduino
Arduino uno User manual