Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > f2f28f61487f3042d93877451f0a311f > files > 112

geda-docs-1.8.2-4.mga5.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <title></title>
  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />
  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />
  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>


<h1 class="sectionedit546"><a name="geda_gaf_symbol_creation" id="geda_gaf_symbol_creation">gEDA/gaf Symbol Creation</a></h1>
<div class="level1">

<p>
The latest version of this document may be found at: <a href="http://www.geda-project.org/wiki/geda:gschem_symbol_creation" class="urlextern" title="http://www.geda-project.org/wiki/geda:gschem_symbol_creation"  rel="nofollow">http://www.geda-project.org/wiki/geda:gschem_symbol_creation</a><br/>

This document is released under the <a href="geda-gfdl.html" class="wikilink1" title="geda-gfdl.html">GNU Free Documentation License (GFDL)</a>.<br/>

</p>

</div>
<!-- EDIT546 SECTION "gEDA/gaf Symbol Creation" [1-248] -->
<h2 class="sectionedit547"><a name="overview" id="overview">Overview</a></h2>
<div class="level2">

<p>
This document describes the creation of component symbols, including style conventions, and hints/tips and things to look out for when drawing symbols for the gEDA/gaf system.
</p>

</div>
<!-- EDIT547 SECTION "Overview" [249-447] -->
<h2 class="sectionedit548"><a name="component_symbol_creation" id="component_symbol_creation">Component Symbol Creation</a></h2>
<div class="level2">

<p>
Component symbols (from here on known as “symbols”) are drawn using gschem.  You can start with a blank page or a known-to-be good symbol that is similar to the one you want to create.
</p>

</div>
<!-- EDIT548 SECTION "Component Symbol Creation" [448-671] -->
<h3 class="sectionedit549"><a name="preparing" id="preparing">Preparing</a></h3>
<div class="level3">

<p>
Before you open gschem to create your symbol, there are a few questions you should ask yourself, that will effect how you create your symbol:
</p>
<ol>
<li class="level1"><div class="li"> Is this symbol purely for aesthetic purposes (a graphic)? If so, several steps are simplified.</div>
</li>
<li class="level1"><div class="li"> Do I want to simulate the component in question, with e.g. Spice?</div>
</li>
<li class="level1"><div class="li"> Do I want to use this symbol in a schematic that includes power distribution? This will become important when deciding what pins to draw.</div>
</li>
<li class="level1"><div class="li"> Does this symbol represent a component that comes several in a package? This is called &#039;slotting&#039; in gEDA&#039;s language, and has special rules.</div>
</li>
</ol>

<p>
Once you&#039;ve answered those questions, the following guide will be more useful to you.
</p>

<p>
To start building your symbol:
</p>
<ol>
<li class="level1"><div class="li"> Open gschem.</div>
</li>
<li class="level1"><div class="li"> The default empty page has boxes on it. Use the selection tool (the one that looks like a black mouse cursor) to select everything on the page. Hit the <kbd>Delete</kbd> key to delete it.</div>
</li>
<li class="level1"><div class="li"> Zoom in at least one step (<strong>View</strong>→<strong>Zoom</strong>, or hit the <kbd>Z</kbd> key).</div>
</li>
<li class="level1"><div class="li"> Make sure the snap-to-grid functionality is ON (<strong>Options</strong>→<strong>Toggle Snap On/Off</strong>, or <kbd>O</kbd> <kbd>S</kbd>).</div>
</li>
<li class="level1"><div class="li"> Make sure grid snap size is set to 100 (<strong>Options</strong>→<strong>Snap Grid Spacing…</strong>, or <kbd>O</kbd> <kbd>Shift</kbd>+<kbd>S</kbd>).</div>
</li>
</ol>

</div>
<!-- EDIT549 SECTION "Preparing" [672-1940] -->
<h3 class="sectionedit550"><a name="drawing_your_symbol" id="drawing_your_symbol">Drawing your Symbol</a></h3>
<div class="level3">

