<<

EAGLE

EASILY APPLICABLE GRAPHICAL LAYOUT-EDITOR

Tutorial

Version4.1

Schematic-Layout-Autorouter for andWindows

CadSoftComputerInc. www.cadsoftusa.com

2ndEdition Copyright©2004CadSoftAllRightsReserved Ifyouhaveanyquestionspleasefeelfreetocontactus:

USAandothercountries: Phone: +1(561)2748355,USAalso:1-800-858-8355 Fax: +1(561)2748218 Internet: www.cadsoftusa.com Email: [email protected]

GermanyandotherEuropeancountries: Phone: +49(0)86356989-10 Hotline: +49(0)86356989-30 Fax: +49(0)86356989-40 Internet: www.cadsoft.de Email: [email protected]

Andrememberthatweofferafreehotlineforourcustomers!

 Copyright2004CadSoftComputer,Inc.Allrightsreservedworldwide Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,or transmitted,inanyformorbyanymeans,electonic,mechanical,photocopying, recording,scanning,digitizing,orotherwise,withoutthepriorconsenseof CadSoft.

WindowsisaregisteredtrademarkofMicrosoftCorporation. LinuxisaregisteredtrademarkofLinusTorvalds. TableofContents 1WhattoexpectfromthisManual 7 2FeaturesofEAGLE 8 SystemRequirements 8 ProfessionalVersion 8 General 8 LayoutEditor 9 SchematicModule 9 AutorouterModule 9 StandardEdition 10 LightEdition(Freeware) 10 3InstallationandProgramStart 11 Windows 11 Linux 11 4IndividualEAGLESetup 12 TheScriptFile.scr 12 UserInterface 12 FunctionKeys 12 LayerColors 12 5TheConceptoftheEAGLEUserInterface 13 SelectingMenuItems 13 MouseClick 13 SeveralInputAlternatives 14 UseofKeyCombinations 14 CommandandParameterInputviatheCommandLine 14 6ControlPanel 17 EAGLEFiles 18 BackupFiles 18 CreateEAGLEProjects 18 7LoadFileandSelectMonitorZoom 20 8SelectingLayersforDisplay 22 9SettingupGridandUnit 23 10Wires,Circles,Arcs,Rectangles,andText 24 TheWIRECommand 24 ChangingLineWidth 25 ChangeObjecttoanotherLayer 26 Undo/RedoFunction 26 TheCIRCLECommand 26 TheARCCommand 27 TheRECTCommand 27 TheTEXTCommand 28 SpecialTextVariables 29 11UsingLibraries 30 TheADDCommand 30 TheUSECommand 32 TheINVOKECommand 32 12DrawingaSchematic 34 Grid 34 AddingaFrametoaSchematic 34 AddingandChangingText 34 EnteringaSchematic 35 TheNETCommand 37 TheNAMECommand 37 TheLABELCommand 37 TheDELETECommand 37 TheJUNCTIONCommand 39 TheSHOWCommand 39 TheMOVECommand 40 HistoryFunction 40 CompletingtheSchematic 40 TheSMASHCommand 41 TheVALUECommand 41 TheElectricalRuleCheck(ERC) 42 GeneratingaBoardfromaSchematic 42 TheBUSCommand 42 13AutomaticForward&BackAnnotation 44 14DesigningaPCBoard 45 DesigningaBoardwithoutaSchematic 45 DefiningBoardShape 45 PlacementGrid 46 PlacingComponents 46 PlacingSMDPackages 46 ProvidingNames 47 ProvidingValues 47 DefiningSignals 47 DefiningSignalClasses 48 CreatingaBoardfromaSchematic 49 GeneratingaBoardFile 49 ComponentPlacement 49 Autorouter:ABriefExample 50 RoutingManually 50 BoardChanges 51 FurtherUsageoftheLayoutEditor 52 The DISPLAYCommand 52 The MOVECommand 52 TheGROUPCommand 53 TheSPLITCommand 53 TheCHANGECommand 53 TheROUTECommand 54 The RIPUPCommand 54 The SHOWCommand 55 RefreshScreen 55 Undo/RedoFunction 55 InnerLayers 55 SupplyLayers 55 CopperPouringwiththePOLYGONCommand 56 15Autorouter 58 16DesignRuleCheck 60 17Libraries 61 ResistorPackage 61 ResistorSymbol 63 ResistorDevice 63 18OutputofDrawingsandManufacturingData 67 OutputaSchematicwiththePRINTCommand 67 GeneratingImageFilesforDocumentationPurpose 68 GeneratingGerberDatawiththeCAMProcessor 68 GeneratingDrillData 69 FurtherManufacturingData 69 19DataExchange 70 TheEAGLEUserLanguage 70 ScriptFiles ¾ AFlexibleInputInterface 70 EAGLE-TutorialVersion4.1

1 WhattoexpectfromthisManual

ThistutorialprovidesabasicintroductiontotheEAGLEPCB-Design Package. ItcoverstheuseoftheEAGLESchematicEditor,LayoutEditor,and Autorouter.Thisguidewillleadyouthroughtheprograminthenatural order,startingwiththeSchematicEditormoduleandworkingthroughto boarddesignandautorouting.Youwillbenefitmostbygoingthroughthe entiredocument. Youshouldbefamiliarwiththeuseofthebasicfunctionsofyouroperat- ingsystem.Expressionslike enlargetheeditorwindow willbeusedwithout furtherexplanation. Havingcompletedthistutorialyoushouldbeabletostartworkingonase- riousproject.Whilecreatingyourinitialdesigns,however,youshouldfre- quentlyusethehelpfunctionandtheEAGLEReferenceManualtolearn moreaboutspecificdetails.Onlythenwillyoubeabletotakefulladvan- tageofEAGLE’scapabilities. Youwilllearnhowtousemostoftheprogramcommands,althoughnotall ofthefeatureswhichmakeEAGLEsopowerfulandflexiblearediscussed inthisintroduction —forexamplethepossibilitiesoftheSET,SCRIPT, andRUNcommands(seehelp). BeforeyoubeginyoushouldconsulttheREADMEfileandthefileswith theextension *.txt in eagle/doc. AlthoughthistutorialisbasedontheWindowsversionofEAGLE,thedif- ferencestoLinuxareminimal.

7 EAGLE-TutorialVersion4.1

2 FeaturesofEAGLE

SystemRequirements EAGLEisapowerfulgraphicseditorfordesigningPC-boardlayoutsand schematics.InordertorunEAGLEthefollowinghardwareisrequired: • IBM-compatiblecomputer(586andabove)with • Windows95/98/ME,WindowsNT4/2000/XPor • Linuxbasedonkernel2.x,libc6andX11withaminimumcolor depthof8bpp, • aharddiskwithaminimumof50Mbytefreememory, • aminimumgraphicsresolutionof1024x768pixels,and • preferablya3-buttonmouse.

ProfessionalVersion

General • maximumdrawingarea64x64inches(about1600x1600mm) • resolution1/10.000mm(0.1microns) • mmorinchgrid • upto255layers,userdefinablecolors • commandfiles(Scriptfiles) • C-likeUserLanguagefordataimportandexport • simplelibraryediting • compositionofuser-definedlibrarieswithalreadyexistingelements byDrag&Drop • easygenerationofnewpackagevariantsfromanylibraryby Drag&Drop • freerotationofpackagevariants(0.1degreesteps) • librarybrowserwithpowerfulsearchfunction • supportoftechnologyfeature(e.g.74L00,74LS00..) • generationofgraphicsoutputaswellasmanufacturingandtesting outputwiththeCAMprocessororthehelptheUserLanguage • printoutsviatheOS'sprinterdrivers • user-definable,freeprogrammableUserLanguagetogeneratedata formountingmachines,testequipments,millingmachinesorany otherdataformat • partlistgenerationwithdatabasesupport(bom.ulp)

8 EAGLE-TutorialVersion4.1

• Drag&DropintheControlPanel • automaticbackupfunction

LayoutEditor • fullSMDsupport • supportofblindandburiedvias • rotationofelementsinarbitraryangles(0.1-degreesteps) • textscanbeplacedinanyorientation • dynamiccalculationofsignallineswhileroutingthelayout • trackscanbelayedoutwithroundedcornersinanyradius • miteringtosmoothwirejoints • DesignRuleCheckforboardlayouts(checkse.g.overlaps, measuresofpadsortracks) • copperpouring(groundplains) • packagevariantssupport

SchematicModule • upto99sheetsperschematic • simplecopyingofparts • Online-Forward&BackAnnotationbetweenschematicandboard • automaticboardgeneration • automaticgenerationofsupplysignals • ElectricalRuleCheck(errorcheckintheschematicandconsistency checkbetweenschematicandlayout)

AutorouterModule • fullyintegratedintobasicprogram • usesthelayout'sDesignRules • changebetweenmanualandautomaticroutingatanytime • ripup&retryalgorithm • user-definablestrategybycostfactors • routinggriddownto0.02mm(about0.8mil) • noplacementrestrictions • upto16signallayers(withuserdefinablepreferreddirections) • upto14supplylayers • fullsupportofblindandburiedvias • takesintoconsiderationvarioussignalclasses

9 EAGLE-TutorialVersion4.1

StandardEdition ThefollowingrestrictionsapplytotheStandardEditionintheLayout Editor: • Thelayoutareaisrestrictedtoamaximumof160x100mm (about6.3x3.9inches).Outsidethisareaitisnotpossibletoplace packagesanddrawsignals. • Amaximumnumberof4signallayersareallowed(top,bottom, and2innerlayer).

LightEdition(Freeware) ThefollowingrestrictionsapplytotheEAGLELightVersion,whichis availableasFreeware(fortestingandevaluation): • Theboardareaisrestrictedto100x80mm(about3.9x3.2inches). Outsidethisareaitisnotpossibletoplacepackagesanddraw signals. • Onlytwosignallayerscanbeused(noinnerlayers). • Aschematiccanconsistofonlyonesinglesheet.

Largerlayoutsandschematicscanbeprintedwiththe smaller editions.The CAMprocessorcangeneratemanufacturingdataaswell.

10 EAGLE-TutorialVersion4.1

3 InstallationandProgramStart

Windows InsertthemediaintotheCD-ROMdrive.Selectthedesiredmenuitemdi- rectlyintheCD-ROMstartwindow. Ifthestartwindowdoesnotautomaticallyappear,double-clickonthe CD-ROMsymbolin MyComputer. Followtheinstructionsonthescreen. FortheFreewareinstallationyoudonotneeda UserLicenseCertificate. Answerthequestionforavalidlicensebyclicking Runasfreeware. IfyoudecidetouninstallEAGLE,usethe unInstallShield programwhich willbeinstalledalongwiththeEAGLEprogram. TheEAGLECD-ROMsuppliesaplayableFreeware.Youcanstartitwith- outinstallingitonyourharddisk.Buttherearesomeminorrestrictions duetothefact,thatEAGLEcan'twritefilesontheCD-ROM.

Linux InserttheCDandmounttheCD-ROMdrive. Choosethecorrespondingdirectory(/english/linux/install) andreadthe installationnotesinthe README file.Whileinstallingtheprogramyou willbeaskedifyouwanttorunEAGLEasFreewareorasalicensedver- sion.Choose Runasfreeware,ifyoudon'thaveavalidlicense. TheEAGLECD-ROMsuppliesaplayableFreeware.Youcanrunitfrom CD-ROMdirectly.ThereforyouhavetomounttheCD-ROMdriveas executable.Buttherearesomeminorrestrictionsduetothefact,that EAGLEcan'twritefilesontheCD-ROM.

11 EAGLE-TutorialVersion4.1

4 IndividualEAGLESetup

Apartfromthebasicinstallation,EAGLEallowstheusertocustomizecer- tainprogramfeatures,suchastheconfigurationofmenus,functionkeys, orscreencolors.Alotofthesesettingscanbemadeinthe Options menuin theControlPanelorinoneoftheeditorwindows.

TheScriptFileeagle.scr Inthespecialcommandfile(scriptfile) eagle.scr presetvaluesfortheSche- matic,Layout,andLibraryEditorscanbeenteredintheformofEAGLE commands.Thosewhowouldliketousethesepossibilitiesshouldgetac- quaintedwiththeEAGLEcommandlanguage.ThesyntaxofeachEAGLE commandisdescribedintheEAGLEhelp.

UserInterface Theuserinterfacecanbesetindividually.Clickthe Options/Userinterface menuintheControlPanelorinoneoftheEditorwindows.Thetutorial presupposesthatyouareusingthedefaultsettings.

FunctionKeys Severalfunctionkeysarepredefinedwithdifferentcommands.Thislayout canbechangedbytheuseratanytime.However,operatingsystemspecific keys(likeF1forthehelpfunctioninWindows)mustnotberedefined. Thecurrentfunctionkeyslayoutcanbefoundinthemenu Options/Assign.

LayerColors Thelayercolorsarefreelydefinable.Inthe Options/Set, Color tab,youcan definecolorvalues.Youalwayshavetodefineapairofcolors: Thenormalcolorofthelayerandthe highlight color,whichisusedtoem- phasizeanobjectwhileusingtheSHOWorMOVEcommand.Usethe DISPLAYmenu, Change button, Color itemtoassigncolorstolayers.

Additionalinformationconcerningconfigurationcanbefoundinthehelp function.Seetheitems SET, ASSIGN, UserInterface, CHANGE,and Project.

12 EAGLE-TutorialVersion4.1

5 TheConceptoftheEAGLEUserInterface

