ARDUINO “on!” m— % LEONARDO - O
ARDUINOLEONARDOWITH
HEADERS
Code:A000057
SimilartoanArduinoUNO,canberecognizedbycomputerasa
mouseorkeyboard.
TheArduinoLeonardoisamicrocontrollerboardbasedontheATmega32u4
(datasheet).Ithas20digitalinput/outputpins(ofwhich7canbeusedasPWM
outputsand12asanaloginputs),a16MHzcrystaloscillator,amicroUSB
connection,apowerjack,anICSPheader,andaresetbutton.Itcontains
everythingneededtosupportthemicrocontroller;simplyconnectittoacomputer
withaUSBcableorpoweritwithaACtoDCadapterorbatterytogetstarted.
TheLeonardodiffersfromallprecedingboardsinthattheATmega32u4hasbuilt
inUSBcommunication,eliminatingtheneedforasecondaryprocessor.Thisallows
theLeonardotoappeartoaconnectedcomputerasamouseandkeyboard,in
additiontoavirtual(CDC)serial/COMport.Italsohasotherimplicationsforthe
behavioroftheboard;thesearedetailedonthegettingstartedpage.
https://www.arduino.cc/en/Guide/ArduinoLeonardoMicro
TECHSPECS
MicrocontrollerATmega32u4
OperatingVoltage5V
InputVoltage
(Recommended)712V
InputVoltage(limits)620V
DigitalI/OPins20
PWMChannels7
AnalogInputChannels12
DCCurrentperI/OPin40mA
DCCurrentfor3.3VPin50mA
FlashMemory32KB(ATmega32u4)ofwhich4KBusedby
bootloader
SRAM2.5KB(ATmega32u4)
EEPROM1KB(ATmega32u4)
ClockSpeed16MHz
Lenght68.6mm
Width53.3mm
Weight20g
OSH:Schematics
TheArduinoLeonardoisopensourcehardware!Youcanbuildyourownboard
usingthefollowingfiles:
EAGLEFILESIN.ZIP
https://www.arduino.cc/en/uploads/Main/arduinoleonardoreferencedesign_3b.zip
SCHEMATICSIN.PDF
https://www.arduino.cc/en/uploads/Main/arduinoleonardoschematic_3b.pdf
Power
TheArduinoLeonardocanbepoweredviathemicroUSBconnectionorwithan
externalpowersupply.Thepowersourceisselectedautomatically.
External(nonUSB)powercancomeeitherfromanACtoDCadapter(wallwart)or
battery.Theadaptercanbeconnectedbyplugginga2.1mmcenterpositiveplug
intotheboard'spowerjack.LeadsfromabatterycanbeinsertedintheGndand
VinpinheadersofthePOWERconnector.
Thepowerpinsareasfollows:
VIN.TheinputvoltagetotheArduinoboardwhenit'susinganexternalpowersource(as
opposedto5voltsfromtheUSBconnectionorotherregulatedpowersource).Youcan
supplyvoltagethroughthispin,or,ifsupplyingvoltageviathepowerjack,accessit
throughthispin.
5V.Theregulatedpowersupplyusedtopowerthemicrocontrollerandothercomponents
ontheboard.ThiscancomeeitherfromVINviaanonboardregulator,orbesuppliedby
USBoranotherregulated5Vsupply.
3V3.A3.3voltsupplygeneratedbytheonboardregulator.Maximumcurrentdrawis50
mA.
GND.Groundpins.
IOREF.Thevoltageatwhichthei/opinsoftheboardareoperating(i.e.VCCforthe
board).Thisis5VontheLeonardo.
Memory
TheATmega32u4has32KB(with4KBusedforthebootloader).Italsohas2.5KB
ofSRAMand1KBofEEPROM(whichcanbereadandwrittenwiththeEEPROM
library).http://www.arduino.cc/en/Reference/EEPROM
InputandOutput
Eachofthe20digitali/opinsontheLeonardocanbeusedasaninputoroutput,
using
pinMode()https://www.arduino.cc/en/Reference/PinMode,
digitalWrite()https://www.arduino.cc/en/Reference/DigitalWrite,
anddigitalRead()https://www.arduino.cc/en/Reference/DigitalRead
functions.Theyoperateat5volts.Eachpincanprovideorreceiveamaximumof
40mAandhasaninternalpullupresistor(disconnectedbydefault)of2050
kOhms.Inaddition,somepinshavespecializedfunctions:
Serial:0(RX)and1(TX).Usedtoreceive(RX)andtransmit(TX)TTLserialdatausing
theATmega32U4hardwareserialcapability.NotethatontheLeonardo,theSerialclass
referstoUSB(CDC)communication;forTTLserialonpins0and1,usetheSerial1class.
TWI:2(SDA)and3(SCL).SupportTWIcommunicationusingtheWirelibrary.
https://www.arduino.cc/en/Reference/Wire
ExternalInterrupts:3(interrupt0),2(interrupt1),0(interrupt2),1(interrupt3)and7
(interrupt4).Thesepinscanbeconfiguredtotriggeraninterruptonalowvalue,arising
orfallingedge,orachangeinvalue.SeetheattachInterrupt()functionfordetails.
https://www.arduino.cc/en/Reference/AttachInterrupt
PWM:3,5,6,9,10,11,and13.Provide8bitPWMoutputwiththeanalogWrite()
function.
https://www.arduino.cc/en/Reference/AnalogWrite
SPI:ontheICSPheader.ThesepinssupportSPIcommunicationusingtheSPIlibrary.Note
thattheSPIpinsarenotconnectedtoanyofthedigitalI/OpinsastheyareontheUno,
TheyareonlyavailableontheICSPconnector.Thismeansthatifyouhaveashieldthat
usesSPI,butdoesNOThavea6pinICSPconnectorthatconnectstotheLeonardo's6pin
ICSPheader,theshieldwillnotwork.
https://www.arduino.cc/en/Reference/SPI
LED:13.ThereisabuiltinLEDconnectedtodigitalpin13.WhenthepinisHIGHvalue,
theLEDison,whenthepinisLOW,it'soff.
AnalogInputs:A0A5,A6‐A11(ondigitalpins4,6,8,9,10,and12).TheLeonardohas
12analoginputs,labeledA0throughA11,allofwhichcanalsobeusedasdigitali/o.Pins
A0A5appearinthesamelocationsasontheUno;inputsA6A11areondigitali/opins4,
6,8,9,10,and12respectively.Eachanaloginputprovide10bitsofresolution(i.e.1024
differentvalues).Bydefaulttheanaloginputsmeasurefromgroundto5volts,thoughis
itpossibletochangetheupperendoftheirrangeusingtheAREFpinand
theanalogReference()function.
https://www.arduino.cc/en/Reference/AnalogReference
Thereareacoupleofotherpinsontheboard:
AREF.Referencevoltagefortheanaloginputs.UsedwithanalogReference().
https://www.arduino.cc/en/Reference/AnalogReference
Reset.BringthislineLOWtoresetthemicrocontroller.Typicallyusedtoaddareset
buttontoshieldswhichblocktheoneontheboard.
SeealsothemappingbetweenArduinopinsandATmega32u4ports.
https://www.arduino.cc/en/Hacking/PinMapping32u4
Communication
TheLeonardohasanumberoffacilitiesforcommunicatingwithacomputer,
anotherArduino,orothermicrocontrollers.TheATmega32U4providesUARTTTL
(5V)serialcommunication,whichisavailableondigitalpins0(RX)and1(TX).The
32U4alsoallowsforserial(CDC)communicationoverUSBandappearsasavirtual
comporttosoftwareonthecomputer.ThechipalsoactsasafullspeedUSB2.0
device,usingstandardUSBCOMdrivers.OnWindows,a.inffileisrequired.The
th
Arduinosoftwareincludesaserialmonitorwhichallowssimpletextualdatatobe
senttoandfromtheArduinoboard.TheRXandTXLEDsontheboardwillflash
whendataisbeingtransmittedviatheUSBconnectiontothecomputer(butnot
forserialcommunicationonpins0and1).ASoftwareSeriallibraryallowsforserial
communicationonanyoftheLeonardo'sdigitalpins.TheATmega32U4also
supportsI2C(TWI)andSPIcommunication.TheArduinosoftwareincludesaWire
librarytosimplifyuseoftheI2Cbus;seethedocumentationfordetails.
http://www.arduino.cc/en/Reference/SoftwareSerial
https://www.arduino.cc/en/Reference/Wire
ForSPIcommunication,usetheSPIlibrary.TheLeonardoappearsasageneric
keyboardandmouse,andcanbeprogrammedtocontroltheseinputdevicesusing
theKeyboardandMouseclasses.
https://www.arduino.cc/en/Reference/SPI
Programming
TheLeonardocanbeprogrammedwiththeArduinosoftware(download).Select
"ArduinoLeonardofromtheTools>Boardmenu(accordingtothemicrocontroller
onyourboard).Fordetails,seethereferenceandtutorials.TheATmega32U4on
theArduinoLeonardocomespreburnedwithabootloaderthatallowsyouto
uploadnewcodetoitwithouttheuseofanexternalhardwareprogrammer.It
communicatesusingtheAVR109protocol.Youcanalsobypassthebootloaderand
programthemicrocontrollerthroughtheICSP(InCircuitSerialProgramming)
headerusingArduinoISPorsimilar;seetheseinstructionsfordetails.
https://www.arduino.cc/en/Main/Software
https://www.arduino.cc/en/Hacking/Programmer
Automatic(Software)ResetandBootloaderInitiation
Ratherthanrequiringaphysicalpressoftheresetbuttonbeforeanupload,the
Leonardoisdesignedinawaythatallowsittoberesetbysoftwarerunningona
connectedcomputer.TheresetistriggeredwhentheLeonardo'svirtual(CDC)
serial/COMportisopenedat1200baudandthenclosed.Whenthishappens,the
processorwillreset,breakingtheUSBconnectiontothecomputer(meaningthat
thevirtualserial/COMportwilldisappear).Aftertheprocessorresets,the
bootloaderstarts,remainingactiveforabout8seconds.Thebootloadercanalso
beinitiatedbypressingtheresetbuttonontheLeonardo.Notethatwhenthe
boardfirstpowersup,itwilljumpstraighttotheusersketch,ifpresent,rather
thaninitiatingthebootloader.
BecauseofthewaytheLeonardohandlesresetit'sbesttolettheArduino
softwaretrytoinitiatetheresetbeforeuploading,especiallyifyouareinthe
habitofpressingtheresetbuttonbeforeuploadingonotherboards.Ifthe
softwarecan'tresettheboardyoucanalwaysstartthebootloaderbypressingthe
resetbuttonontheboard.
USBOvercurrentProtection
TheLeonardohasaresettablepolyfusethatprotectsyourcomputer'sUSBports
fromshortsandovercurrent.Althoughmostcomputersprovidetheirowninternal
protection,thefuseprovidesanextralayerofprotection.Ifmorethan500mAis
appliedtotheUSBport,thefusewillautomaticallybreaktheconnectionuntilthe
shortoroverloadisremoved.
PhysicalCharacteristics
ThemaximumlengthandwidthoftheLeonardoPCBare2.7and2.1inches
respectively,withtheUSBconnectorandpowerjackextendingbeyondtheformer
dimension.Fourscrewholesallowtheboardtobeattachedtoasurfaceorcase.
Notethatthedistancebetweendigitalpins7and8is160mil(0.16"),notaneven
multipleofthe100milspacingoftheotherpins.
https://store.arduino.cc/usa/arduinoleonardowithheaders12717

Products related to this Datasheet

ARDUINO LEONARDO W/ HDRS ATMEGA3