<p>
Use the &#039;line&#039;, &#039;box&#039;, &#039;circle&#039;, and &#039;arc&#039; tools (in the <strong>Add</strong> menu) to create a simplified visual representation of your device. Make sure that the only colour you use is &#039;Graphic&#039; (green). Do not place any pins on the device until the next step.
</p>

<p>
To check what colour you are using to draw, go to <strong>Edit</strong>→<strong>Color…</strong> (or hit <kbd>E</kbd> <kbd>O</kbd>).
</p>

</div>
<!-- EDIT550 SECTION "Drawing your Symbol" [1941-2332] -->
<h3 class="sectionedit551"><a name="placing_pins_on_your_symbol" id="placing_pins_on_your_symbol">Placing Pins on your Symbol</a></h3>
<div class="level3">

<p>
If you have decided your symbol is graphical in nature (e.g., does not connect to anything, is just artwork), you can skip this step.
</p>

<p>
Add your first pin.
</p>
<ol>
<li class="level1"><div class="li"> Select <strong>Add</strong>→<strong>Pin</strong>, or hit <kbd>A</kbd> <kbd>P</kbd>. Once that is done, click from the end of your pin, to one of the edges of your symbol. A &#039;0&#039; and the word &#039;unknown&#039; should pop up near your new pin. Please note that the direction you draw your pins is important. If you draw them starting from the edge of your symbol to outside of your symbol, you will end up with text outside of the symbol!</div>
</li>
<li class="level1"><div class="li"> Click on the selection tool, and use it to select the pin you just drew. The pin and text with it should change colors, and boxes should be drawn around the ends of the pin.</div>
</li>
<li class="level1"><div class="li"> Select <strong>Edit</strong>→<strong>Edit…</strong>, or hit <kbd>E</kbd> <kbd>E</kbd> (or right click, and hit <strong>Edit…</strong>). This will bring up the edit dialog for this pin.</div>
</li>
</ol>

<p>
In the Edit dialog for a pin, you should see four attributes (<code>name=value</code> pairs) already associated with your new pin. These attributes can be edited by clicking on the attribute in the list at the top of the edit window, then clicking on the field you want to edit. Note that when selected, the <strong>Add Attribute</strong> section of this dialog does not reflect what has been selected, as it is only meant for addition, not for editing.
</p>

<p>
Let&#039;s look at each attribute already associated with your pin, and edit some of the values. I recommend expanding the size of the edit window until all attributes are visible.
</p>
<ul>
<li class="level1"><div class="li"> All pins should have a <code>pinseq</code> attribute. This number dictates the order pins are looked at on this symbol in spice, gnetlist, and other tools. For our first pin, start this sequence number at &#039;1&#039;, incrementing it on each new pin, as we add them.</div>
</li>
<li class="level1"><div class="li"> All pins should have a <code>pinnumber</code> attribute. This is the number of the pin, on the package of the item you are drawing a symbol for. <code>pinnumber</code> values can be alphanumeric (i.e. like E or C).</div>
</li>
<li class="level1"><div class="li"> All pins should have a <code>pinlabel</code> attribute. This attribute is the name or label of the pin (not the pin number).</div>
</li>
<li class="level1"><div class="li"> All pins should have a <code>pintype</code> attribute. This attribute describes the kind of a pin.</div>
</li>
<li class="level1"><div class="li"> <code>pinseq</code> and <code>pinnumber</code> attributes of several pins can be automatically numbered by <strong>Attributes</strong>→<strong>Autonumber Text…</strong>.</div>
</li>
</ul>

<p>
Possible <code>pintype</code> values are: <code>in</code>, <code>out</code>, <code>io</code>, <code>oc</code>, <code>oe</code>, <code>pas</code>, <code>tp</code>, <code>tri</code>, <code>clk</code>, <code>pwr</code>. Please see the <a href="geda-master_attributes_list.html#pintype" class="wikilink1" title="geda-master_attributes_list.html">Master
Attribute Document</a> for more info.
</p>