Internally,EAGLEhasbeensetupinsuchaway,thatanyactionisiniti- atedbyacommandstring.Normallytheuseractivatesthesecommandsby clickingonmenuitemsortoolbaricons.Valuesarenormallyenteredinto appropriatefields. Theknowledgeoftheinternalcommandlanguageisnotnecessarytosuc- cessfullydesignschematicsandboardswithEAGLE.However,thiscon- ceptoffersfurtherpossibilitieswhichmakeEAGLEaveryflexibletool: Anycommand,forinstance,canbeenteredintextformatviathe commandlineorcanbereadfromafile.Furthermore,commandstrings canbeassignedindividuallytofunctionkeys(ASSIGNcommand).This enablestheusere.g.toexecutecommandsequenceswithakeystrokeora fewmouseclicks(seeSCRIPTcommand).

ThistutorialusesasimplifiednotationforvariousactionsinEAGLE whichisexplainedinthefollowingexamples.

SelectingMenuItems Thecharacter ⇒ means,thatamenuselectionistobemade.Forexample ⇒ File/Save means:clickthe File menuwiththeleftmousebuttonandnextclick Save.

MouseClick Actionstobecarriedoutwithaclickoftheleftmousebuttonarerepre- sentedwithadot.Forexample: • MOVE and F1 means:clicktheMOVEcommandwiththeleftmousebuttonandthen pressthefunctionkeyF1. Actionstobecarriedoutwithadoubleclickoftheleftmousebuttonare representedwithtwodots.Forexample • • linear.lbr means:select linear.lbr withadoubleclickoftheleftmousebuttonfrom themenu. Somecommandshavespecialfunctionsincombinationwiththe Shift, Ctrl, and Alt key.Pleaseseedetailedinformationinthecommandreferenceof thehelpfunction.

13 EAGLE-TutorialVersion4.1

SeveralInputAlternatives EAGLEcommandscanbeenteredviakeyboard,byclickingiconsorby clickingmenuitems. Thefollowingactions,forexample,willexecutetheMOVEcommand:

• Clickingtheicon • Typing MOVE inthecommandline,followedbythe Enter key • PressingthefunctionkeyF7whichisassignedtotheMOVE command • Selectingthemenuitem ⇒ Edit/Move

Inthistutorialwewillmainlyworkwiththetoolbars.Forthesakeofclar- itythecommandsareshowastext: • MOVE means:clicktheMOVEicon

UseofKeyCombinations A+characterindicatesthatthefirstkeyishelddownwhilepressingthe secondkey.Forexample: Alt+F2 The Alt keyishelddownwhilepressingF2,thenreleasebothkeys.

CommandandParameterInputviatheCommandLine Actionswhichneedtobeterminatedwiththe Enter (i.e.return)keyare symbolizedwiththecharacter ←.Forexample USE ← means:type USE andnextpressthe Enter key. Anythingthatistobetypedexactlyasitappears,willappearinthetextas follows: CHANGEWIDTH0.024 ← NormallyEAGLEdoesnotdifferentiatebetweenupperandlowercase characters.Thereforeyoucanentertheabovecommandas changewidth0.024 ← Youmayabbreviatethekeywords.Theaboveinputmaythereforebesim- plifiedto

14 EAGLE-TutorialVersion4.1

chawid0.024 ← Inthistutorial,however,thefullcommandsareused.

Thefollowingfiguresshowwhichcommandsareactivatedwiththevarious toolbaricons.AdditionalhelpisofferedbytheBubbleHelptextwhichap- pearsassoonasthemousecursorispositionedonaniconforacertain time.Thistextshowsthecommandname.

TheLayoutEditorwindow Fromtoptobottom:titlewithinformationaboutEAGLEversionandedi- tion, menubar,actiontoolbar,dynamicparametertoolbarandcoordinates displaywithcommandline. Ontheleftthecommandtoolbar.TheBubbleHelptextdescribesthe WIREicon.Thestatusbarbelowshowsashortdescriptionofthecurrent command.

Thetoolbarscanbedisplayed/hiddeninthe Options/Userinterface menu. Additionallyonehasthepossibilitytouseatextmenuinsteadofthe showncommandtoolbar.

15 EAGLE-TutorialVersion4.1

Info Show Display Mark

Move Mirror Info Show Mirror Rotate Display Mark Group Change

Move Copy Cut Paste Mirror Rotate Delete Add Group Change Pinswap Replace Cut Paste Name Value Delete Add Smash Miter Pinswap Gateswap Split Optimize Name Value Route Ripup Smash Miter Wire Text Split Invoke Circle Arc

Wire Text Rectangle Polygon Circle Arc Via Signal Rectangle Polygon Hole Bus Net Ratsnest Auto Junction Label ERC DRC ERC Errors

CommandtoolbaroftheSchematicEditor(left)andthe LayoutEditor(right)

16 EAGLE-TutorialVersion4.1

6 ControlPanel

AfterstartingEAGLE,theControlPanelwillbeopened.Itallowsyouto loadandsaveprojectsaswellastosetupcertainprogramparameters.Right mouseclicktoanentryinthe Projects branchofthetreeviewopensacon- textmenuthatallowstostartanewproject. ThetreeviewallowsaquicksurveyofEAGLE'slibraries.Double-clickan entryinthe Libraries branch.Nowthecontentsofthelibraryisdisplayed. Selectinganobjectshowsashortdescriptivetextontheright.

ControlPanel:Previewofthelibrarycontents TheControlPaneloffersalsoanoverviewofUserLanguageprograms, Scriptfiles,andCAMjobs.Tryselectingvariousentries.Ontherightyou willgetthereferringdescription. TheControlPanelsupportsDrag&Dropinusualmanner.Arightmouse clickonanyentryinthetreeviewopensacontextmenuthatoffersop- tionslikeprint,open,copy,etc. Thepathsforeachbranchofthetreeviewaresetin Options/Directories.

17 EAGLE-TutorialVersion4.1

EAGLEFiles Thefollowingtableliststhemostimportantfiletypesthatcanbeedited withEAGLE: Type Window Name Board LayoutEditor *.brd Schematic SchematicEditor *.sch Library LibraryEditor *.lbr ScriptFile TextEditor *.scr UserLanguageProgram TextEditor *.ulp Anytextfile TextEditor *.*

TheLinuxversiononlyrecognizeslowercaseletterfileextensions!

BackupFiles EAGLEcreatesbackupdataofschematic,board,andlibraryfiles.Theywill besavedwithmodifiedfileextensions: .brd becomes .b#1, .sch becomes .s#1, and .lbr becomes .l#1. Therecanbeamaximumnumberof9backupfiles. ItisalsopossibletohaveEAGLEfilessavedinacertaintime-interval.In thiscasethefilesgettheextension b##, s## or l##.Thefilescanbeused againafterrenamingthemwiththeoriginalfileextension. Allsettingsconcerningbackupscanbedoneinthe Options/Backup menu oftheControlPanel.

CreateEAGLEProjects Letscreateanewprojectfirst.Afterstartingtheprogram,first • the+ characterofthe Projects path,then • the+characteroftheentries examples and tutorial inthetreeview.Thecontentsofthe tutorial directoryappears. • tutorial withtherightmousebutton.Selecttheoption NewProject inthe popupmenu.Namethenewproject MyProject,forexampleandhitthe En- ter key.Thiswayyouarecreatingasubdirectoryof tutorial thatisnamed MyProject.Thisdirectoryshouldcontainalldatafilesthatbelongtoyour project.Ofcourseyoumaydefineadditionalsubdirectories. Todefinethepathwhereyourprojectdirectorieswillbestored,click ⇒Options/Directories andenteritinthe Projects field. Arightmouseclickontheprojectentryandyoucanopennewschematics, layoutsandlibraries.Eachprojectdirectorycontainsafilenamed eagle.epf whichstoresproject-specificsettings,windowpositionsetc.

18 EAGLE-TutorialVersion4.1

Thecurrentlyactiveprojectischecked(green)intheControlPanel.After startingtheprogramagaintheprevioussituationwillberestored.Thelast usedprojectandotheruser-specificsettingsaresavedinthefile ~/.eaglerc (Linux)or eaglerc.usr (Windows). Beforestartingthefollowingexampleswewanttocopythefiles demo1.sch, demo2.sch,and demo2.brd intothedirectory MyProject. Pressthe Ctrl key,clickthedesiredfileanddragittothe tutorial entry.Re- leasethemousebuttonnow.Repeatthisfortheotherfiles. The Ctrl keyeffectuatesthatthefileswillbecopied,otherwisetheywould bemovedtothedirectory. Nowopentheschematicfile demo1.sch withadoubleclick. IfyouendtheprogramwithAlt+Xandstartitagain,youwillgetthepre- vioussettingsandeditorwindows.

19 EAGLE-TutorialVersion4.1

7 LoadFileandSelectMonitorZoom

Nowletusstartdoingsomeexercises.StartEAGLE,andwaituntilthe ControlPanelappears. Expandtheentry Projects/examples/tutorial/MyProject ofthetreeview. Nowloadthe demo2.brd file.Youcandothiseitherby ••theentry demo2.brd,orbyselectingthefilefromthemenu ⇒ File/Open/Board.The schematicwiththesamenamewillbeloadedalongwiththeboard. Enlargetheboardeditorwindow.

Firstclicktheicon intheactiontoolbartozoomintothedrawing. ThisWINDOWcommandcanalsobeexecutedbypressingthefunction keyF3.Ifyouareworkingwithawheelmouse,youcanzoomintoorout ofthedrawingbyturningthemousewheel. Thesettingfor Mousewheelzoom=0 inthe Options/UserInterface menu deactivatesthisfeature.Thezoomfactorcanbesetwiththeoption Mouse wheelzoom.

Clickthisicon orpressF4tozoomoutofthedrawing.

Byclickingthisicon thedrawingwillbeshowninfullsizetofityour screen(youcanalsouseAlt+F2instead).

Clickthisicon andthenmarkarectangularareabydraggingthe mousecursorwhiletheleftmousebuttonispressed.Thenreleasethe mousebutton.Themarkedareawillnowbedisplayed.

Tomovethechosenwindowsimplyclickthemiddlemousebuttonand movethemouse.Thisalsoworkswhileaneditorcommandisactive,forex- ample,whiledrawingnetsorwires. ToscrollbeyondthedrawingbordersadditionallypresstheShiftkey.

Ifthecursorisovertheverticalorhorizontalscrollbarandyouarework- ingwithawheelmouse,youcanmovethescreenupanddownortothe rightorleftbyturningthemousewheel. Duringcertainactionsitmayhappenthatobjectsinthedrawingdisappear orgetcorrupted.InthiscaserefreshthescreenbyclickingtheRedrawicon (alsoF2possible).

20 EAGLE-TutorialVersion4.1

TheWINDOWcommandismoreversatilethaninotherprograms:

Clickthisicon ifyouwanttoselectanewcenterwiththesamezoom factor,markthecenterwithaclickandfinallyclickonthetrafficlighticon intheactiontoolbar. Ifyouwanttoselectanewcenterandanewzoomfactorsimultaneously, clickonthesameicon.Threemouseclickswillgiveyouthedesiredresult: thefirstclickwilldefinethenewcenterandbothlastclickswilldefinethe zoomfactor.Ifthethirdpointisfurtherawayfromthefirst,theprogram willzoomintothedrawingandviceversa.Tryittofindouthowitworks.

FurtherpossibilitiescanbefoundonthehelppagesoftheWINDOW command.Thesecanbecalledupbysimplytypinginthecommandline: HELPWINDOW ←

21 EAGLE-TutorialVersion4.1

8 SelectingLayersforDisplay

EAGLE-Drawingscontainobjectsindifferentdrawinglayers.Inorderto obtainausefulresultseverallayersarecombinedfortheoutput.Forexam- ple,thecombinationofTop,Pad,andVialayersisusedtogenerateafilm foretchingthecomponentsideoftheprinted-circuitboard.Consequently thecombinationofBottom,Pad,andVialayersisusedtogeneratethefilm forthesoldersideoftheboard.ThePadlayercontainsthethrough-holes forthecomponentconnectionsandthevialayercontainsthevia-holes whichareneededwhenasignaltrackchangestoanotherlayer. Loadtheboard demo2.brd usingthemenu File/Open/Board andclickin thecommandtoolbarontheiconfortheDISPLAYcommand(lookatthe toolbarlayoutonthepreviouspages).Themarkedlayersarecurrentlydis- played.Byclickingonthelayernumberthedisplayofeachlayercanbe switchedonoroff.The All and None buttonsswitchonoroffalllayers. Byselecting/deselectinglayer21 tPlace (silkscreenupperside),thelayers 23 tOrigins,25 tNames,27 tValues,and51 tDocu areselected/deselected, too.Thesameappliestolayer22 bPlace (silkscreenbottomside). Veryimportant: Componentsonlayer1 Top canonlybemovedorse- lectedinthedrawingiflayer23 tOrigins ison.Thesameappliestocompo- nentsonlayer16 Bottom andthelayer24 bOrigins. ToselectacertainlayerintheDISPLAYmenuclickonthelayername. Nowyoucanusethe Change buttontomodifythelayer'spropertieslike name,color,orfillstyle. PleaseconsultthehelppageoftheLAYERcommandforthemeaningof thedifferentEAGLElayers.

22 EAGLE-TutorialVersion4.1

9 SettingupGridandUnit

Schematics shouldalwaysbedrawnonagridof0.1inches(2,54mm)since thelibrariesaredefinedthisway. Thegridfor boards isdeterminedbythecomponentsusedandbythe complexityoftheboard. GridandunitaresetupwiththeGRIDcommandbyclickingontheGRID icon intheparametertoolbar. Allvaluesaregiveninthecurrentlyselectedunit.Pleaseconsultthehelp pagesoftheGRIDcommandfordetailedinformation.

ForallsettingsintheDesignRuleswindow(⇒ Edit/DesignRules...)one canusevaluesinmilorinmillimeters(1mil=1/1000inch).Thedefault unitismil. Ifyouprefertoworkwithmillimeterssimplyaddtheunittothevalue,for example: 0.2mm

