User Tools

Site Tools


geda:gschem_symbol_creation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
geda:gschem_symbol_creation [2012/11/05 12:51]
julialongtin [Adding Attributes to your Symbol] note about transistors.
geda:gschem_symbol_creation [2015/12/02 05:16] (current)
vzh Add link to generators page
Line 1: Line 1:
 +//​Translations of this guide are also available in the following languages://​ [[gschem_symbol_creation.ru|Русский]]
 +
 ====== gEDA/gaf Symbol Creation ====== ====== gEDA/gaf Symbol Creation ======
  
-The latest version of this document may be found at: http://​www.geda-project.org/​wiki/​geda:​gschem_symbol_creation\\  +The latest version of this document may be found at: http://​www.geda-project.org/​wiki/​geda:​gschem_symbol_creation\\ 
-This document is released under the [[gEDA:​GFDL|GNU Free Documentation License (GFDL)]].\\ ​+This document is released under the [[gEDA:​GFDL|GNU Free Documentation License (GFDL)]].\\
  
 ===== Overview ===== ===== Overview =====
-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.+This document describes the manual ​creation of component symbols, 
 +including style conventions,​ and hints/tips and things to look out 
 +for when drawing symbols for the gEDA/gaf system.
  
 +For automatic symbol creation or conversion from other formats
 +please see the [[gschem symbol generators]] page.
  
 ===== Component Symbol Creation ===== ===== Component Symbol Creation =====
Line 16: Line 22:
   - Is this symbol purely for aesthetic purposes (a graphic)? If so, several steps are simplified.   - Is this symbol purely for aesthetic purposes (a graphic)? If so, several steps are simplified.
   - Do I want to simulate the component in question, with e.g. Spice?   - Do I want to simulate the component in question, with e.g. Spice?
-  - Do I want to use this symbol in a schematic that includes power distribution? ​this will become important when deciding what pins to draw. +  - Do I want to use this symbol in a schematic that includes power distribution? ​This will become important when deciding what pins to draw. 
-  - Does this symbol represent a component that comes several in a package? ​this is called 'sloting' in geda's language, and has special rules.+  - Does this symbol represent a component that comes several in a package? ​This is called 'slotting' in gEDA's language, and has special rules.
  
 Once you've answered those questions, the following guide will be more useful to you. Once you've answered those questions, the following guide will be more useful to you.
  
 To start building your symbol: To start building your symbol:
-  - Open gschem +  - Open gschem. 
-  - 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 'Delete' ​key to delete it. +  - 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 <key>Delete</​key> ​key to delete it. 
-  - Zoom in at least one step ('View->​Zoom', or hit the 'z' ​key). +  - Zoom in at least one step (**View**->**Zoom**, or hit the <key>z</​key> ​key). 
-  - Make sure the snap-to-grid functionality is ON ('Options->​Toggle Snap On/Off', or 'o s'). +  - Make sure the snap-to-grid functionality is ON (**Options**->**Toggle Snap On/Off**, or <key>o</​key>​ <key>s</​key>​). 
-  - Make sure grid snap size is set to 100 ('Options->​Snap Grid Spacing', or 'o Shift-s').+  - Make sure grid snap size is set to 100 (**Options**->**Snap Grid Spacing...**, or <key>o</​key>​ <key>Shift-s</​key>​).
  
 ==== Drawing your Symbol ==== ==== Drawing your Symbol ====
  
-Use the '​line',​ '​box',​ '​circle',​ and '​arc'​ tools (in the 'Add' ​menu) to create a simplified visual representation of your device. Make sure that the only colour you use is '​Graphic'​ (green). Do not place any pins on the device until the next step.+Use the '​line',​ '​box',​ '​circle',​ and '​arc'​ tools (in the **Add** menu) to create a simplified visual representation of your device. Make sure that the only colour you use is '​Graphic'​ (green). Do not place any pins on the device until the next step.
  
-To check what colour you are using to draw, go to 'Edit->​Color' ​(or hit 'e o').+To check what colour you are using to draw, go to **Edit**->**Color...** (or hit <key>e</​key>​ <key>o</​key>​).
  
 ==== Placing Pins on your Symbol ==== ==== Placing Pins on your Symbol ====
  
-If you have decided your symbol is graphical in nature (EG, does not connect to anything, is just artwork), you can skip this step.+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.
  