</div>
<!-- EDIT551 SECTION "Placing Pins on your Symbol" [2333-4892] -->
<h3 class="sectionedit552"><a name="adding_attributes_to_your_symbol" id="adding_attributes_to_your_symbol">Adding Attributes to your Symbol</a></h3>
<div class="level3">

<p>
Every symbol needs some attributes (name=value pairs) in order to be useful in gschem, and in other tools.
</p>

<p>
First we&#039;re going to add all of the attributes we want, then make the ones that need to be invisible invisible.
</p>
<ol>
<li class="level1"><div class="li"> A <code>device=DEVICENAME</code> attribute should be placed somewhere in the symbol. The <code>devicename</code> should consist of nothing but capital letters, dashes, numbers, and underscores. If the object is a graphic then <code>device=</code> should be set to <code>none</code> (<code>device=none</code>).</div>
</li>
<li class="level1"><div class="li"> A <code>graphical=1</code> attribute should exist somewhere in a symbol which is purely graphical (such as a title block or <em>decon</em> symbol). Symbols which have this attribute have no electrical or circuit significance. Don&#039;t forget to set <code>device=none</code> per the previous step.</div>
</li>
<li class="level1"><div class="li"> A <code>description=TEXT</code> attribute should exist somewhere in the symbol. The <code>TEXT</code> value should provide a one line description of the symbol.</div>
</li>
<li class="level1"><div class="li"> A <code>footprint=PACKAGENAME</code> attribute should exist somewhere in the symbol which might be used with a pcb netlister. <code>PACKAGENAME</code> is a pcb footprint or package type like DIP14 or DIP40. Please see the <a href="geda-pcb_footprint_naming_conventions.html" class="wikilink1" title="geda-pcb_footprint_naming_conventions.html"> footprint naming conventions</a> page for further detail. If you are using gEDA / PCB, also see the <a href="http://pcb.geda-project.org/manual.html" class="urlextern" title="http://pcb.geda-project.org/manual.html"  rel="nofollow">PCB documentation</a> and gnetlist/docs/README.pcb for more info on this attribute and how it is used.</div>
</li>
<li class="level1"><div class="li"> A <code>refdes=</code> attribute should be placed inside all non-graphical symbols. This attribute should default to <code>U?</code> for integrated circuits, and &#039;T?&#039; for transistors. Make only the value visible and it will be promoted (attached to the outside of the symbol (so it can be edited)) when the symbol is placed in a schematic.</div>
</li>
<li class="level1"><div class="li"> A <code>numslots=</code> attribute should be placed inside of all symbols, to prevent a warning when you will check your symbol by gsymcheck. <code>numslots=1</code> works fine.</div>
</li>
</ol>

<p>
Now that those have been added, make the <code>numslots</code>, <code>footprint</code>, <code>description</code>, <code>graphical</code> and <code>device</code> attributes invisible. Leave only the value of the <code>refdes</code> attribute visible, and place it somewhere at the top of your symbol.
</p>

</div>
<!-- EDIT552 SECTION "Adding Attributes to your Symbol" [4893-7071] -->
<h3 class="sectionedit553"><a name="finishing" id="finishing">Finishing</a></h3>
<div class="level3">
<ol>
<li class="level1"><div class="li"> Add a label to your symbol by selecting <strong>Add</strong>→<strong>Text…</strong> or pressing <kbd>A</kbd> <kbd>T</kbd>. Type out your label, and move it to the top of your symbol.</div>
</li>
<li class="level1"><div class="li"> Translate the symbol to the origin using <strong>Edit</strong>→<strong>Symbol Translate…</strong> or press <kbd>E</kbd> <kbd>T</kbd>.</div>
</li>
<li class="level1"><div class="li"> Enter &#039;0&#039; into the entry field and press <strong>OK</strong>.</div>
</li>
<li class="level1"><div class="li"> Save the symbol using <strong>File</strong>→<strong>Save</strong> or <strong>File</strong>→<strong>Save As…</strong></div>
</li>
<li class="level1"><div class="li"> Place the symbol in one of the directories specified by the <code>component-library</code> keyword in the system-gafrc file. Once this is done, the symbol should be visible immediately and can be selected and placed with the <strong>Add</strong>→<strong>Select Component…</strong> menu item. On Debian, placing files in /usr/share/gEDA/sym/local/ works, but require permissions setup.</div>
</li>
</ol>