Inch-Mil-MillimeterTablefortheMostUsualValues: inchmilmm 0,00880,2032 0,010100,2540 0,012120,3048 0,016160,4064 0,024240,6096 0,032320,8128 0,040401,0160 0,050501,2700 0,1001002,5400

TheGRIDdialogallowssettinganalternativegridwhichcanbeactivated bypressingthe Alt keyintheEditorwindow.

23 EAGLE-TutorialVersion4.1

10 Wires,Circles,Arcs,Rectangles,andText

Wires,circles,arcs,rectangles,andtextarecreatedwiththeWIRE, CIRCLE,ARC,RECTANGLEandTEXTcommands.Ononehandthese objectsserveaspuredrawingelementsforsymbols,packages,framesetc., andontheotherhandtheycanperformspecialfunctions,suchasthedefi- nitionofrestrictedareas. Firstanewschematicfileistobecreated.Closealloftheeditorwindows andselect ⇒ File/New/Schematic fromtheControlPanel. Anewfilewiththename untitled.sch isnowcreated.Normallyyoushould neversaveafilewiththename untitled,butshoulduse ⇒ File/Saveas to chooseadifferentname. However,inthistutorialnofileistobesavedat all. Nowenlargetheeditorwindow.

TheWIRECommand TheWIREcommandisusedtodrawlines. ClicktheWIREcommandinthecommandtoolbar.Allparametersforthis commandcanbesetupintheparametertoolbar.Nextselectlayer94, Sym- bols,fromthelayer-selectioncombobox.Inthislayerarectangularlineis tobedrawn.

ParametersoftheWIREcommand Definethestartingpointbyaclickonthelefthandmousebutton.Move thecursorslightlyuptotherightandpresstherighthandmousebuttona fewtimes.Thiswayonechangesthebendmode(wirebend).Amongsome diagonalandorthogonalmodesyouwillfindsometodraw90°-arcsand freedefinablearcs. However,intheSchematicEditorthearcmodescanbeselectedonlyin theparametertoolbar,notwiththerightmousebutton. Keepingthe Shift keypressedwhileclickingtherightmousebuttonwill changetheselectionorder.Pressingthe Ctrl keytogglesbetweencorre- spondingwirebends. Whentheconnectionisdisplayedinasquareangle,pressthelefthandbut- tontofixitsposition.Nowmovethecursortothestartingpointand • • to droptheline.Nowyoushouldbeabletoseearectangularoutline.As

24 EAGLE-TutorialVersion4.1 observedbefore,ananglebetweenwiresegmentscanbecreatedbyclicking therighthandmousebutton.Thisismoreeffectivethanusingthesymbols intheparametertoolbar.

Attention:DonotusetheWIREcommandtodrawnetorbuslinesin schematics-useNETorBUSinstead!

IntheLayoutEditor: Ifthelines(WIREcommand)areplacedontheboardlayersTop,Bottom, orRoute2..15EAGLEtreatsthemaselectricallyconductingtracks.Wires arealsousedtocreateboardoutlines.Let’sstartusingthiscommand.

ChangingLineWidth AslongastheWIREcommandisactive,youcanselectthelinewidthfrom thecomboboxintheparametertoolbarortypeinaspecificvalue,separate foreachsegment. Tochangethelinewidthofanexistingobject, • CHANGE iconinthecommandtoolbarandapopupmenuwillopen up. • WIDTH entryandafurtherpopupmenuwillshowupwherethe presentvalueismarked. Selectthedesiredvaluebyaleftmouseclick,thenclicktheobjecttobe changed. Tochangethelinewidthtoavaluethatisnotshowninthemenuofthe CHANGEcommand,clicktheentry ... andtypeinthevalueinthe ChangeWidth window. Alternativelyusethecommandlinetotypeinthevalue,forexample: CHANGEWIDTH0.017 ← Thenclickonthewiresegmentyouwanttochangeorstartdrawinganew wire. Tochangethewirestyle • CHANGEand • Style.Selectthestyleand • the wireyouwanttochange.

25 EAGLE-TutorialVersion4.1

ChangeObjecttoanotherLayer Tomoveanobject,forexampleawiresegment,toanotherlayer • CHANGE • LAYER Selectthetargetlayer,forexample94 Symbols,by •. Then • OK,andthen • ontheselectedobject(s).Notethatsomeobjects,suchasbusornetlines, cannotbemovedtoanotherlayerastheyhaveaspecialmeaning.

Undo/RedoFunction OneofthemostusefulfeaturesofEAGLEistheunlimitedUndofunc- tion.Clickthelefticonasmanytimesasyouwanttoundopreviousac- tions.Usetherighticontoredotheactionswhichhavebeencancelledby undo.

TheCIRCLECommand ToactivateCIRCLE,whichisusedtodrawacircle, • CIRCLE EAGLErequirestwomouseclickstodefineacircle.Thefirstclicksetsthe centerofthecircleandthesecondclickdefinestheradius. Placethecursoratanygridpointand • .Dragthecursorseveralgridpoints totheright.Whenthecirclehasthediameteryouwant, • tofixitandter- minatethecommand.Thelinewidthofthecirclecanbechangedasde- scribedbeforeforwires.Acirclewithlinewidth0willbefilled. Examplefordrawingacircleusingcoordinatevalues: Acirclewiththeoriginatpositionx=10andy=25andaradiusof15mm shouldbedrawn. Firstsetthegridtomillimeter: GRIDMM ← Drawthecirclenow: CIRCLE(1025)(1040) ← or CIRCLE(1025)(1010) ← Thesecondpairofcoordinatesdescribesanylocationonthe

26 EAGLE-TutorialVersion4.1 circumference.Sovariousvaluesarepossibletodescribeonecertaincircle. TofindoutmoreabouttheCIRCLEcommandpressF1aslongasthe commandisactivatedortype HELPCIRCLE ←.

Tocancelacommand,clickthestopsigniconoractivateanothercom- mand.Pressingthe Esc keygenerallyunlocksanobjectfromthecursor.

TheARCCommand ToactivatetheARCcommand,whichisusedfordrawingarcs, • ARC Anarcisdefinedwiththreemouseclicks:thefirstclickdefinesthestart point,thesecondthediameterandthethirdtheendpoint. Placethecursoratthedesiredstartingpointand •.Nowmovethecursor somegridunitstotherightbutremainonthesameY-coordinate.Acircle appearswhichshowsthediameterofthearc. • andthecirclewillbecome anarc.Nowyoucanchangethedirectionofthearcwiththerightmouse button.Clickseveraltimeswiththerightbuttonandyouwillseewhatis meant.Youcanalsoenlargeorminimizethearcbymovingthemouse.Af- terreachingthedesiredform, • tofixthearc. Theparameters flat and round determinetheshapeofthearc'sends. Practicebydrawingsomearcs.Usethehelpfunctiontofindoutmore abouttheARCcommand. AllthiscanbedonewiththeWIREcommandaswell!

TheRECTCommand ToactivatetheRECTcommand,usedforcreatingfilledrectangles, • RECT Todefinearectangletwomouseclicksarerequired:Thefirstonewillde- termineonecornerandtheseconddeterminesthepositionoftheopposite corner. Movethecursortothepointwhereacorneroftherectangleshouldbeand •.Movethecursorslightlytotherightandup.Whentherectanglehas reachedthedesiredsize, • tofixit.Therectangleisfilledwiththecolorof thelayerinuse. UsethehelpfunctiontofindoutmoreabouttheRECTcommand.

27 EAGLE-TutorialVersion4.1

TheTEXTCommand ToactivatetheTEXTcommand,usedforplacingtext, • TEXT Nowtypethedesiredtextand • OK.Thenplacethetextwith •.Acopyof thesametextisnowattachedtothecursor.Tostopplacingtextsimply clickthenextcommandicon.Forplacingadifferenttext,typethetextand terminateitwiththe Enter key.Thetextwillshowupinthecommandline. Textscontainingspacesorasemicolonhavetobeenclosedinsingle quotes,likethisone: 'Thisisatext' Tochangethetextfont: • CHANGE • FONT EAGLEsupportsavector,aproportional,andafixedfont. Tochangethesizeofatext: • CHANGE • SIZE • Valueinthemenu ortypeinanydesiredvalueinthecommandline(confirmwiththe Enter key)and • lowerleftcornerofthetext.Atarotatedtextthepointofori- gincanmovetoitsupperrightcorner.Atextinaschematicisalwaysdis- playedinawaythatitcanbereadfromthefrontorfromtheright. TheLayout Editorallowstodisplaytextsinanyorientation.Usethe Spin flagwhichislocatedintheparametertoolbarwhiletheTEXT,MOVE,or ROTATEcommandisactivetogettextsreadablefromalldirections. Tochangeatext • CHANGE • TEXT and • atthepointoforiginofthetext,theneditthetextand • on OK. Using • CHANGE • RATIO youcanchangethelinewidthinatextinrelationtotheheightofthevec- torfont. SeehelppageformoreinformationaboutTEXTandCHANGE.

28 EAGLE-TutorialVersion4.1

SpecialTextVariables Ifyouplacethetext >SHEET thisstringwillbesubstitutedwiththecurrentsheetnumber,e.g. 1/1 (sheet oneoftotally1). EAGLEoffersanumberofsimilartextvariables,e.g.fordate/timewhich reflectthelatestchangeinthefile(>LAST_DATE_TIME)orthedrawing output(>PLOT_DATE_TIME). Librarypartsaredefinedwithtextvariablesforthename>NAMEandthe value>VALUEofacomponent.Furthermoreonecanuse >PART and >GATE forsymbols.

29 EAGLE-TutorialVersion4.1

11 UsingLibraries

EAGLEcomeswithalotoflibraryfilesthatcontainthrough-holeandsur- facemountdevices.ThetreeviewinEAGLE'sControlPaneloffersde- tailedinformationaboutthecontentsofthelibraries. Inthissectionyouwilllearnhowtoinsertschematicsymbolsintoa drawingandhowtousethem. Openanewschematictostartwithablankdrawingarea ⇒ File/New/Schematic.

TheADDCommand Toselectsymbolsfromalibrary, • ADD inthecommandtoolbar,anda windowpopsup.Ontheleftsidealistofavailablelibrariesshouldappear. Eachlibraryentrycanbeopenedbyclickingthe+character.Nowit'scon- tentswillbeshown.Selectanentryandyouwillseethecorresponding previewontheright. Nowyoucanenteronormoresearchpatternsinthe Search field.Youmay usethenameofadeviceoranywordofthedevicedescription.Wildcards like*and?areallowed. IftherearenoentriesvisibleafterusingADDforthefirsttime,nolibra- rieshavebeenloaded.Inthiscase,pleasereadthefollowingchapterdealing with theUSEcommand. Wewanttoplace,forexample,thedevice74LS00.Enterinthe Search field: 74*00* or 74LS00* *isthewildcardofthetechnologyand/orthepackagevariant.Thesearch resultshowsthedeviceinvarioustechnologiesandpackagevariants.Select thedesireddeviceand • OK.Nowyoucanplaceitintheschematic. Placethecursorslightlytotheleftofthedisplaycenterand •.Movethe cursortotheright,andplaceasecondgatewiththenextmouseclick.Place fourgatesaroundthecenterofthedrawingareainthisway. Nowplaceafifthgatesomewherenearby.PleasenotethatEAGLEhas namedthefirstfourgatesIC1A..IC1D,whereasthefifthgatehasbeen namedIC2A,sincethisgaterequiresasecondIC. Ifyounowshowthelayer93, Pins,eitherasdescribedbeforeorbytyping DISPLAYPINS ← inthecommandline,furtherpinparametersaredisplayedingreen.Zoom inonthedrawing,sothatagateisshownonalargescale.Youwillseethat thepinsaremarkedasInput(In)orOutput(Out),andthatanumber

30 EAGLE-TutorialVersion4.1 showstheSwaplevel. ASwaplevelgreaterthan0indicatesthatthispincanbeswappedwithan- otherpinofthesamedevicewhichhasthesameSwaplevelassignment(see commandPINSWAP).Apinwithaswaplevelof1,forexample,canbe swappedwithanyotherpinthathasaswaplevelof1.Swaplevel0means thatthispincannotbeswapped. Thelayer93,Pins,isnotusuallyprinted(PRINTcommand). AslongastheADDcommandisstillactive,agatesymbolwillbeattached tothecursor. NowusetheZoom-iniconorthe F4 keytoviewalargerportionofthe schematiconthedisplay.Thenpressthe Esc keytotheselectionwindow oftheADDcommand. Enterthefollowingpatterninthe Search field: *555N* or *555* Select,forexample,thedeviceLM555Nfrom linear.lbr with • •,rotateit 180degreeswithtworightmouseclicks,andplaceitsomewhereonthe drawingareawiththeleftmousebutton. Repeatthiswithothersymbols.Youwillfindoutthatthelibrariescontain symbolsdrawnintheEuropeanandtheAmericanway.Choosewhatever youprefer. WhiletheADDcommandisactive,youcanreturntotheADDmenuby pressingthe Esc key.Pressthe Esc keyagainandthecommandwillbe cancelled. Anotherwaytoplacedevicesintheschematicistodragthemfromthetree viewintheControlPanelintotheSchematicEditorwindow. Arrangethewindowsinawaythatyoucanseebothonthescreen.Select, forexample,thedeviceLM555Nfrom linear.lbr inthetreeview(Libraries branch).UseDrag&DroptomovethedeviceintotheSchematicEditor. Ifyouselectadevicethatsupportsmorethanonepackageortechnology variant,youwillbeaskedtoselectthevariantinamenubeforedroppingit. EAGLE,bydefault,assumesthatallactivecomponentswillbeattachedtothe samepowersourceandground.Thepowerpinsarethereforenotshown,and areautomaticallyconnectedtothePowerSourceandGroundwhengenerating aboard(unlesstheuserconnectsthemtoothersignals).UsetheINVOKE commandincaseyouwanttoplaceitintheschematic. MostoftheEAGLElibrarydevices,whichhaveonlyoneVCCandoneGND pin,aredefinedsothatthepowerpins,bydefault,arenotvisible.Insome casesitmakes sensetomakethepowerpinsinanICvisible,asinthe555N storedinthelinearlibrary.Insuchacaseconnectthepowerpinswiththe