-Add your first pin. +Add your first pin.
  
-  - Select ​'Add->Pin', or hit 'a p'. Once that is done, click from the end of your pin, to one of the edges of your symbol. ​'​0'​ and the word '​unknown'​ 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! +  - Select ​**Add**->**Pin**, or hit <key>a</​key>​ <key>p</​key>​. Once that is done, click from the end of your pin, to one of the edges of your symbol. ​'​0'​ and the word '​unknown'​ 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! 
-  - 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. +  - 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. 
-  - select 'Edit->​Edit', or hit 'e e' ​(or right click, and hit '​edit'​). This will bring up the edit dialog for this pin.+  - Select **Edit**->**Edit...**, or hit <key>e</​key>​ <key>e</​key> ​(or right click, and hit **Edit...**). This will bring up the edit dialog for this pin.
  
  
-In the Edit dialog for a pin, you should see four attributes (''​name=value''​ 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 'Add Attribute' ​section of this dialog does not reflect what has been selected, as it is only meant for addition, not for editing.+In the Edit dialog for a pin, you should see four attributes (''​name=value''​ 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 **Add Attribute** section of this dialog does not reflect what has been selected, as it is only meant for addition, not for editing.
  
-Lets 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.+Let'​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.
  
   * All pins should have a ''​pinseq''​ 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 '​1',​ incrementing it on each new pin, as we add them.   * All pins should have a ''​pinseq''​ 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 '​1',​ incrementing it on each new pin, as we add them.
Line 53: Line 59:
   * All pins should have a ''​pinlabel''​ attribute. This attribute is the name or label of the pin (not the pin number).   * All pins should have a ''​pinlabel''​ attribute. This attribute is the name or label of the pin (not the pin number).
   * All pins should have a ''​pintype''​ attribute. This attribute describes the kind of a pin.   * All pins should have a ''​pintype''​ attribute. This attribute describes the kind of a pin.
-  * ''​pinseq''​ and ''​pinnumber''​ attributes of several pins can be automatically numbered by 'Attributes->​Autonumber Text...'.+  * ''​pinseq''​ and ''​pinnumber''​ attributes of several pins can be automatically numbered by **Attributes**->**Autonumber Text...**.
  
-Possible ''​pintype''​ values are: in, out, io, oc, oe, pas, tp, tri, clk, pwr. Please see the [[master_attributes_list|Master+Possible ''​pintype''​ values are: ''​in''​''​out''​''​io''​''​oc''​''​oe''​''​pas''​''​tp''​''​tri''​''​clk''​''​pwr''​. Please see the [[master_attributes_list#pintype|Master
 Attribute Document]] for more info. Attribute Document]] for more info.
  
Line 63: Line 69:
 First we're going to add all of the attributes we want, then make the ones that need to be invisible invisible. First we're going to add all of the attributes we want, then make the ones that need to be invisible invisible.
  
-  - A ''​device=DEVICENAME''​ attribute should be placed somewhere in the symbol. The ''​devicename''​ should consist of nothing but capital letters, dashes, numbers, and underscores. If the object is a graphic then device= should be set to none (device=none). +  - A ''​device=DEVICENAME''​ attribute should be placed somewhere in the symbol. The ''​devicename''​ should consist of nothing but capital letters, dashes, numbers, and underscores. If the object is a graphic then ''​device='' ​should be set to ''​none'' ​(''​device=none''​). 
-  - A ''​graphical=1''​ attribute should exist somewhere in a symbol which is purely graphical (such as a title block or decon symbol). Symbols which have this attribute have no electrical or circuit significance. Don't forget to set '​device=none'​ per the previous step. +  - A ''​graphical=1''​ attribute should exist somewhere in a symbol which is purely graphical (such as a title block or //decon// symbol). Symbols which have this attribute have no electrical or circuit significance. Don't forget to set ''​device=none'' per the previous step. 
-  - A ''​description=TEXT''​ attribute should exist somewhere in the symbol. The TEXT value should provide a one line description of the symbol. +  - A ''​description=TEXT''​ attribute should exist somewhere in the symbol. The ''​TEXT'' ​value should provide a one line description of the symbol. 
-  - A ''​footprint=PACKAGENAME''​ attribute should exist somewhere in the symbol which might be used with a pcb netlister. ''​PACKAGENAME''​ is a pcb footprint or package type like DIP14 or DIP40. Please see the footprint naming conventions page for further detail. If you are using gEDA / PCB, also see the PCB documentation and gnetlist/​docs/​README.pcb for more info on this attribute and how it is used. +  - A ''​footprint=PACKAGENAME''​ attribute should exist somewhere in the symbol which might be used with a pcb netlister. ''​PACKAGENAME''​ is a pcb footprint or package type like DIP14 or DIP40. Please see the [[pcb_footprint_naming_conventions | footprint naming conventions]] page for further detail. If you are using gEDA / PCB, also see the [[http://​pcb.geda-project.org/​manual.html|PCB documentation]] and gnetlist/​docs/​README.pcb for more info on this attribute and how it is used. 
-  - A ''​refdes=''​ attribute should be placed inside all non-graphical symbols. This attribute should default to '​U?'​ for integrated circuits, and '​T?'​ 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. +  - A ''​refdes=''​ attribute should be placed inside all non-graphical symbols. This attribute should default to ''U?'' for integrated circuits, and '​T?'​ 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. 
-  - A ''​numslots=''​ attribute should be placed inside of all symbols, to prevent a warning. ''​numslots=1''​ works fine.+  - A ''​numslots=''​ attribute should be placed inside of all symbols, to prevent a warning ​when you will check your symbol by gsymcheck. ''​numslots=1''​ works fine.
  
-Now that those have been added, make the ''​numslots'',​ ''​footprint'',​ ''​description'',​ ''​graphical''​ and ''​device''​ attributes invisible. Leave only the value of the '​refdes'​ attribute visible, and place it somewhere at the top of your symbol.+Now that those have been added, make the ''​numslots'',​ ''​footprint'',​ ''​description'',​ ''​graphical''​ and ''​device''​ attributes invisible. Leave only the value of the ''​refdes'' attribute visible, and place it somewhere at the top of your symbol.
  
 ==== Finishing ==== ==== Finishing ====
-  - Add a label to your symbol by selecting ​'Add->​Text' ​or pressing ​'a t'type out your label, and move it to the top of your symbol. +  - Add a label to your symbol by selecting ​**Add**->**Text...** or pressing ​<key>a</​key>​ <key>t</​key>​Type out your label, and move it to the top of your symbol. 
-  - Translate the symbol to the origin using Edit/Symbol Translate... +  - Translate the symbol to the origin using **Edit**->**Symbol Translate...** or press <​key>​e</​key>​ <​key>​t</​key>​
-  ​Select "Symbol Translate..." ​or the press equivalent hotkey+  - Enter '0' ​into the entry field and press **OK**
-  - Enter 0 into the entry field and press OK. +  - Save the symbol using **File**->**Save** or **File**->**Save As...** 
-  - Save the symbol using 'File->​Save' ​or 'File->​Save As...' ​ +  - Place the symbol in one of the directories specified ​as a symbol ​library in a suite configuration file  (one of the "gafrc" files). ​ For an explanation of how to set up symbol libraries, see the [[geda:​gschem_ug:​config|gEDA gschem User Guide]]. Once this is done, the symbol should be visible immediately and can be selected and placed with the **Add**->**Select Component...** menu item. On Debian, placing files in /​usr/​share/​gEDA/​sym/​local/​ works, but requires ​permissions setup.
-  - Place the symbol in one of the directories specified ​by the component-library ​keyword ​in the system-gafrc file. Once this is done, the symbol should be visible immediately and can be selected and placed with the 'Add->​Select Component...' ​menu item. On Debian, placing files in /​usr/​share/​gEDA/​sym/​local/​ works, but require ​permissions setup. +
  
-==== Note ====+=== Note ===
 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. 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.
  
-=== Common Symbol Naming Conventions === +===== Common Symbol Naming Conventions ​===== 
-  - Symbols are named: symbolname-#​.sym +  - Symbols are named: ​''​symbolname-#​.sym''​ 
-  - Symbols end with a .sym extension. +  - Symbols end with a ''​.sym'' ​extension. 
-  - Symbols have a -# where # is a number. Typically # is 1 but if there are multiple symbols for a device then this number simply increments.+  - Symbols have a ''​-#'' ​where ''​#'' ​is a number. Typically ​''​#'' ​is 1 but if there are multiple symbols for a device then this number simply increments.
   - Symbol names are typically lowercase but letters which are part of a part number are uppercase.   - Symbol names are typically lowercase but letters which are part of a part number are uppercase.
   - The above case rule can be broken if the filename looks incorrect or wrong.   - The above case rule can be broken if the filename looks incorrect or wrong.
Line 98: Line 102:
   - All pins should have a ''​pinnumber''​ 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).   - All pins should have a ''​pinnumber''​ 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).
   - All pins should have a ''​pinlabel''​ 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.   - All pins should have a ''​pinlabel''​ 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.
-  - All pins should have ''​pintype''​ attribute attached to them. This attribute describes the kind of a pin. Possible values are: ''​in'',​ ''​out'',​ ''​io'',​ ''​oc'',​ ''​oe'',​ ''​pas'',​ ''​tp'',​ ''​tri'',​ ''​clk'',​ ''​pwr''​. Please see the [[master_attributes_list|Master Attribute Document]] for more info.+  - All pins should have ''​pintype''​ attribute attached to them. This attribute describes the kind of a pin. Possible values are: ''​in'',​ ''​out'',​ ''​io'',​ ''​oc'',​ ''​oe'',​ ''​pas'',​ ''​tp'',​ ''​tri'',​ ''​clk'',​ ''​pwr''​. Please see the [[master_attributes_list#pintype|Master Attribute Document]] for more info.
  
  
Line 106: Line 110:
  
   - A ''​device=DEVICENAME''​ attribute should be placed somewhere in the symbol and made invisible. Typically the ''​devicename''​ 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 ''​device=''​ should be set to none (''​device=none''​).   - A ''​device=DEVICENAME''​ attribute should be placed somewhere in the symbol and made invisible. Typically the ''​devicename''​ 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 ''​device=''​ should be set to none (''​device=none''​).
-  - A ''​graphical=1''​ attribute should exist somewhere in a symbol which is purely graphical (such as a title block or decon symbol). Symbols which have this attribute have no electrical or circuit significance. Don't forget to set ''​device=none''​ per the previous requirement.+  - A ''​graphical=1''​ attribute should exist somewhere in a symbol which is purely graphical (such as a title block or //decon// symbol). Symbols which have this attribute have no electrical or circuit significance. Don't forget to set ''​device=none''​ per the previous requirement.
   - A ''​description=TEXT''​ attribute should exist somewhere in the symbol. The ''​TEXT''​ value should provide a one line description of the symbol.   - A ''​description=TEXT''​ attribute should exist somewhere in the symbol. The ''​TEXT''​ value should provide a one line description of the symbol.
-  - A ''​footprint=PACKAGENAME''​ attribute should exist somewhere in the symbol which might be used with a pcb netlister. ''​PACKAGENAME''​ is a pcb footprint or package type like DIP14 or DIP40. Please see the [[pcb_footprint_naming_conventions | footprint naming conventions]] page for further detail. If you are using gEDA / PCB, also see the PCB documentation and gnetlist/​docs/​README.pcb for more info on this attribute and how it is used. +  - A ''​footprint=PACKAGENAME''​ attribute should exist somewhere in the symbol which might be used with a pcb netlister. ''​PACKAGENAME''​ is a pcb footprint or package type like DIP14 or DIP40. Please see the [[pcb_footprint_naming_conventions | footprint naming conventions]] page for further detail. If you are using gEDA / PCB, also see the [[http://​pcb.geda-project.org/​manual.html|PCB documentation]] and gnetlist/​docs/​README.pcb for more info on this attribute and how it is used. 
-  - A ''​refdes=U?''​ 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.+  - A ''​refdes=U?''​ 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 symbolso it can be edited) when the symbol is placed in a schematic.
   - The ''​label=''​ and ''​name=''​ attributes should not exist anywhere in the symbol. They are obsolete.   - The ''​label=''​ and ''​name=''​ attributes should not exist anywhere in the symbol. They are obsolete.
   - The ''​netname=''​ attribute should not be attached anywhere in the symbol. It is only used in schematics.   - The ''​netname=''​ attribute should not be attached anywhere in the symbol. It is only used in schematics.
Line 115: Line 119:
 === Slotting === === Slotting ===
   - If a component has multiple slots in a package (such as a 7400 (NAND) which has 4 NANDs per package) then you need a ''​numslots=#''​ attribute. The ''#''​ is the number of slots the device has. ''​numslots=''​ should be exist somewhere in the symbol and made invisible. Additional slot related required attributes are described below.   - If a component has multiple slots in a package (such as a 7400 (NAND) which has 4 NANDs per package) then you need a ''​numslots=#''​ attribute. The ''#''​ is the number of slots the device has. ''​numslots=''​ should be exist somewhere in the symbol and made invisible. Additional slot related required attributes are described below.
-  - If a component has multiple slots in a physical package then you also need to include a ''​slotdef=#:#,#,#​...''​ for every slot. The first ''#''​ corresponds to the slot number. If a device has 4 slots then there should be ''​slotdef=1:​...'',​ ''​slotdef=2:​...'',​ ''​slotdef=3:​...'',​ and ''​slotdef=4:​...'',​ attributes existing somewhere in the symbol and made invisible. The subsequent ''#''​ have a one-to-one correspondence to ''​pinseq=#''​ attributes and specify what corresponding ''​pinnumber=#''​ should be when that slot is set. See the attached 7400-1.sym as an example of how this should all work.+  - If a component has multiple slots in a physical package then you also need to include a ''​slotdef=#:#,#,#​...''​ for every slot. The first ''#''​ corresponds to the slot number. If a device has 4 slots then there should be ''​slotdef=1:​...'',​ ''​slotdef=2:​...'',​ ''​slotdef=3:​...'',​ and ''​slotdef=4:​...'',​ attributes existing somewhere in the symbol and made invisible. The subsequent ''#''​ have a one-to-one correspondence to ''​pinseq=#''​ attributes and specify what corresponding ''​pinnumber=#''​ should be when that slot is set. See the [[#Example|attached 7400-1.sym]] as an example of how this should all work.
   - It is recommended that all symbols which have slots have a ''​slot=1''​ attribute inside the symbol.   - It is recommended that all symbols which have slots have a ''​slot=1''​ attribute inside the symbol.
  
  
-===== Checking a Symbol ​======+===== Checking a Symbol =====
 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. 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.
  
Line 135: Line 139:
 ==== Attributes ==== ==== Attributes ====
   * ''​pinnumber''​ attributes should be displayed as pin numbers for pins (not ''​pinseq''​) and should be 8 pt in size.   * ''​pinnumber''​ attributes should be displayed as pin numbers for pins (not ''​pinseq''​) and should be 8 pt in size.
-  * Attached attributes should be yellow. The color is set automatically to yellow if the text item is attached.+  * Attached attributes should be color number 5 (attributes | yellow). The color is set automatically to yellow if the text item is attached.
   * The only exception to this is ''​pinlabel=''​ attributes, those should be color number 9 (text | green). If every text item within a symbol is yellow, the symbol looks too yellow.   * The only exception to this is ''​pinlabel=''​ attributes, those should be color number 9 (text | green). If every text item within a symbol is yellow, the symbol looks too yellow.
   * Attributes can be attached to some part of the symbol. Toplevel attributes (like the ''​device=''​ or ''​net=''​ 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 ''​name=value''​.   * Attributes can be attached to some part of the symbol. Toplevel attributes (like the ''​device=''​ or ''​net=''​ 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 ''​name=value''​.
-  *  Expanding a bit on the last sentence, as long as the text item has the format ''​name=value'',​ 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 ​'Edit/Show/Hide Inv Text'+  *  Expanding a bit on the last sentence, as long as the text item has the format ''​name=value'',​ 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 ​**Edit**->**Show/Hide Inv Text**
-  * There is a symbol content versioning system in libgeda which is based on the ''​symversion=''​ attribute. Please see the [[master_attributes_list|Master Attribute Document]] for more information on using this versioning scheme.+  * There is a symbol content versioning system in libgeda which is based on the ''​symversion=''​ attribute. Please see the [[master_attributes_list#symversion|Master Attribute Document]] for more information on using this versioning scheme.
  
 ==== Graphics ==== ==== Graphics ====
   * Lines, boxes, arcs, and any other graphics should be color number 3 (graphic | green).   * Lines, boxes, arcs, and any other graphics should be color number 3 (graphic | green).
-  * Polarity bubbles should be color number 6 (logic bubble | cyan)+  * Polarity bubbles should be color number 6 (logic bubble | cyan).
   * 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.   * 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.
  
Line 149: Line 153:
   * Pins should all be 300 mils (3 grid spaces) long.   * Pins should all be 300 mils (3 grid spaces) long.
   * 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.   * 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.
-  * 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 File Format document for more info.+  * 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 [[file_format_spec#​pin|File Format document]] for more info.
   * 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.   * 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.
   * Pins should be color number 1 (pins | white).   * Pins should be color number 1 (pins | white).
Line 161: Line 165:
  
 ==== Electrical ==== ==== Electrical ====
-  * Do not draw power and ground pins. That information will be conveyed using attributes (see the netattrib document).+  * Do not draw power and ground pins. That information will be conveyed using attributes (see the [[na_howto|net= attribute mini-HOWTO]]).
   * The above rule can be broken if necessary, but keep in mind most of the standard library does not have power pins showing.   * The above rule can be broken if necessary, but keep in mind most of the standard library does not have power pins showing.
   * Keep in mind, symbols are supposed to be symbolic, they do not represent the physical package that the device comes in.   * Keep in mind, symbols are supposed to be symbolic, they do not represent the physical package that the device comes in.
Line 171: Line 175:
  
   * Pins MUST be snapped on the 100-spaced grid.   * Pins MUST be snapped on the 100-spaced grid.
-  * 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)+  * 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).
   * 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.   * 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.
-  * If you want to translate a symbol from the origin to elsewhere, then use the 'Edit->​Symbol Translate..' ​command and enter a non zero number. Make sure this number is a multiple of 100 (i.e. 1000, or 1100). +  * If you want to translate a symbol from the origin to elsewhere, then use the **Edit**->**Symbol Translate...** command and enter a non zero number. Make sure this number is a multiple of 100 (i.e. 1000, or 1100). 
-  * 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 Add/Pin command to place a pin.+  * 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 **Add**->**Pin** command to place a pin.
   * Don't include nets or buses inside symbols. That is not supported and doesn'​t make much sense anyway.   * Don't include nets or buses inside symbols. That is not supported and doesn'​t make much sense anyway.
   * ''​pinnumber''​ should be the visible attribute for pins, along with ''​pinlabel''​ if any.   * ''​pinnumber''​ should be the visible attribute for pins, along with ''​pinlabel''​ if any.
Line 181: Line 185:
 This section provides a simple example which tries to follow all of the above rules. This symbol is of a 7400 (NAND gate). This section provides a simple example which tries to follow all of the above rules. This symbol is of a 7400 (NAND gate).
  
-<​code>​v 20031231 1+<​code ​gschem 7400-1.sym>v 20031231 1
 L 300 200 300 800 3 0 0 0 -1 -1 L 300 200 300 800 3 0 0 0 -1 -1
 T 300 0 9 8 1 0 0 0 1 T 300 0 9 8 1 0 0 0 1
Line 247: Line 251:
 net=GND:7 net=GND:7
 T 500 2650 5 10 0 0 0 0 1 T 500 2650 5 10 0 0 0 0 1
-documentation=%%http://​www-s.ti.com/​sc/​ds/​sn74hc00.pdf%%+documentation=http://​www-s.ti.com/​sc/​ds/​sn74hc00.pdf
 </​code>​ </​code>​
  
Line 254: Line 258:
 {{:​geda:​symbol_7400-1_hidden.png|:​geda:​symbol_7400-1_hidden.png}} {{:​geda:​symbol_7400-1_hidden.png|:​geda:​symbol_7400-1_hidden.png}}
  
-This is the same symbol with all the hidden text visible (via 'Edit->​Show/​Hide Inv Text'):+This is the same symbol with all the hidden text visible (via **Edit**->**Show/Hide Inv Text**):
  
 {{:​geda:​symbol_7400-1.png|:​geda:​symbol_7400-1.png}} {{:​geda:​symbol_7400-1.png|:​geda:​symbol_7400-1.png}}
  
geda/gschem_symbol_creation.1352137887.txt.gz · Last modified: 2012/11/05 12:51 by julialongtin