</div>

<h4><a name="note" id="note">Note</a></h4>
<div class="level4">

<p>
Translating the symbol to the origin is a required step. To translate a symbol elsewhere, enter a offset (in mils) which is a even multiple of 100. Make sure all pins are snapped to a 100 mil grid point.
</p>

</div>
<!-- EDIT553 SECTION "Finishing" [7072-8072] -->
<h2 class="sectionedit554"><a name="common_symbol_naming_conventions" id="common_symbol_naming_conventions">Common Symbol Naming Conventions</a></h2>
<div class="level2">
<ol>
<li class="level1"><div class="li"> Symbols are named: <code>symbolname-#.sym</code></div>
</li>
<li class="level1"><div class="li"> Symbols end with a <code>.sym</code> extension.</div>
</li>
<li class="level1"><div class="li"> Symbols have a <code>-#</code> where <code>#</code> is a number. Typically <code>#</code> is 1 but if there are multiple symbols for a device then this number simply increments.</div>
</li>
<li class="level1"><div class="li"> Symbol names are typically lowercase but letters which are part of a part number are uppercase.</div>
</li>
<li class="level1"><div class="li"> The above case rule can be broken if the filename looks incorrect or wrong.</div>
</li>
</ol>

</div>
<!-- EDIT554 SECTION "Common Symbol Naming Conventions" [8073-8540] -->
<h2 class="sectionedit555"><a name="symbol_requirements" id="symbol_requirements">Symbol Requirements</a></h2>
<div class="level2">

<p>
This section describes the various requirements which must be met in order to create a valid symbol which will display and netlist in the gEDA/gaf system.
</p>

</div>
<!-- EDIT555 SECTION "Symbol Requirements" [8541-8728] -->
<h3 class="sectionedit556"><a name="pins" id="pins">Pins</a></h3>
<div class="level3">
<ol>
<li class="level1"><div class="li"> All pins should have a <code>pinseq</code> attribute. This number dictates the order pins are looked at on this symbol in spice, gnetlist, and other tools. This is just a sequence number, and should increment sequentially starting at 1.</div>
</li>
<li class="level1"><div class="li"> All pins should have a <code>pinnumber</code> attribute attached to them. This is the number of the pin, on the package of the item you are drawing a symbol for. The pin number can be alphanumeric (i.e. like E or C).</div>
</li>
<li class="level1"><div class="li"> All pins should have a <code>pinlabel</code> attribute attached to them. This attribute is the name or label of the pin (not the pin number). This attribute is also used when a symbol is used in a hierarchical schematic.</div>
</li>
<li class="level1"><div class="li"> All pins should have <code>pintype</code> attribute attached to them. This attribute describes the kind of a pin. Possible values are: <code>in</code>, <code>out</code>, <code>io</code>, <code>oc</code>, <code>oe</code>, <code>pas</code>, <code>tp</code>, <code>tri</code>, <code>clk</code>, <code>pwr</code>. Please see the <a href="geda-master_attributes_list.html#pintype" class="wikilink1" title="geda-master_attributes_list.html">Master Attribute Document</a> for more info.</div>
</li>
</ol>

</div>
<!-- EDIT556 SECTION "Pins" [8729-9711] -->
<h3 class="sectionedit557"><a name="attributes" id="attributes">Attributes</a></h3>
<div class="level3">