31 EAGLE-TutorialVersion4.1 appropriatenets. ThehelpfunctioninEAGLEoffersinformationaboutfurtheroptionsof thecommandsADDandUPDATEconcerningtheupdateoflibraryob- jectsinschematicandlayoutwiththeirrespectivepartsofthecurrent libraries.

TheUSECommand ThedefaultsettingcausestheADDcommandtosearchinalllibrariesthat areavailableinthegivenlibrariesdirectories(⇒ Options/Directories/Li- braries intheControlPanel).Youcanexcludelibrariesfromthesearch functionbyclickingthegreenmarkerintheControlPanel'streeview, Li- braries branch.Greenmeansinuse,graynotused.Thisisexactlythefunc- tionoftheUSEcommandyoucanalsotypeonthecommandline. Forexample,thecommand USE* makesavailablealllibrariesthatcanbefoundinthegivenlibrarypaths. Moreaboutthiscanbefoundinthehelpfunction.

TheINVOKECommand TheINVOKEcommandcanbeusedtoallowtheconnectionofactive componentstoapowersourceotherthanVCCandGND.Todemon- strateitsuse • INVOKE andleftclickonthegateIC2A.Apopupmenuappears. • • PWRN andthepowerpinsforIC2areattachedtothecursor.Youcan nowplacethemanywherewitha • andconnectthemtoanynet. AnotherfeatureoftheINVOKEcommandallowsyoutoalterthese- quenceofthereferencedesignatorsbeforeEAGLEautomaticallymakesan assignment.AssumingtheINVOKEcommandisstillactive, • IC2A, and thepopupmenuappears.TheasteriskassignedtogateAindicatesthatthe gatehasbeenused;thosewithoutanasteriskareavailableforuse. IfyouwantIC2CtobeplacedbeforeIC2B, • • C inthepopupmenu.The menucloses,andIC2Cisattachedtothecursortobeplacedwitha •. OnceIC2Cisplaced,EAGLEwilluseuptheremaininggatesinthatpack- agebeforeassigninganadditionalpackage. Ifyouwanttoplacegatesovermorethanonesheet,usetheINVOKE commandonthenewsheetandtypeintheelement'snameinthecom- mandline.Nowtheinvokemenupopsup.

32 EAGLE-TutorialVersion4.1

Don’thesitatetoexperimentwithdifferentlibrariesandwithplacingand rotatingschematicsymbols. Youcanplacedevicesinadrawingfromasmanylibrariesasyouwant.De- vicesaresavedintheschematicorboardfilesintheirentirety. Whenpassing onafile,thereisnoneedtosupplythelibrarieswiththem.

33 EAGLE-TutorialVersion4.1

12 DrawingaSchematic

Inthissectionyouwilllearnhownetsandbusesareusedinadrawing.You willthenbeabletocreateaschematic. Tocreateanemptyschematic,openanewdrawingandenlargetheeditor window.

Grid Thestandardgridforschematicsis0.1inches.Symbolsshouldbeplacedonthis gridoramultipleofit,sinceotherwiseitcanhappenthatnetscannotbecon- nectedtothepins. Setthealternativegridto0.25inch.Thiswouldallowtoadjust,forexam- ple,labelsinafinergridwhichwillbeactivatedbypressingthe Alt key.

AddingaFrametoaSchematic Asastart,selectadrawingframefromthelibrary frames.lbr, whichcon- tainspredefinedframesinmiscellaneousformats. • ADD,andentertheword letter or frame inthe search field.Selectasuitable frameand • • forexample LETTER_P. Aframewhichfitsonaletterfor- matpage(portrait)isnowattachedtothecursor. Ifyoucannotseeitcompletely,pressfunctionkeyF4untilitmatchesyour screen,thenplaceitwithaclickofthelefthandmousebuttonsothatits lowerleftcornerisplacedonthecoordinates(X=0,Y=0). Nowafurtherframeisattachedtothecursor.Clicktheiconwiththestop signtoterminatetheADDcommand.PressAlt+F2 toshowtheframein fullsizeorclicktheZoom-to-fiticonintheactiontoolbar.

AddingandChangingText Youcanaddlines,textandotherobjectstopredefinedframesandtext fieldsinthelibrary.Oryoucandesignandsaveyourownframes. Variabletexts,e.g.theprojecttitleortherevisionnumber,canbeinserted directlyintheSchematicEditorwhereyouarenow. Framesaresavedassymbolsinthelibrary,thereforeitmakessenseto writethetextinlayer94, Symbols. Nowbringtheframetextfieldintotheeditorwindowsothatitiscom- pletelyvisible.NextclicktheiconfortheTEXTcommandandenterthe followingtext

34 EAGLE-TutorialVersion4.1

CadSoft AfterclickingtheOKbutton,thetextisattachedtothecursorandcanbe placedwiththeleftmousebutton.Movethetextintheupperemptyline ofthetextfieldandplaceitwitha •. Afurthercopyofthetext,whichwill disappearassoonasanothercommandisactivatedorthestopsigniconis clicked,isstillattachedtothecursor. IfyoudidnotdefinethesizeofthetextwhiletheTEXTcommandwasac- tive,youcanusetheCHANGEcommandtosetittoanothervalue: • CHANGE Fromthemenuselect: • SIZE andafurtherwindowopensinwhichthepresentlyselectedtextheightis shown. • 0.15 andmovethecursortothelowerleftcornerofthetext CadSoft.Click theleftmousebuttonandthetextheightwillbechangedto0.15inches. JustincaseyouwouldliketosetasizenotpresentintheCHANGESIZE menu,like.0.17,simplytype: CHANGESIZE0.17 ← andthenclickthelowerleftcornerofthetext. Attention:Usedotsfordecimals!Thecurrentgridsettingdeterminestheunit! Practicemanipulatingtextsbyaddinganaddressoradocumentnumberin thetextfield. TITLE: containsthefilenameinuse(textvariable >DRAWING_NAME). DATE: containsthedateofthemostrecentsavecommand(textvariable >LAST_DATE_TIME). Bothfieldsareautomaticallyfilledwiththeactualdatawhenthedrawingis saved,sincetheframesstoredinthe frames libraryhavebeendefinedwith theappropriatetextvariables.

EnteringaSchematic Nowletsstartdrawingaschematic.Wewillbedrawingtheschematic showninthefollowingfigure,whichyoucanuseforreference.Ifyou don’twanttoenterthewholeschematicyoucanusethefile demo1.sch storedinthe eagle/examples/tutorial directory. StartbypressingALT+F2orclickingtheZoom-to-fiticontofillthewin- dowwiththedrawingframe.

35 EAGLE-TutorialVersion4.1

Theschematicconsistsofthefollowingelements: PartValueDevicePackageLibrarySheet

C130pC-EUC1206C1206rcl1 C230pC-EUC1206C1206rcl1 C310nC-EU025-025X050C025-025X050rcl1 C447u/25VCPOL-EUTAP5-45TAP5-45rcl1 C547uCPOL-EUTAP5-45TAP5-45rcl1 D11N41481N4148DO35-10diode1 IC1PIC16F84APPIC16F84APDIL18microchip1 IC278L05Z78L05ZTO92linear1 JP1PROGPINHD-1X41X04pinhead1 JP2APPLPINHD-1X171X17pinhead1 Q1XTAL/SQSspecial1 R12,2kR-EU_R1206R1206rcl1 F1DINA4_Lframes1 UsetheADDcommandtoplacethelisteddevices. Pleasekeepinmind: Youreallyshouldnotchangethedefaultgridof100mil(=2.54mm)inthe SchematicEditor.Onlythiswayyoucanbesurethatnetswillbeconnectedto theelements'pins. YoucantogglethegridonandoffbyclickingtheGRIDiconormoreeas- ilybyusing F6,tohelpyoulocatingtheparts. OnceyouhaveplacedthepartsyoucanrelocatethemwiththeMOVE command.ActivatetheMOVEcommandbyclickingtheappropriateicon inthecommandtoolbar,thenmovethecursortothepartyouwantto moveand • .EAGLEwillhighlightthepart,toletyouknowthatitisat- tachedtothecursorandreadytoberelocated. Relocatethepart,and • toplaceitinitsnewlocation.TheMOVEcom- mandisstillactiveandreadytomovethenextpart.Presstherightmouse buttonifyouwanttorotateapart. ForduplicatingpartsyoumayusetheCOPYcommand(forexample,C1 andC2).Thusyoudon'thavetofetcheachpartwiththeADDcommand. Whenyouhavelocatedtheparts,startconnectingthemusingtheNET command.

Attention:UsetheNETcommand,notWIRE!

36 EAGLE-TutorialVersion4.1

TheNETCommand Anetisonlyconnectedtoapinifitisplacedontheconnectionpointof thepin.Displaythelayer93, Pins,withtheDISPLAYcommandtolocate theseconnectionpoints.Theyaremarkedwithagreencircle. EAGLEautomaticallynameselectricalconnections(nets).Inourexample demo1.sch thenetlinesatC5pin+,U1pin3(VI),andJP2pin16havethe samename.Thepinsareconnectedtothesamenet,althoughthenetlines arenotdrawcontinuously. WhiletheNETcommandisactive,thestatusbarbelowshowsproperties oftheselectednet. Asmentionedbefore,netswiththesamenamedefineanelectricalconnection.

TheNAMECommand EAGLEautomaticallyallocatesnamessuchasB$..forbuses,P$..forpins andN$..fornets. • NAME andthen • thenetconnectedtoIC1pinOSC1(16).Apopup menushowsthepredefinednameofthenet.Typein OSC1 and • OK.Thenetimmediatelynowhasthisname. Thenamesofcomponentsandbussescanbechangedinthesameway.

TheLABELCommand TheLABELcommandallowsyoutoplacebusornetnamesonaschematic inanylocation. • LABEL,locatethecursoronthenetMCLR/PGMand • . Thenameofthenetisattachedtothecursorandyoucanplaceitinanylo- cation.Youcanalsorotatethelabelwiththerightmousebutton.Locate thelabelapproximatelyasshowninthefigureand • tofixitsposition (nearJP1pin3). Ifnetorbusnamesarechanged,therelevantlabelsarealsochanged.Label textisnotchangedwiththeCHANGETEXTcommandbutwiththe NAMEcommandandaclickonthenetlineorthebusline. CHANGEFONTorCHANGESIZEchangesthefontorthetextsize.

TheDELETECommand Youcandeleteobjectswiththiscommand.Ifitisappliedtonets,wiresor busses,asinglesegmentisdeletedatatime.Tousethiscommand, •

37 EAGLE-TutorialVersion4.1

DELETE inthecommandtoolbar,takethecursortotheobjectthatistobe deleted,and •. Keepthe Shift keypressedwhiledeletinganobjectinordertodeletethe wholenetorbus.Moreaboutthisinthehelpfunction. UNDOandREDOworkhereaswell.GROUP,DELETEandaright mouseclickdeletewholegroups.

Schematicdemo1.sch

38 EAGLE-TutorialVersion4.1

TheJUNCTIONCommand Droppinganetonanothernetlinegeneratesaconnectionbetweenthese twonets.Theconnectionwillberepresentedbyajunction,thatwillbeset automatically.Automaticsettingofjunctionscanbeswitchedoffwiththe option Autosetjunctions (⇒ Options/Set/Misc). InthiscasetheJUNCTIONcommandisusedtodrawaconnectingnode attheintersectionofnetswhicharetobeconnectedtoeachother. • JUNCTION andanodeisattachedtothecursor.Locatethenodeatthe junctionoftwonetlinesand • tofixitintoplace.

TheSHOWCommand ThisisagoodtimetodemonstratethefunctionoftheSHOWcommand. Thiscommandisusedtoshownamesandotherdetailsofelementsandob- jects.Completesignalsandnetscanbehighlighted,aswellascomponents. ToshowforexamplethenetV+, • SHOW inthecommandtoolbarthen movethecursortotheconnectionpointofU1pinVI(3)and •. PleasenoticethatEAGLEhighlightsthenetwiresandeachpinconnected bythisnet,aswellasthepinnameofeachparttowhichitisconnected. Inaddition,thesignalislistedinthestatusbaras: Net:V+,Class:1Power WhiletheSHOWcommandisactivethenetremainshighlightedalthough youarepanningthewindowbypressingthemiddlemousebuttonand movingthemouseorusingtheWINDOWcommand.Deactivatethe SHOWcommandbyclickingthestopsigniconanduseWINDOW REFRESH(F2).Nowtheobjectsarenolongerhighlighted. Toshowanobjectwithaspecificname, • SHOW andtypethename(for example D0 ←)inthecommandline.Youcansubsequentlytypeother nameswithouttheneedtoreactivatetheSHOWcommand.Thiswayyou canmarkonenetaftertheother. Doyouwishtohighlightseveralnetsatthesametime,enterinthecom- mandline: SHOWRA4 ← SHOWRA3 ← SHOWRA2 ←

39 EAGLE-TutorialVersion4.1

TheMOVECommand Noelectricalconnectionwillbegeneratedifyoumoveanetlineoverapin (usingtheMOVEcommand).Ontheotherhand:ifyoumoveapinoveran- otherpinoroveranetline,anelectricalconnectionwillbegenerated,anda netlinewillbeattachedtothepinwhenthecomponentismovedfurther.Re- membertheUNDOcommandifyouwanttodetachthenetline. ChecktheconnectionswiththeSHOWcommand,asmentionedbefore. AdditionalonecanexportanetorpinlistwiththeEXPORTcommand.