<p>
For more information on the attributes presented here, please see the <a href="geda-master_attributes_list.html" class="wikilink1" title="geda-master_attributes_list.html">Master
Attribute Document</a>.
</p>
<ol>
<li class="level1"><div class="li"> A <code>device=DEVICENAME</code> attribute should be placed somewhere in the symbol and made invisible. Typically the <code>devicename</code> is in all caps (capital letters). This attribute should not be used as a label. Use a separate text object for the label. If the object is a graphic then <code>device=</code> should be set to none (<code>device=none</code>).</div>
</li>
<li class="level1"><div class="li"> A <code>graphical=1</code> attribute should exist somewhere in a symbol which is purely graphical (such as a title block or <em>decon</em> symbol). Symbols which have this attribute have no electrical or circuit significance. Don&#039;t forget to set <code>device=none</code> per the previous requirement.</div>
</li>
<li class="level1"><div class="li"> A <code>description=TEXT</code> attribute should exist somewhere in the symbol. The <code>TEXT</code> value should provide a one line description of the symbol.</div>
</li>
<li class="level1"><div class="li"> A <code>footprint=PACKAGENAME</code> attribute should exist somewhere in the symbol which might be used with a pcb netlister. <code>PACKAGENAME</code> is a pcb footprint or package type like DIP14 or DIP40. Please see the <a href="geda-pcb_footprint_naming_conventions.html" class="wikilink1" title="geda-pcb_footprint_naming_conventions.html"> footprint naming conventions</a> page for further detail. If you are using gEDA / PCB, also see the <a href="http://pcb.geda-project.org/manual.html" class="urlextern" title="http://pcb.geda-project.org/manual.html"  rel="nofollow">PCB documentation</a> and gnetlist/docs/README.pcb for more info on this attribute and how it is used.</div>
</li>
<li class="level1"><div class="li"> A <code>refdes=U?</code> attribute should be placed inside all non-graphical symbols. Make only the value visible and it will be promoted (attached to the outside of the symbol, so it can be edited) when the symbol is placed in a schematic.</div>
</li>
<li class="level1"><div class="li"> The <code>label=</code> and <code>name=</code> attributes should not exist anywhere in the symbol. They are obsolete.</div>
</li>
<li class="level1"><div class="li"> The <code>netname=</code> attribute should not be attached anywhere in the symbol. It is only used in schematics.</div>
</li>
</ol>

</div>

<h4><a name="slotting" id="slotting">Slotting</a></h4>
<div class="level4">
<ol>
<li class="level1"><div class="li"> If a component has multiple slots in a package (such as a 7400 (NAND) which has 4 NANDs per package) then you need a <code>numslots=#</code> attribute. The <code>#</code> is the number of slots the device has. <code>numslots=</code> should be exist somewhere in the symbol and made invisible. Additional slot related required attributes are described below.</div>
</li>
<li class="level1"><div class="li"> If a component has multiple slots in a physical package then you also need to include a <code>slotdef=#:#,#,#…</code> for every slot. The first <code>#</code> corresponds to the slot number. If a device has 4 slots then there should be <code>slotdef=1:…</code>, <code>slotdef=2:…</code>, <code>slotdef=3:…</code>, and <code>slotdef=4:…</code>, attributes existing somewhere in the symbol and made invisible. The subsequent <code>#</code> have a one-to-one correspondence to <code>pinseq=#</code> attributes and specify what corresponding <code>pinnumber=#</code> should be when that slot is set. See the <a href="#example" title=":geda:gschem_symbol_creation.txt &crarr;" class="wikilink1">attached 7400-1.sym</a> as an example of how this should all work.</div>
</li>
<li class="level1"><div class="li"> It is recommended that all symbols which have slots have a <code>slot=1</code> attribute inside the symbol.</div>
</li>
</ol>

</div>
<!-- EDIT557 SECTION "Attributes" [9712-12627] -->
<h2 class="sectionedit558"><a name="checking_a_symbol" id="checking_a_symbol">Checking a Symbol</a></h2>
<div class="level2">

<p>
Running gsymcheck will check that all of these requirements are met. gsymcheck will output fatal errors which are quite serious and must be corrected. gsymcheck will also output warnings on things which should be fixed but are not fatal.
</p>

</div>
<!-- EDIT558 SECTION "Checking a Symbol" [12628-12897] -->
<h2 class="sectionedit559"><a name="style" id="style">Style</a></h2>
<div class="level2">

<p>
This section describes the style which is used in the standard gEDA/gaf symbol library.
</p>

</div>
<!-- EDIT559 SECTION "Style" [12898-13005] -->
<h3 class="sectionedit560"><a name="text" id="text">Text</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> All text labels should all be 10 pt in size.</div>
</li>
<li class="level1"><div class="li"> Text (labels not attributes) should be color number 9 (text | green).</div>
</li>
<li class="level1"><div class="li"> Use the special overbar encoding (e.g. <code>pinlabel=\_Reset\_</code>) to express inverse logic levels.</div>
</li>
</ul>

</div>
<!-- EDIT560 SECTION "Text" [13006-13245] -->
<h3 class="sectionedit561"><a name="attributes1" id="attributes1">Attributes</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> <code>pinnumber</code> attributes should be displayed as pin numbers for pins (not <code>pinseq</code>) and should be 8 pt in size.</div>
</li>
<li class="level1"><div class="li"> Attached attributes should be color number 5 (attributes | yellow). The color is set automatically to yellow if the text item is attached.</div>
</li>
<li class="level1"><div class="li"> The only exception to this is <code>pinlabel=</code> attributes, those should be color number 9 (text | green). If every text item within a symbol is yellow, the symbol looks too yellow.</div>
</li>
<li class="level1"><div class="li"> Attributes can be attached to some part of the symbol. Toplevel attributes (like the <code>device=</code> or <code>net=</code> attributes) used to be required to be attached to something to be attributes, but now they just have to exist in the symbol file as <code>name=value</code>.</div>
</li>
<li class="level1"><div class="li">  Expanding a bit on the last sentence, as long as the text item has the format <code>name=value</code>, it is considered an attribute. Attributes inside a symbol do not have to be attached to anything. In order to see hidden attributes in gschem select <strong>Edit</strong>→<strong>Show/Hide Inv Text</strong>.</div>
</li>
<li class="level1"><div class="li"> There is a symbol content versioning system in libgeda which is based on the <code>symversion=</code> attribute. Please see the <a href="geda-master_attributes_list.html#symversion" class="wikilink1" title="geda-master_attributes_list.html">Master Attribute Document</a> for more information on using this versioning scheme.</div>
</li>
</ul>

</div>
<!-- EDIT561 SECTION "Attributes" [13246-14494] -->
<h3 class="sectionedit562"><a name="graphics" id="graphics">Graphics</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> Lines, boxes, arcs, and any other graphics should be color number 3 (graphic | green).</div>
</li>
<li class="level1"><div class="li"> Polarity bubbles should be color number 6 (logic bubble | cyan).</div>
</li>
<li class="level1"><div class="li"> If you are unsure on how to make a new symbol look or how big to make a new symbol, look at the existing symbols to get a feel for the appropriate appearance and size.</div>
</li>
</ul>