HistoryFunction Withthekeys up-arrow and down-arrow youcanrecallthelastkeyboard instructionintothecommandlineandexecuteitwiththe Enter key.The Esc keywilldeletethecommandline. UseAlt+F2toshowthewholeschematiconthescreen,thentype: SHOWR1 ← SHOWC1 ← SHOWIC1 ← QuittheSHOWcommandbyclickingthestopsignicon. Redrawthe screen,e.g.withF2andpressthe up-arrow and down-arrow keysseveral times.Asyoucansee,youcanscrollthroughthelistoftherecentlyused commands.Assoonasthedesiredcommandappearsinthecommandline pressthe Enter key.

CompletingtheSchematic UsetheADDcommandtoaddtheremainingcomponentsandthesym- bolsfor+5V,V+,andGNDfrom supply1.lbr (searchpattern: supply). Supplysymbolsrepresentthepowersignalsinyourschematicandcause theERC(ElectricalRuleCheck)tousespecialchecksforthem. RememberthatyoucanusetheMOVEcommandtomoveobjectsaround andthatyoucanrotateelementsattachedtothemousewitharightmouse click. UsingtheNETcommand,connectthepinsofthecomponentsaccording totheschematicandconnectthesupplysymbolstotherelatedpins.Use therightmousebuttontoalternatebetweentheorthogonalanddiagonal modeswhileusingtheNETcommand.Use • tofixasegment. Ifyouplaceanetexactlyonaconnectionpoint,thenetisterminatedat thislocation.Otherwisethenetkeepsfollowingthemouse.

40 EAGLE-TutorialVersion4.1

TheSMASHCommand Youwillnoticethatwhenyourotatediodesandresistorsfromthehori- zontaltotheverticalposition,theirreferencedesignatorsandvaluetexts rotatewiththepart.EAGLEprovidesaSMASHcommandthatallowsyou toMOVEandROTATEthenameandvaluetextsindependentlyofthe symbol. WhilemovingasmashedtextEAGLEdrawsalinefromthetextto thepartsorigintoshowwherethetextbelongsto. Toactivatethecommand • SMASH Locatethecursoronthediodesymboland •. Thisseparatesthetextfrom thesymbol.Nowclickthe MOVE icon,movethecursortothename D1 for thediode,and •. Thetextselectionpointismarkedasacrossandresides,dependingonthe rotation,onthelowerleftortheupperrightcorner. Thenameisnowattachedtothecursor.Itcanbemovedtoabetterloca- tionandrotatedwiththerightmousebutton.Whenyouhaverotatedand relocatedD1, • tofixitslocation. Ifyouwanttochangethesizeofnameandvaluetextswhichhavebeen separatedfromthepartwiththeSMASHcommand,usetheCHANGE SIZEcommand(clicktheCHANGEiconandselect Size fromthemenu). SMASHmaybeusedwithgroups. Keepthe Shift keypressedwhileclickinganobjectorinsidethegroupin ordertounsmashalltexts.Theywillappearattheiroriginalpositions.

TheVALUECommand EAGLEallowsyoutodefineortochangethevalueelementslikeresistors orcapacitors.InthecaseofICsthevalueinformsyouabouttheelement type(e.g.74LS00N). • VALUE • theresistor, typethenewvalue, 2.2k, • OK,andthenewvalueisnowdisplayed. YoucanusetheNAMEcommandtochangethenamesofresistors,capaci- tors,ICs,netsandbusesaccordingly.Youcanchangethenetnamesbut youdon’thaveto,unlessyouwanttogetadescriptivenetlist.

41 EAGLE-TutorialVersion4.1

TheElectricalRuleCheck(ERC) Ifyouhaven’tenteredthecompleteschematicyourselfyoucannowload thefile demo1.sch. TheERCcommandisusedtotestschematicsforelectricalerrors. Theresultsarewarningsanderrormessagesthataregeneratedandwritten intoafilewhichhasthesamefilenameasthedrawingbuttheextension *.erc.Thisfileisautomaticallydisplayedinatexteditorwindowifmes- sagesweregenerated.TousethecommandclicktheERCiconinthecom- mandtoolbar. TheERCquitsoursamplefilewithtwomessages: WARNING:Sheet1/1:POWERPinIC1VSSconnectedtoGND WARNING:Sheet1/1:POWERPinIC1VDDconnectedto+5V Thesemessagesinformyouthatthepowerpinsareconnectedtoothersig- nalsthanexpected.ThepowerpinswerenamedVSSorVDDinthelibrary butareconnectedtoGNDand+5V.Inourcasethishasbedoneonpur- pose,thereforethemessagescanbeignored. Pleasenotethat theERCcanonlydiscoverpossibleerrorsources.Itisupto youtoproperlyinterprettheERCmessages! IfyouwanttolearnmoreabouttheERCcommand,type HELPERC ← inthecommandline.

GeneratingaBoardfromaSchematic Afterloadingaschematicfromwhichyouwouldliketodesignaboard, clickontheBOARDiconintheactiontoolbar:

Aboardfilewillbegeneratedinwhichthepackagesarepositionednextto anemptyboard. Afurtherdescriptionfollowsinthechapter DesigningaPCBoard. Butnowwewanttointroduceanotherimportantcommandthatisneces- sarytodesignschematicsfirst.

TheBUSCommand Loadtheschematic bus.sch fromthe /eagle/examples/tutorial directory. Aschematicwithabusstructureappears.Abushastobedrawnwiththe

42 EAGLE-TutorialVersion4.1

BUScommand.Itisnamedautomatically(B$1..). Abushasnologicalsignificance.Itisadrawingelementonly.Logicalcon- nections(nets)areonlydefinedwiththeNETcommand.Netswiththe samenameareidenticaleveniftheyareondifferentpagesofaschematicor opticallynotconnected. Thebusnamedeterminesthesignalscontainedinthebus.Inourexample thebuscontainsthesignalsVALVE0toVALVE11andasignalnamed EN.Thereforethebushasbeennamed EN,VALVE[0..11] withthe NAMEcommand. Thebusinourexamplehasnotbeenfinished,yet.Therearestillsomecon- nectionstodraw.StarttoconnectthefollowingsignalstoIC7byselecting theNETcommandandclickingonthebusline: ENIC7Pin14EN VALVE0IC7Pin16INA VALVE1IC7Pin15INB VALVE2IC7Pin10INC VALVE3IC7Pin9IND • NET inthecommandotoolbarandmovethecursoroverthebus,onegrid lineoverthepinIC7-14.Thenetconnectiontothebusmustoriginate fromthebusandbedrawntothecomponentpin,ifyouwanttousethis convenientwaytonameit. • tosetthestartingpointofthenet,anda popupmenuwillappearwiththenetnamesforthebus. • EN toselectnet EN,andmovethecursortoIC7-14,usingtherightmousebuttonto changethelineuntilitisdrawnliketheothernetlinesinthisarea. • the pin'sconnectionpointtofinishthenetline. RepeatthisactionforVALVE0..VALVE3. UsetheLABELcommandtomakethenetnamesvisibleintheschematic. Ifyouwanttocancelanaction,clicktheUNDOicon,orusethe F9 key. EitherbyclickingontheREDOiconorbyuseofthe F10 keyyoucanper- formthecancelledactiononceagain. UsetheMOVEcommandtomoveindividualbussegments.Selectaseg- mentneartotheendinordertomovetheendpoint.Selectasegment somewhereinthemiddle,tomoveittoaparallellocation.Youcandelete individualsegmentswithDELETE. Thecursortakesontheformoffourarrowswhenyouwanttoselectanobject whoseoriginisveryclosetotheoriginofanotherobject.Inthissortofcase, clicktheleftmousebuttontoselectthehighlightedobject.Clicktherightmouse buttonifyouwanttogoontothenextpossibleobject.Informationaboutthe selectedobjectcanbefoundinthestatusbar.

43 EAGLE-TutorialVersion4.1

13 AutomaticForward&BackAnnotation

YoushouldalwaysdesignyourboardsusingForward&BackAnnotation controls;onlythencanyoubesurethatboardsandschematicswillbecon- sistentwitheachother.Thiscontrolmechanismisactivatedwhenyouload aschematicandaboardwhichhavethesamenameandwhichareconsis- tentwitheachother.EAGLEalwaysloadsbothfilesiftheyexistinthe samedirectory. Consistent inthiscontextimpliesthatthenetlist,compo- nents,andvaluesareidentical. Ifyouloadaschematicandaboardwhichhasthesamenameandwhich canbefoundinthesamedirectory(orviceversa),EAGLElaunchesacon- sistencycheck.YouhavethechancetostartanERCifanydifferencesare found.Theresultsaredisplayedinatexteditorwindow.Theyenableyou tofixtheinconsistenciesmanually.Usingthismethoditispossibleto drawaconsistentschematicforanexistinglayout. TheForward&BackAnnotationwillbecancelledifeitheronlythesche- maticwindoworonlytheboardwindowisactivated.Anychangesmade canthenleadtodiscrepanciesinthefilesfortheboardandtheschematic. Thereforealwaysmakefollowthisrule: Whenworkingonaboard,neverclosetheschematicwindow(youcanmini- mizeittoanicon,however)—andviceversa. EAGLEgenerateswarningsbeforeoperationsarecarriedoutwhichwould terminatetheForward&BackAnnotation. UnderthecontroloftheForward&BackAnnotationanychangeinthe schematicresultsinanequivalentchangeoftheboard,andviceversa.Some changescanbemadeeitherintheboardorintheschematic(e.g.naming components,nets,etc.).Othersarepossibleonlyintheschematic(e.g. addingcomponents).EAGLEpreventssuchoperationsintheboardand promptsyoutousetheSchematicEditor. TomonitortheForward&BackAnnotationloadthe demo2.sch file.The board demo2.brd willbeloadedautomaticallyintotheLayoutEditor. Nowsizebothofthewindowssothatyoucanseethembothonthe screen.ChangesomenamesandvalueswiththeNAMEandVALUEcom- mands.Youwillnoticethatthenamesandvalueschangeinbothwindows. ExperimentalsowiththeDELETEcommandandremembertheUNDO andREDOcommands.

44 EAGLE-TutorialVersion4.1

14 DesigningaPCBoard

InthissectionyouwillcreateasmallPCBdesignandmodifyanexisting designusingtheLayoutEditor.First,youwillcreateaboardwithouta schematic. ThissectionisusefulmainlyforthoseuserswhohavenoSchematicMod- ule.IfyouhavetheSchematicModuleyouwouldnormallynothavetodeal withthestepsdescribedinthefollowingsection.Youshould,however, readthroughthissectionasitdealswithsomegenerallyusefulpoints.

DesigningaBoardwithoutaSchematic Openanewfile(⇒ File/New/Board intheControlPanel)andenlargethe editorwindow.

DefiningBoardShape Thefirstthingwewilldoisdefinetheshapeoftheboard.Beforedefining theshape,wemustestablishtheunitofmeasurementwewillbeusingto drawtheboardoutline.Wewanttousethedefaultgridwhichcanbecho- senbyclickingtheGRIDiconintheparametertoolbar.Then • the Default buttonand • OK. TheboardoutlinesmustbedrawnwiththeWIREcommandinlayer20, Dimension: • WIRE,andselectlayer20fromthecomboboxintheparame- tertoolbar. Positionthecursoratthezeropointofthecoordinates,and • todetermine thestartingpointoftheoutline.Movethecursorslightlytotheright,click therightmousebuttonuntilbothlinesareorthogonal(90degrees),and positionthecursornearthecoordinates (4.003.00). Fixtheoutlineatthispointwith • andmovethecursorbacktothecoordi- nates’zeropoint. Bydouble-clickingtheleftmousebuttonyouwillterminatetheWIRE command.Theboardoutlinesarenowdefined. UsingtheMOVEcommand,theedgescanbemoved,oruseUNDOand REDOtorecallthepreviousactionsandperhapsmakechanges. Alt+F2, orclickingtheZoom-to-fiticon,willfittheboardintothescreen.

45 EAGLE-TutorialVersion4.1

PlacementGrid Beforeplacingcomponents,itisimportanttosetupthegridforcompo- nentplacement.Thecomponentplacementgridmaybedifferentfromthe gridusedfordrawingtheboardshape,andisalmostalwaysdifferentfrom thegridusedforroutinginterconnectwires.Forthefollowingexercisewe willusethedefaultgridof0.05,incheswhichisalreadyset.

PlacingComponents • ADD inthecommandtoolbarandsearchfor DIL14. Double-clickona14-pinDILpackageentry.Nowitisattachedtothecur- sor.Itcanberotatedwiththerightmousebuttonandthenplacedwiththe leftmousebutton.PlacetwoDIL14packages. Usethe F3 and F4 keytozoominandout. Ifyouliketoplacethecomponentinanyrotationinyourlayoutitispossi- bletodefineanyvalueinthe Angle fieldoftheparametertoolbarwhilethe componentisattachedtothemouse.Todothisclickintothecombobox, typeinthevalueforrotation,andpressthe Enter key.Nowtherotated componentfollowsthemouseandcanbeplaced. UsetheROTATEcommandtochangetheorientationofcomponentsaf- tertheyhavebeenplacedinthelayout. ROTATEworksin90-degreestepsbydefault. Torotatecomponentsinanyangleenterthedesiredvalueinthe Angle field oftheparametertoolbarwhilethecommandisactive.Nowclickthecom- ponenttorotateit.Keepthemousebuttonpressedafterselectingthecom- ponentandyoucanrotateitwhilemovingthemouse.Thecurrentangle willbeshownintheparametertoolbar. Ifyouliketouseanotherpackagethanthepredefinedone(e.g.asmdin- steadofathrough-holepackage),youcanusetheREPLACEcommand. Fordetailedinformationpleasetakealookintothehelpfunction.