</div>
<!-- EDIT562 SECTION "Graphics" [14495-14846] -->
<h3 class="sectionedit563"><a name="pins1" id="pins1">Pins</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> Pins should all be 300 mils (3 grid spaces) long.</div>
</li>
<li class="level1"><div class="li"> For pins which are next to a logic bubble, make the pins 200 mils (2 grid spaces) long and then make the logic bubble 100 mils in diameter. In order to draw a 100 mil diameter circle, you will need to change the snap spacing to 50.</div>
</li>
<li class="level1"><div class="li"> A pin has two ends: one end has a red endpoint and one end that does not. The red endpoint is where nets can be connected. You can either rotate the pin so that this active end is in the right place or manually edit the symbol file changing the “whichend” parameter on the pin object. See the <a href="geda-file_format_spec.html#pin" class="wikilink1" title="geda-file_format_spec.html">File Format document</a> for more info.</div>
</li>
<li class="level1"><div class="li"> Be that all endpoints of pins which are meant to be connected to are on the 100 mil grid. The endpoint which is not active can be off the grid if necessary.</div>
</li>
<li class="level1"><div class="li"> Pins should be color number 1 (pins | white).</div>
</li>
<li class="level1"><div class="li"> Leave 400 mils (4 grid spaces) between (vertically) pins, unless you are drawing a special symbol, then just try to make it look good.</div>
</li>
<li class="level1"><div class="li"> Pin number attributes should be 50 mils above (or below; which ever makes the most sense) the pin which they are attached to.</div>
</li>
<li class="level1"><div class="li"> Input pins belong on the left and output pins belong on the right of the symbol.</div>
</li>
<li class="level1"><div class="li"> Please do not mix inputs and outputs on the same side of the symbol, unless absolutely necessary.</div>
</li>
<li class="level1"><div class="li"> You can have pins on the top or bottom of a symbol.</div>
</li>
<li class="level1"><div class="li"> The order for rows of pins (buses) should be LSB (least significant bit) to MSB (most significant bit). When drawing pins which are part of a bus, make sure the LSB of the bus is at the top (or for pins on top/bottom of a symbol, left of the rest of the other pins). Look at 74/74181-1.sym for a correct example of this order (A0 on top through A3 and B0 on top through B3). Violating this rule will make connecting buses much more difficult.</div>
</li>
<li class="level1"><div class="li"> When placing pins on logic gates, be sure to place the smallest pin numbers toward the top (or left) and then increment going down (or across).</div>
</li>
</ul>

</div>
<!-- EDIT563 SECTION "Pins" [14847-16828] -->
<h3 class="sectionedit564"><a name="electrical" id="electrical">Electrical</a></h3>
<div class="level3">
<ul>
<li class="level1"><div class="li"> Do not draw power and ground pins. That information will be conveyed using attributes (see the <a href="geda-na_howto.html" class="wikilink1" title="geda-na_howto.html">net= attribute mini-HOWTO</a>).</div>
</li>
<li class="level1"><div class="li"> The above rule can be broken if necessary, but keep in mind most of the standard library does not have power pins showing.</div>
</li>
<li class="level1"><div class="li"> Keep in mind, symbols are supposed to be symbolic, they do not represent the physical package that the device comes in.</div>
</li>
<li class="level1"><div class="li"> There is some disagreement on above, so this is okay too: arrange the pins on a symbol logically so that they promote an uncluttered schematic. Note that this is frequently not the same pin arrangement as the physical device.</div>
</li>
</ul>

</div>
<!-- EDIT564 SECTION "Electrical" [16829-17471] -->
<h2 class="sectionedit565"><a name="hints_and_tips" id="hints_and_tips">Hints and Tips</a></h2>
<div class="level2">

<p>
This section describes some hints and tips which will make your symbol creation
experience easier.
</p>
<ul>
<li class="level1"><div class="li"> Pins MUST be snapped on the 100-spaced grid.</div>
</li>
<li class="level1"><div class="li"> Avoid drawing things off of the grid. If you do, you cannot move the object(s) using the move command (if the grid is on) since the object will be snapped to the grid. [This was an old bug, which I think has been fixed, but avoid doing this anyway]. Use the symbol translate command instead (or move the object with grid snap off).</div>
</li>
<li class="level1"><div class="li"> It is okay to set the grid finer than 100 (say 10 or 25) when creating symbols, just remember to set this back to 100 once you are ready to translate the symbol to the origin.</div>
</li>
<li class="level1"><div class="li"> If you want to translate a symbol from the origin to elsewhere, then use the <strong>Edit</strong>→<strong>Symbol Translate…</strong> command and enter a non zero number. Make sure this number is a multiple of 100 (i.e. 1000, or 1100).</div>
</li>
<li class="level1"><div class="li"> Remember that pins are special objects; if you want to add a pin, make sure it is a pin and not a line or net. Use the <strong>Add</strong>→<strong>Pin</strong> command to place a pin.</div>
</li>
<li class="level1"><div class="li"> Don&#039;t include nets or buses inside symbols. That is not supported and doesn&#039;t make much sense anyway.</div>
</li>
<li class="level1"><div class="li"> <code>pinnumber</code> should be the visible attribute for pins, along with <code>pinlabel</code> if any.</div>
</li>
</ul>

</div>
<!-- EDIT565 SECTION "Hints and Tips" [17472-18743] -->
<h2 class="sectionedit566"><a name="example" id="example">Example</a></h2>
<div class="level2">

<p>
This section provides a simple example which tries to follow all of the above rules. This symbol is of a 7400 (NAND gate).
</p>
<dl class="code">
<dt><a href="/./_export/code/:geda:gschem_symbol_creation.txt?codeblock=0" title="Download Snippet" class="mediafile mf_sym">7400-1.sym</a></dt>
<dd><pre class="code gschem">v 20031231 1
L 300 200 300 800 3 0 0 0 -1 -1
T 300 0 9 8 1 0 0 0 1
7400
L 300 800 700 800 3 0 0 0 -1 -1
T 500 900 5 10 0 0 0 0 1
device=7400
T 500 1100 5 10 0 0 0 0 1
slot=1
T 500 1300 5 10 0 0 0 0 1
numslots=4
T 500 1500 5 10 0 0 0 0 1
slotdef=1:1,2,3
T 500 1700 5 10 0 0 0 0 1
slotdef=2:4,5,6
T 500 1900 5 10 0 0 0 0 1
slotdef=3:9,10,8
T 500 2100 5 10 0 0 0 0 1
slotdef=4:12,13,11
L 300 200 700 200 3 0 0 0 -1 -1
A 700 500 300 270 180 3 0 0 0 -1 -1
V 1050 500 50 6 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
P 1100 500 1300 500 1 0 1
{
T 1100 550 5 8 1 1 0 0 1
pinnumber=3
T 1100 450 5 8 0 1 0 2 1
pinseq=3
T 950 500 9 8 0 1 0 6 1
pinlabel=Y
T 950 500 5 8 0 1 0 8 1
pintype=out
}
P 300 300 0 300 1 0 1
{
T 200 350 5 8 1 1 0 6 1
pinnumber=2
T 200 250 5 8 0 1 0 8 1
pinseq=2
T 350 300 9 8 0 1 0 0 1
pinlabel=B
T 350 300 5 8 0 1 0 2 1
pintype=in
}
P 300 700 0 700 1 0 1
{
T 200 750 5 8 1 1 0 6 1
pinnumber=1
T 200 650 5 8 0 1 0 8 1
pinseq=1
T 350 700 9 8 0 1 0 0 1
pinlabel=A
T 350 700 5 8 0 1 0 2 1
pintype=in
}
T 300 900 8 10 1 1 0 0 1
refdes=U?
T 500 2250 5 10 0 0 0 0 1
footprint=DIP14
T 500 2450 5 10 0 0 0 0 1
description=4 NAND gates with 2 inputs
T 500 2850 5 10 0 0 0 0 1
net=Vcc:14
T 500 3050 5 10 0 0 0 0 1
net=GND:7
T 500 2650 5 10 0 0 0 0 1
documentation=http://www-s.ti.com/sc/ds/sn74hc00.pdf</pre>
</dd></dl>

<p>
This example produces the following (using gschem):
</p>

<p>
<a href="media/geda/symbol_7400-1_hidden.png" class="media" target="_blank" title="geda:symbol_7400-1_hidden.png"><img src="media/geda/symbol_7400-1_hidden.png" class="media" title=":geda:symbol_7400-1_hidden.png" alt=":geda:symbol_7400-1_hidden.png" /></a>
</p>

<p>
This is the same symbol with all the hidden text visible (via <strong>Edit</strong>→<strong>Show/Hide Inv Text</strong>):
</p>

<p>
<a href="media/geda/symbol_7400-1.png" class="media" target="_blank" title="geda:symbol_7400-1.png"><img src="media/geda/symbol_7400-1.png" class="media" title=":geda:symbol_7400-1.png" alt=":geda:symbol_7400-1.png" /></a>
</p>

</div>
<!-- EDIT566 SECTION "Example" [18744-] --></body>
</html>