PlacingSMDPackages NowuseADDtoplacetwo1210packagesontheboard(searchpattern: R1210).Ifyouknowthepackagename,youcantype ADDR1210 ← or ADDR1210@smd-ipc ← inthecommandlinetofetchthepackagefromacertainlibrary. Ifyouintendtoplacethepackageinacertainangle,youcanenterthevalue

46 EAGLE-TutorialVersion4.1 directly: ADDR1210@smd-ipcR22.5 ← TheSMDpadsappearinred,whichmeans,thattheyareonthelayer1, Top,oftheboard.TotransferthemtotheBottomlayerusetheMIRROR command.ClickontheMIRRORiconinthecommandtoolbarand • on thepackage. AslongastheMIRRORcommandisactive,youcanmovepackagestothe othersideoftheboard.Forthenextexercisethepackagesshouldbeplaced ontheToplayer(red).

ProvidingNames Toassignanametothepackagesjustplaced: • NAME inthecommandtoolbar. Movethecursorneartheoriginpoint(markedwithacross)ofthefirst DIL14and • . Apopupwindowappears.Type IC1 ← andthenewnameisassignedtothepackage.Repeatthisprocesstoname theremainingpackagesIC2,R1,andR2.

ProvidingValues Toassignvaluestoanelement: • VALUE inthecommandtoolbar. MovethecursorneartheoriginofIC1and • . Apopupwindowappears.Type CD4001 ← andIC1nowhasthevalue CD4001.UsingtheVALUEcommandassign CD4002 toIC2, 100k toR1,and 22k toR2.

DefiningSignals Thenextstepistodefinesignalsandestablishtheirconnectionsusingair- wires(rubberbands).First,connectthegroundpads: • SIGNAL andtype GND ← • onpad7ofIC1(IC1-7)andmovethecursortoIC2-7and • • totermi- natetheGNDairwire. ThetwopadsarenowconnectedtotheGNDsignal.

47 EAGLE-TutorialVersion4.1

NextwewillconnectVCC.Type VCC ← • onIC1-14,movethecursortoIC2-14and • • toterminatetheVCC airwire. Definefurthersignalsusingthesameprocedure. Ifyoudon’twanttospecifynamesforthesignalsatthistime • apadto startasignaland • • apadtoterminateit(orclickthestopsignicon). EAGLEwillthengeneratenetnamesautomaticallywhichcanbechanged withtheNAMEcommand. EAGLEterminology: Padsarethrough-holesforconventionalcomponents (usedinpackages).Pinsareconnectionpointsforschematicsymbols.Smd’s arethepadsofsurfacemounteddevices(usedinpackages). AirwirescanbedeletedwiththeDELETEcommandifyoudon’tworkun- derForward&BackAnnotationcontrol(insuchacaseyouhavetodeletea signalbydeletingtherelatednetsintheschematic). PleasenotethatUNDOandREDOfunctionunderthecontrolofthe Forward&BackAnnotation,too.

DefiningSignalClasses TheCLASScommandallowsyoutodefinesignalclassesandtoassigncer- tainvaluesconcerningwirewidthandminimumdistancetoothersignals, andminimumdrilldiameterforviastoeachclass. Forexample,powersupplysignalsmayberoutedwithagreaterwirewidth (highercurrent)oragreatervalueforclearance(highervoltage). Theautorouterusesthesevaluesforrouting,too. Thedefaultvalueis0forallattributes(noclassesdefined).Thismeansthe valuessetintheDesignRulesarevalidforallsignals. Variousclassesareusedintheboardfile hexapodu.brd.

48 EAGLE-TutorialVersion4.1

CreatingaBoardfromaSchematic IfyouhavetheSchematicModuleandtheschematicisalreadydrawn,you onlyneedafewstepstogetthesameresultasthatdescribedintheprevi- oussection.

GeneratingaBoardFile Loadthefile demo1.sch andclickontheBOARDicon:

Withthiscommandyoucreateaboardfilewiththesamenameasthe loadedschematic(demo1.brd).Answerthe Createfile? questionwith • OK. MaximizetheLayoutEditorwindow. Thewhiteframeontherightofthewindowsymbolizestheboardoutlines. Itismadeupofwiresinthelayer20, Dimension. • MOVE,and • therightverticaledgeoftheboardshapesomewhereinthe middle.Movethecursoralittletotheleftand • . Youhavenowreducedthesizeoftheboard.Youcanchangetheboardsize atanytime. OfcourseyoucouldalsoDELETEtheborderandimport,forexample, predefinedboardoutlinesviaascriptfile(SCRIPTcommand).

ComponentPlacement ClickontheZoom-to-Fiticon,tofitthedrawinginthewindow.Thecom- ponentsarelocatedontheleftsideoftheboard. • MOVE, • thebiggestICsomewhereinitscenterandmovethecursorin- sidetheboardoutlines.Thecomponentandtheairwiresremainattachedto thecursor.Presstherightmousebuttonifyouwanttorotatethecompo- nent. • tofixthepositionofthecomponent.Placeallofthecomponents usingtheMOVEcommand. Anotherwaytomoveanelementistoselectitbyitsname. • MOVE and typeinthecommandline. JP1 Thiselementisnowattachedtothemousecursor. ClicktheRATSNESTicon tocalculatetheairwiressothattheyshowthe shortestpossibleconnections.Repeatthiscommandwheneveryouwantto checkhowgoodyourcurrentplacementis(shortairwires,notwisted busesetc.).

49 EAGLE-TutorialVersion4.1

Pleasenote: AftergeneratingaboardfilewiththeBOARDcommandEAGLEarrangesall elementsontheleftsideoftheboardoutlineinthenegativecoordinatesarea. Inthefreewareforexample,youmaydropelementswithinthelimitsofabout 3.9x3.2inch.Toroutethelayoutortousetheautorouteryouhavetomove allcomponentsintothisareafirst.

Autorouter:ABriefExample IfyouwouldliketoseeasmalldemooftheAutorouter,clicktheiconfor theAUTOcommandinthecommandtoolbar.ChooseafinerRouting Grid(default50mil)ifnecessaryandclickthe OK button. Itshouldbefinishedinnotimeatall,providedtheplacementisnottoo bad(watchthestatusbar).Ifitistakingtoolong,interrupttheAutorouter byclickingthestopsignicon.Confirmthequestion Interrupt? with • Yes. Ifyoudon’tliketheresult,reverseitwiththecommand • RIPUP. Ifyouwouldliketochangecertainroutedtracksintoairwires,clickthese tracksandstarttheripupprocessbyaclickonthetrafficlighticoninthe actiontoolbar. Ifyouwouldliketochangeallroutedtracksintoairwires, • theRIPUP iconandthen • thetrafficlighticon.Confirmthequestion Ripupallsig- nals? with • OK. YoucanstarttheAutorouteratanytime,regardlessofwhetherthereare routedtracksoronlyairwiresontheboard.Typically,supplysignalsand othercriticalsignalpathsareroutedmanually,beforetheAutorouteris used. Trackswhicharelayedoutbeforestartingtheautorouterwon'tbechanged anymore.

RoutingManually TheROUTEcommandchangestheairwiresintoroutedtracks. • ROUTE inthecommandtoolbar. • startingpointofanairwire. AsfortheWIREcommand,furtherparameters,suchaswidthortarget layer,canbeenteredwithhelpoftheparametertoolbar. AllvaluesrelatetothecurrentunitselectedwiththeGRIDcommand. Movethecursortoroutethesignal, • tofixthecurrentsegment. • • tofix thelastsegmentandendtherouteoperationforthewholesignal.

50 EAGLE-TutorialVersion4.1

SincetheROUTEcommandisstillactive,youcanimmediatelystartrout- inganewsignal. WhiletheROUTEcommandisactive,itispossibletochangethebend modebetweentwowiresegmentswiththerightmousebutton.Simplytry thevariousoptions;itisalsopossibletolayouttracksasarcs(seealsoSET command,parameter Wire_Bend). Ifyouchangethetargetlayerduringtheroutingprocessbyselectingit fromthecomboboxintheparametertoolbar,thefollowingwiresegments willbedrawnonthenewlayer.Thenecessaryvia-holewillbegenerated automaticallybyEAGLE. Incaseofendingatrackatthesamepositionasanothertrackwhichbe- longstothesamesignalbutliesinanothersignallayer,EAGLEdoesnot automaticallysetavia.Tohaveoneplaced,keepthe Shift keypressedwhile endingthewire. WhilelayingouttracksEAGLEcalculatesatanytimetheshortestconnec- tiontothenextpointwhichbelongstothesamesignalandshowsthiswith anairwire. UsetheMITERcommandtobevelwirebends.Youcandothiswitha straightlineorwithanarc,whichwillbedeterminedbythemiterradius. Somewirebendmodesareinfluencedbythemiterradius.Moredetailscan befoundontheMITER,SET,WIREcommands'helppages. TheEAGLEFreewarerespectivelytheLighteditiondoesnotsupport blindandburiedviasduetotheirlimitationofthenumbersofsignallayers. Moreinformationaboutthiscanbefoundinthehelpfunctionandinthe referencemanual.

BoardChanges Onceyouhavecompletedtheroutingoftheboardyoucanmakechanges, e.g.youcan: • moveandarrangewiresegmentsandcomponentswithMOVEand SPLIT, • usetheRIPUPcommandtochangeroutedtrackstoairwires, • useDELETEtoerasesignals(onlywithoutForward&Back annotation), • replacepackagevariantswithCHANGEPACKAGEorREPLACE (withoutschematic).In demo3.brd thepackageofIC1hasbeen replacedbyaSMDpackage, • modifytheDesignRules(forexample,Restringsettings), • useSMASHtodetachtextsfromcomponentsinordertoMOVE,

51 EAGLE-TutorialVersion4.1

ROTATE,orCHANGEthem, • miterwirejoints.

FurtherUsageoftheLayoutEditor Inthissectionyouwillmodifyarouteddemoboard.Loadthefile demo2.brd,andenlargetheeditorwindow. Nextafewimportantcommandswillberepeated.

The DISPLAYCommand Itisofteneasiertomaintainagoodoverviewifsomeinformationisnot shown. • DISPLAY andselectwithyourmousethelayer21, tPlace.Thislayercontainsinfor- mationforthetopsidesilkscreenoftheboard.Byselectingordeselecting it,thelayers23 tOrigins,25 tNames,27 tValues,and51 tDocu willbeshown orhidden. Toactivatethischange, • OK.

The MOVECommand WiththeMOVEcommandyoucanmoveforinstancewires(linesorsignal tracks).Selectingawiresegmentnearanendpointwillmovetheendpoint ofthewire.Keepthe Ctrl keypressedwhileselectingitandtheendpoint willjumponthecurrentgrid. Selectingthewireinthemiddlewillmoveitinparallel.Keepingthe Ctrl keypressedchangesthewireintoanarc. Youcanalsomovevias(through-holeswhichconnectTopandBottom layertracks).Whenmovingvias,theattachedwiresarealsomoved. TomovecomponentsplacedontheToplayer,layer23 tOrigins hastobe displayed.ThesameappliestocomponentsplacedontheBottomlayerand layer24 bOrigins. AslongastheMOVEcommandisactive,youcanrotatetheobjectwith therightmousebuttonby90degreesorbyanyanglegiveninthe Angle comboboxintheparametertoolbar. The Spin flag(onlyavailableintheLayoutEditor)determinesiftextswith arotationof180degreeswillbeshownupsidedownorstayreadablefrom thebottomofthedrawing(default).ThisalsoworkswiththeROTATE command. Thestatusbarshowsinformationabouttheselectedobject.

52 EAGLE-TutorialVersion4.1

TheGROUPCommand OneofthemostusefulcommandsofEAGLEistheGROUPcommand.It allowsyoutoselectseveralobjects,changetheirattributesandmove,ro- tateormirrorthemallatonce.TousetheGROUPcommand • GROUP Then,byclickingandreleasingtheleftmousebutton,drawapolygon aroundagroupofobjectsandclosethepolygonbypressingtheright mousebutton(don’tusethePOLYGONcommand).Theselectedobjects arenowhighlighted. Pleasemakesurethatyouonlyselectobjectswhichareinavisiblelayer.Pack- agesonthe Toplayercanonlybeselectediflayer23 tOrigins isvisible,and packagesatthe Bottomlayercanonlybeselectediflayer24 bOrigins isvisible. UsetheDISPLAYcommandtoshoworhidelayers. NextselecttheMOVEcommandandusethe right mousebuttontoattach thegrouptothecursor.Thiswayyoucanmovealltheobjectssimultane- ously,rotatethemwiththerightmousebuttonandfixthemwiththeleft mousebutton. AfteragrouphasbeendefinedwiththeGROUPcommand,theattributes ofthecontainedobjectscanbechangedwiththeCHANGEcommand.Se- lectagroupthatcontainssomewires, • CHANGE inthecommandtoolbar, • Width,and • 0.032.Thenclickthe right mousebuttonsomewhereinthe editorwindow.YoucanreversetheactionwiththeUNDOcommand. ArectangulargroupcanbedefinedbyselectingtheGROUPicon,clicking onecorneroftheareaofinterest,keepingthemousebuttonpressedand draggingthemousebuttonuntiltherectanglecontainsthedesiredobjects.

TheSPLITCommand WiththeSPLITcommandyouaddabendinawire. • SPLIT inthecommandtoolbar • onawiresegmentnearitstargetpoint Dragthewireonthescreenabit.Youwillseethatthelongersegmentre- mainsasadirectlinetotheselectedpoint,whiletheshortersegmentsplits intotwo.Theangleofthetwonewsegmentsiscontrolledwiththeright mousebutton. • fixesthewiresegments.

TheCHANGECommand UsetheCHANGEcommand,tochangethewidthofwiresortomovea wiretoanotherlayer.Tochangethewidthofthewire:

53 EAGLE-TutorialVersion4.1

• CHANGE • WIDTH inthepopupmenu • thevalueforthenewwidth Thenmovethecursortothewiresegmenttobechangedand •. Tochangethewidthtoavaluenotpresentinthemenu,e.g.to0.23inches, • theentry ... .Awindowpopsupwhereyoucantypeinthevalue. Youcouldalsousethecommandline: CHANGEWIDTH.23 ← andclickthewiresegment. Tomoveawiresegmenttoanotherlayer: • CHANGE • LAYER • desiredlayer • wiresegment Incaseaviaisneededtocompletethesignalpath,EAGLEwillautomati- callyinsertit.Ifaviabecomesredundant,EAGLEwillautomaticallyre- moveit.

TheROUTECommand UsetheROUTEcommandtochangeanairwireintoawire.Youcanfix thepositionofawiresegmentwith • ,thenchangedirectionandfixthe nextsegmentuntiltheairwireiscompleted. Seealsothesection RoutingManually somepagesbefore.

The RIPUPCommand IfyouwouldliketoturnforexampletheroutedsignaltracksGNDand VCCintoairwires(thisprocessiscalled ripup),clicktheRIPUPiconin thecommandtoolbarandtype: GNDVCC ← PressingF9twicereversestheaction. IfyouwouldliketoripupallsignalsexceptGNDandVCC,type: !GNDVCC ← aftertheRIPUPcommandhasbeenactivated.

54 EAGLE-TutorialVersion4.1

The SHOWCommand UsetheSHOWcommandtohighlightairwires,wiresorcomponents. ClickontheZoom-to-fiticonandthentheSHOWicon.Thentype: IC1 ← tolocateIC1.Thestatusbarshowsinformationabouttheobject.

RefreshScreen Usethe F2 keytorefreshthescreencontentsorclicktheRedrawicon.

Undo/RedoFunction AllactionsmentionedcanbereversedwiththeUNDOiconintheaction toolbar(F9)andrepeatedwiththeREDOicon(F10).

InnerLayers Innerlayers(Route2...15)canbeusedforroutinginthesamewayasthe TopandBottomlayers. Thisisnotpossibleinthefreeware(lightedition).

SupplyLayers Onlypossibleinstandardandprofessionaledition! Innerlayers(Route2..15)canbeusedasasignalorgroundplanesimplyby renamingthelayer $signalname, whenallsignalswiththatnamewillthen beconnectedtothislayer.Todemonstratethisfeatureloadtheboardfile demo2.brd andtype: SHOWGND ← TheGNDsignalwillbehighlighted. Thentype: RIPUPGND ← ThesignalGNDwillnowbedisplayedasairwiresonly. Nowwewilldefinelayer2asthegroundlayerbynamingit $GND (the nameofthesignalmustbeprecededwiththe$): LAYER2$GND ← YoucanalsoselectLayer2 Route2 intheDISPLAYmenu,clickthe Change button,activatetheoption SupplyLayer andtypeinthename GND. ClicktheRATSNESTicontomaketheairwiresofthesignalGND

55 EAGLE-TutorialVersion4.1 disappear. Tohavealookattheresultswitchofalllayersexceptforthe$GNDlayer. ThiscanbeachievedbyclickingontheDISPLAYicon,orsimplybytyp- ingthefollowingcommandonthecommandline: DISPLAYNONE$GND ← Rememberyoucanuselowercasecharactersandabbreviatekeywords.So youcantype disnone$gnd ← Nowtype SHOWGND ← andthethermalsymbolswhichconnecttheGNDsignaltothesupply layerarehighlighted.Theannulus(round)symbolsisolatethethrough- holesnotbelongingtotheGNDsignal. InourexampletheelementsC1andC2don'thaveaconnectiontothein- nerlayeryet.YouhavetoROUTEashorttrackoutofthesmdandplacea VIAonthetracksend.Nowtheconnectiontotheinnerlayerismade. Supplylayersdefinedwith$nameareplottedinversely,i.e.,objectswiththe colorofthesupplylayerdefinecopper-freeareas.Thethermalsymbolsconnect thegroundplanewiththethrough-holeusingfourconductingpaths.

CopperPouringwiththePOLYGONCommand ThePOLYGONcommandenablesyoutodefineareaswhichbelongtoa signal,connectingalloftherelatedpadstothissignalwiththermalsym- bols.Suchasignalretainsauser-defineddistancetoanyothersignalpath. Youcandesignlayersthatcontainmultiplepolygonssuchasdifferent groundareas,andyoucandesignpolygonsonmultiplelayers. TodemonstratethisfeatureofEAGLE,let’sfilltheToplayerofaboard withtheGNDsignal.Reloadtheboard demo2.brd onceagain,enlargethe window,andripuptheGNDsignal: RIPUPGND ← UsetheDISPLAYcommandtoswitchonthelayer1 Top, 17 Pads, 18 Vias, and20 Dimension.Usethebutton None, inthemenu,toswitchoff thedisplayofallotherlayersfirst. ClickthePOLYGONiconinthecommandtoolbarandtype: GND ← toprovidethename GND forthepolygontobedefined.Onlythenwillit belongtotheGNDsignal.

56 EAGLE-TutorialVersion4.1

SelecttheLayer Top fromthecomboboxintheparametertoolbar.Then: • lefthanduppercorneroftheboardoutlines, • righthanduppercorner, • righthandlowercorner, • • lefthandlowercorner. Thedoubleclickclosesthepolygon. Tostartthecalculationofthefilledarea,clicktheRATSNESTicon. Sincethisisaverycomplexoperationitcantakesometime. Asbefore,thepadsbelongingtotheGNDsignalareconnectedwithther- malsymbols.Checkthiswith: SHOWGND ← Inthiscaseeverythingshowninthelayercoloriscopper,sincethislayeris notplottedinversely(onlysupplylayersdefinedwith $name). Afteraboardhasbeenloaded,polygonsaredisplayedwiththeiroutlines.The filledareasaredisplayedonlyaftertheRATSNESTcommandhasbeenexe- cuted.Inversely,theRIPUPcommandandasingleclickontheedgeofapoly- gonresultsintheoutlinedisplayofthisparticularpolygon. CallupthehelpfunctiontofindoutmoreaboutthePOLYGONcom- mand.

57 EAGLE-TutorialVersion4.1

15 Autorouter

NoAutorouteronearthwilllayyourboardoutexactlyasyouwouldlike. Butitcanfreeyouofalotofboringwork.Inthissectionwewanttodem- onstratethatyoucaneasilycombinemanualandautomatedrouting. Loadtheboard hexapodu.brd. Switchofflayer21 tPlace usingtheDISPLAYcommand,sothatthecom- ponentsarenotshownanymore. ThisboardcontainsmanuallyroutedsignalsnamedAC1andAC2.Rectan- glesinthelayers41, tRestrict,and42, bRestrict,havebeenusedtocreatere- strictedareasfortheAutorouter.WithintheseareastheAutorouterisnot allowedtoroutetracksontheToporBottomlayers.ComponentB1is coveredbyarestrictedareadrawninlayer43, vRestrict.Thismeansthe Autoroutermustnotsetviasthere. StarttheAutorouterbyclickingtheAUTOiconinthecommandtoolbar. Apopupmenuappearswhereyoucanenterindividualsettings(seehelp). Youshouldchoosearoutinggridof10mil(0.254mm)for hexapodu.brd. Youcanalsoloadtheautorouterparametersforthisfilefromthecontrol file hexapodu.ctl byclickingthe Load.. button. Aswewanttoroutealloftheunroutedsignals • OK. Incaseyoudon’twanttochangethesettingsoftheAutorouteryoucan startitbytyping: AUTO; ← inthecommandline.Themenuisskippedinthiscase. Watchthestatusmessagesappearinginthestatusbar.Theyinformyou, forinstance,ofhowmanysignalshavebeenrouted,orofhowmanyvias havebeenplacedatthemoment.Youwillnoticethatthenumberofvias goesdownduringtheOptimizepasses. IfyouwanttointerrupttheAutorouterclickonthestopicon. Aprotocoloftheroutingrunisstoredinthefile hexapodu.pro.Loaditinto atexteditorwindowtohavealookatit. TheboardroutedbytheAutoroutercanbeeditedlikeanyotherboard. Shouldtheroutingresultbelessthan100%,youcanripupafewcritical signalsandroutesomeoftheremainingairwiresmanually.Ifyouwantto restoretheoriginalstatus,turnroutedtracksintoairwires(withtheexcep- tionofAC1andAC2)withthecommand

58 EAGLE-TutorialVersion4.1

RIPUP!AC1AC2 ← TheautorouterusesthewidthgivenintheDesignRules(Þ Edit/Design Rules, Sizes tab, Minimumwidth)forhistracks.Iftherearevaluesgivenin theCLASScommandtodefinevariousnetclasses(asintheexamplefile hexapod.brd)theautorouterwillalsotakecareofthem.Inthiscasethe greatervaluewillbetaken. Todefinerestrictedareasfortheautorouteruselayer41, tRestrict,forthe Toplayer,respectivelylayer42, bRestrict,fortheBottomlayer. Restrictedareasinlayer43, vRestrict,forbidssettingvias. Theautorouterisnotabletorouteroundedtracks.

59 EAGLE-TutorialVersion4.1

16 DesignRuleCheck

Whenstartingthelayoutdevelopmentyoushouldalreadythinkaboutthe DesignRules.Rulesthathavetobeconfirmedwiththeboardmanufac- tureraswell.YoucandefinethemwiththehelpoftheDRCdialog.Click theDRCiconandverifyorchangethedefaultvalues.Aclickintooneof theparameterfieldsshowsadescribingpicture (forexampleinthe Restring tab). • Apply tosavetheDesignRulesintheboardfile. Check startsthe DesignRuleCheck.The Select buttonallowsyoutoselectacertainareaof thelayouttobechecked.Simplydragarectanglewiththemousearound thearea. TheDRCcommandchecksiftheboardcorrespondswiththeuser-defined DesignRules. Loadthefile demo3.brd.Torunthetest,clickontheDRCiconinthe commandtoolbar.AmenuappearswhichallowsyoutosetupyourDesign Rules. • Check tostarttheDRC. Afterfinishingthechecksthestatusbarshouldshowthemessage Noerrors.NowyoucanbesuretheboardmatchesyourDesignRules. Movearedwireacrossafewotherredwires.ThenstarttheDRConce againbytyping DRC; ← ThesemicolonpreventstheDRCmenufromappearing. Thestatusbarshowsthenumberoferrors.Anerrorswindowwillopen automaticallyshowinganerrorlist.Assoonasyouhavecorrectedtheer- rorsinthelayout,youcandeletethembyclickingthebutton Delall. PressF1,tofindoutmoreabouttheERRORScommand. IfyoufindobjectsinyourboardwhichcannotbedeletedwiththeDELETE commanditmightbetheresultofaDRC.Todeletethemtypeinthecom- mandline: ERRORSCLEAR

60 EAGLE-TutorialVersion4.1

17 Libraries

Thecomponentsyouareaddingtoschematicsandboardsarestoredinli- braries.TheLibraryEditorhasthesameuserinterfaceastheSchematicand theLayoutEditor.Therefore,youonlyneedtoknowafewadditional commandsfordefiningyourowncomponents. Alibrarynormallyconsistsofthreebasicelements: • Package:Thefootprintinthelayout • Symbol:Thedrawingfortheschematic • Device:Therealcomponent,consistingofsymbolsandpackages Hereashortexampleforlibrarycreation: Openanewlibraryfileviathemenu File/New/Library intheControl Panel.TheLibraryEditorwindowsopens.

ResistorPackage

Selectthepackageeditingmodeviatheiconintheactiontoolbar,and enterthepackagename R-10 inthe New field.Answerthequestion Create newpackage‘R-10’? with Yes.Laterwhencreatinganewsymbolandanew deviceyouwillagainhavetoanswerthecorrespondingquestionswith Yes.

UsetheGRIDcommandtosetanappropriategridsizeforthepad placement.0.05inch(i.e.50mil)isusualforstandardcomponentswith leadwires.

Foraresistorwithlead-wires,select PAD,andsetthepadshapeand thedrilldiameterintheparametertoolbar.Defaultvalueforpaddiameter is0.Itshouldnotbechanged.Thefinaldiameterinthelayoutresultsfrom thevaluesgivenintheDesignRules. Thenplacetwopadsatthedesired distance.Theoriginofthedrawingwilllaterbetheidentifyingpointwith whichacomponentisselected.Forthisreasonitshouldbesomewhere nearthecenterofthedevice.

ForaSMDresistor,selectSMD,andsetthepaddimensionsinthepa- rametertoolbar.Youcaneitherselectoneoftheofferedvalues,ordirectly typethelengthandbreadthintotheentryfield. Select Top asthelayer,evenifthecomponentwilllaterbeplacedonthe undersideoftheboard.SMDcomponentsarelocatedontheothersideofa boardusingtheMIRRORcommand.Thismovestheelementsinallthe t..-layersintothecorresponding b..-layers. PlacethetwoSMDpads(whichinEAGLEarejustcalledSMDs)atthe

61 EAGLE-TutorialVersion4.1 desireddistance. TouseroundSMDs(BGAs)defineasquareonefirst,thenCHANGEthe valuefor Roundness =100%.

Youcannowenterthenames,suchas 1 and 2,forthepadsorSMDs usingtheNAMEcommand. Adifferentprocedureishoweverrecommendedforcomponentswith manysequentiallynumberedpads: SelectthePADcommand,typeinthenameofthefirstpad,e.g. '1' (thein- vertedcommasmustalsobeentered),thenplacethepadsinsequence.

NowusetheWIREcommandtodrawthesilkscreensymbolinlayer 21 tPlace.Thislayercontainswhatwillbeprintedontheboard.Itisupto youhowmuchdetailyougivetothesymbol.Setafinergridsizeifithelps. Taketheinformationprovidedin library.txt (in eagle/doc)asaguidelinefor thedesignofcomponents.YoumayalsousetheARC,CIRCLE,RECT andPOLYGONcommandtodrawsilkscreensymbols. Pleasetakecareinlayer21 tPlace nottocoveranyareasthathavetobesol- dered.Inlayer51 tDocu amorerealisticappearancecanbegivenwhichis notsubjecttothislimitation.Layer51 tDocu isnotusedtoprintontothe boarditself,butisasupplementtothegraphicalpresentationwhichmight beusedforprintdocumentation.Intheexampleoftheresistor,thesymbol canbedrawninlayer21 tPlace,butthewires,whichgooverthepads,are drawninlayer51 tDocu.

WiththeTEXTcommandyouplacethetexts >NAME inlayer25 tNames and >VALUE inlayer27 tValues inthoseplaceswhereinthe boardtheactualnameandtheactualvaluearetoappear. SMASHandMOVEcanbeusedlatertochangethepositionofthistext relativetothepackagesymbolontheboard.

TheCHANGEcommandcanbeusedatalaterstagetoalterobject propertiessuchasthestrokethicknessoftexts(ratio),textheight,orthe layerinwhichtheobjectislocated. Ifyouwanttochangethepropertiesofseveralobjectsatonego,definea groupwiththeGROUPcommand,clicktheCHANGEcommand,select theparameterandthevalue,andclickintothegroupwiththe right mouse button. Example:UseGROUPtodefineagroupthatcontainsbothpads,then selectCHANGEandSHAPE/SQUARE.Clickonthedrawingsurface withtherightmousebutton.Theshapeofbothpadschanges.

62 EAGLE-TutorialVersion4.1

TheDESCRIPTIONcommandallowsaninfotextaboutthepackage.This textandthepackage'snamewillbetakeninconsiderationbythesearch functionoftheADDcommand.

ResistorSymbol

Selectthesymboleditingmode,andenterthesymbolname R inthe New field.Thisnameonlyhasameaninginternaltotheprogram,anddoes notappearintheschematic. Nowcheckthat0.1inchissetasthegridsize.Thepinsinthesymbol must beplacedonthisgrid,sincethisiswhatEAGLEexpects.

SelectthePINcommand.Youcannowsetthepropertiesofthesepins intheparametertoolbar,beforeplacingthemwiththeleftmousebutton. AllthesepropertiescanbechangedatalaterstagewiththeCHANGE command.Groupscanagainbedefined(GROUP)whosepropertiescan thenbealteredwithCHANGEandthe right mousebutton.Seehelpfunc- tionforfurtherdetails.

TheNAMEcommandallowsyoutonamepinsaftertheyhavebeen placed.

Theschematicsymbolisdrawninlayer94 Symbols usingWIRE andtheotherdrawingcommands.Placethetexts >NAME and >VALUE inthelayer95 Names and96 Values (TEXTcommand).Placethemwhere thenameandvalueofthecomponentaretoappearintheschematic. Forfineadjustmentchooseafinergrid.ThiscanbedonewhiletheTEXT commandisactive.Afterwardschangethegridtodefaultvalue0.1inch again.

ResistorDevice

Createthenewdevice R-10 withthisicon.Whenyoulaterusethe ADDcommandtofetchthecomponentintotheschematic,youwillselect itbyusingthisname.Itisonlyacoincidencethatinthiscasethenameof thepackageandthenameofthedevicearethesame. Todefinedevicesthatareavailableinseveraltechnologiesandpackagevari- antsyouhavetousewildcardsinthedevicenametodeterminetheposi- tionofthesenames. * representsthepositionofthetechnologyname, ? thepackagename. Definingforexampleadevicelikea7400intwotechnologies(L, LS)the correctdevicenameis 74*00.Thenameofthepackagevariantwillbe

63 EAGLE-TutorialVersion4.1 addedattheendofthenameautomatically.Ifyouwishtoseethepackage variant'sname,forexample,atthebeginningofthedevicenameyouhave tousethe?likethis: ?74*00. Clickthe New buttonontherightlowerareaoftheDeviceEditorwindow toassignapackage.Forourexample,pleasechoosethepackage R-10.To allowfurtherpackagevariantsclick New again. ThePREFIXcommandisusedtospecifyaprefixforaname.Thename itselfwillinitiallybeautomaticallyallocatedintheschematic.Foraresistor thiswould,naturallyenough,be R.Theresistorswillthenbeidentifiedas R1,R2,R3etc..ThenamescanbealteredatanytimewiththeNAME command. YoucanspecifywiththeVALUEcommandwhetherthedevice’svaluecan bealteredintheschematicorintheboard.Valuemustbe On forresistors. Forotherdevicesitmaybewisetosetvalue Off.

Thepreviouslydefinedresistorsymbolisfetchedintothedevicewith theADDcommand. Ifadeviceconsistsofseveralschematicsymbolswhichcanbeplacedinde- pendentlyofoneanotherinthecircuit(inEAGLEtheseareknownas gates)theneachgateistobeindividuallybroughtintotheschematicwith theADDcommand. Setanaddlevelof Next andaswaplevelof 0 intheparametertoolbar,and thenplacethegateneartheorigin. Theswaplevelofagatebehavesverymuchliketheswaplevelofapin.The valueof0meansthatthegatecannotbeexchangedforanothergateinthe device.Avaluegreaterthan0meansthatthegatecanbeswappedwithin theschematicforanothergateinthesamedeviceandhavingthesame swaplevel.ThecommandrequiredforthisisGATESWAP.

YoucanchangethenameofthegateorgateswiththeNAMEcom- mand.Thenameisunimportantforadevicewithonlyonegate,sinceit doesnotappearintheschematic.Ifadeviceconsistsofseveralgatesthe element'snameintheschematicwillbeexpandedbythegatename. Example: ThegatesarecalledA,B,CandD,andthenameofthecomponentinthe schematicisIC1,sothenameswhichappearareIC1A,IC1B,IC1Cand IC1D. WiththeCONNECTcommandyouspecifywhichpinsaretakentowhich packagepads. Clickthe Connect buttonnow.

64 EAGLE-TutorialVersion4.1

TheConnectwindow InthisexampletheresistorgatehasbeennamedG$1automatically.Thisis thereasonwhyyouseethepinnameG$1.1andG$1.2inthecolumn Pins. Thecolumn Pad showsthepadsplacedinthepackage.Clickonapinanda padentryandclickthe Connect button.Ifyouwanttodisconnectapin fromapad,selectthepairinthe Connection columnandclick Disconnect. OK endstheCONNECTcommandandclosesthewindow.

TheDeviceEditor Youcanenterinformationconcerningthedeviceafterclickingthe DESCRIPTIONcommand.Theenteredtextwillbedisplayedinthe

65 EAGLE-TutorialVersion4.1

ControlPanel,whenyouselectthedeviceinthetreeview.Itwillalsobe checkedbythesearchfunctionoftheADDcommand.

Nowthedefinitionoftheresistoriscomplete.Youcanuseitinasche- maticnow. KeepinmindtoloadthenewlibrarywiththeUSEcommand.Otherwiseitis notavailableforADD.

66 EAGLE-TutorialVersion4.1

18 OutputofDrawingsandManufacturingData

EAGLEcanoutputdrawings,forexamplefordocumentationpurposes, usingthePRINTcommand.Thiscommandcanbefoundinthe File menus oftheSchematicorLayoutEditor. YoucanusetheprintersdefinedunderWindowswiththiscommand.The LinuxversiongeneratesPostscriptfilesthatcanbesentto lpr ortoafile. Aprintoutofthedrawingintheactiveeditorwindowwiththeactuallayer settings(DISPLAYcommand)willbegenerated. FilmandmanufacturingdataaregeneratedwiththeCAMProcessor.Start itwiththeiconintheactiontoolbaroftheLayoutEditorwindow. TheCAMProcessorusesitsowndrivers,whichcanbedefinedormodified bytheuser(seefile eagle.def indirectory eagle/bin). Dataforabillofmaterial,formounting,millingortestingmachinesetc. canbegeneratedwiththehelpofEAGLEUserLanguagePrograms.Infor- mationaboutULP'scanbefoundinthefileheadersorwiththehelpofthe descriptionsintheControlPanel.

OutputaSchematicwiththePRINTCommand Theschematic demo1.sch istobeprintedinblack/whiteandfullformaton onepage. Loadthefile demo1.sch andchoosethelayerswhichshouldappearonthe print-outwiththeDISPLAYcommand.Alllayersvisibleonthescreenwill beprinted. ClickthePRINTiconintheactiontoolbar.Checktheboxes Black, Solid and Rotate (asthedrawingisinlandscapeformat).Theboxes Mirror and Upsidedown arenotmarked. Forboth Scalefactor and Pagelimit typein 1.Thisspecifiesthatthedraw- ingistobeoutputatascalefactorof1,provideditfitsontoonepage.If not,EAGLEchangesthescalefactor,sothatthedrawingdoesfitontoone page.With Pagelimit 0thedrawingwillalwaysbeprintedwiththesetscale factor. Theprintercanbeselectedbyusingthebutton Printer. Thebutton Page leadsyoutothepagesetupparameters.Ifthebox Caption ischecked,thedrawingwillbeprintedwithafooter,containingthefile name,date,time,andscalefactor.

67 EAGLE-TutorialVersion4.1

GeneratingImageFilesforDocumentationPurpose TogenerateimagefilesusetheEXPORTcommandwithitsIMAGEop- tion.Youcangeneratedifferentpixelgraphicfileformats(likebmp, tif, pngandothers)orusetheclipboard.

GeneratingGerberDatawiththeCAMProcessor Thesamestepsareusuallyrequiredforeachboardwheneverfilmsand manufacturingdataaregenerated.ThisprocesscanbedefinedasaCAM Processorjob. Thefile gerber.cam,whichcanbefoundinthedefaultsubdirectoryfor CAMjobs,automatestheoutputofGerberdatafordoublesidedboards. Attention: TheprocessdescribedcanonlybeusedforGerberphotoplotters with flexible aperturewheels,notforphotoplotterswithfixedaperturewheels. Pleasecontactyourboardhousetoconfirmwhichdataareneeded. LoadthejobintotheCAMProcessor,eitherbydouble-clickingtheentry withthename gerber.cam intheControlPanel'streeview(CAMJobs),or byclickingtheCAMProcessoriconintheLayoutEditorwindowandse- lecting gerber.cam inthefiledialog(⇒ File/Open/Job). IncaseyouhavestartedtheCAMprocessorfromtheControlPanel,load theboardfile demo3.brd: ⇒ File/Open/Board and • • demo3.brd Clickthebutton ProcessJob andconfirmbothprompts Deletename.$$$... and Morethan... with • OK. Nowallofthenecessaryfileswillbewrittenintothe Project directory (wherethedrawingandboardfilesforthisprojectarelocated). Thefileshavethefollowingmeanings: demo3.cmp Componentside demo3.sol Solderside demo3.plc Silkscreenforcomponentside demo3.stc Solderingmaskforthecomponentside demo3.sts Solderingmaskforthesolderside demo3.whl Aperturewheelfile demo3.gpi Informationfile,notrelevant demo3.$$$ Temporaryfile,tobedeleted Thefirstsixfilesneedtobesenttoyourboardmanufacturer.

68 EAGLE-TutorialVersion4.1

GeneratingDrillData Drillingdatacanbegeneratedaccordinglybyusingthejob excellon.cam. Thisjobconsistsofonesinglestep.TheEXCELLONdevicegeneratesa filethatcontainsbothdrilldataanddrilltable.Theoutputfilehasthefile extension.drd. Thisfilehasalsotobesenttoyourboardmanufacturer. FurtherinformationcanbefoundontheCAMProcessorhelppages.

FurtherManufacturingData EAGLEprovidesanumberofsocalledUserLanguagePrograms,which areabletogenerateavarietyofdata.Forinstance,dataformountingma- chines,testequipment,statisticdatafortheboardhouse(numberofdrills, parts,layerandsoon),billsofmaterial,orevendataformillingaproto- typeboard. AlistofallUserLanguageProgramscanbefoundinthetreeviewofthe ControlPanel, UserLanguagePrograms branch.Selectanentrytogetthe descriptionontheright. Moreinformationcanbefoundinthenextchapterofthistutorial.

69 EAGLE-TutorialVersion4.1

19 DataExchange

TheEAGLEUserLanguage EAGLEcomeswithanintegratedC-likeUserLanguageinterpreterwhich hasaccesstovirtuallyalldata(inEAGLEorexternalfiles).UserLanguage programscancreateanyfiletypeandthereforegenerateanydataformat usedbyothersoftwareorhardware. Agoodexampleisthefile bom.ulp whichgeneratesabillofmaterial. WiththeEAGLEUserLanguageonehasapowerfultooltodefineuser- specificcommandswhichevencouldbeassigned,forexample,toacertain functionkey. Pleasehavealookatthefileswiththeextension *.ulp andtheUserLan- guagesectionofthehelpfunctiontogetabetterideaofthepossibilitiesin- herentintheprogram. AdditionalUserLanguageprogramscanbefoundonourwebpages: http://www.cadsoftusa.com/download.htm.

ScriptFiles ¾ AFlexibleInputInterface ScriptfilesaretextfileswhichcancontainanyEAGLEcommand(see SCRIPTcommand).Scriptfilesenabletheusertoimplementhisown functions.ThusyouhaveaflexibleinputinterfacedefinedbytheEAGLE commandsyntax(seeEAGLEhelp). StarttheLibraryEditoranduseEXPORTSCRIPTafterloadingalibrary togenerateascriptfile.ThisisagoodexampletolearnabouttheEAGLE commandsyntax.

70