Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 9eb0cb71099fddd84d285279da5452ea > files > 294

geda-docs-1.6.2-1.fc14.noarch.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>

<div class="toc">
<div class="tocheader toctoggle" id="toc__header">Table of Contents</div>
<div id="toc__inside">

<ul class="toc">
<li class="level1"><div class="li"><span class="li"><a href="#creating_gschem_symbols_quickly_and_easily_using_tragesym_and_a_spreadsheet_programm" class="toc">Creating gschem symbols quickly and easily using tragesym and a spreadsheet programm</a></span></div>
<ul class="toc">
<li class="level2"><div class="li"><span class="li"><a href="#required_steps" class="toc">Required Steps</a></span></div></li>
<li class="level2"><div class="li"><span class="li"><a href="#step1open_a_tragesym_template_file" class="toc">Step1: Open a tragesym template file</a></span></div></li>
<li class="level2"><div class="li"><span class="li"><a href="#step2download_the_part_data_sheet_and_find_the_pin_list" class="toc">Step2: Download the part data sheet and find the pin list</a></span></div></li>
<li class="level2"><div class="li"><span class="li"><a href="#step3copy_the_pin_list_into_an_editor_and_prepare_it" class="toc">Step3: Copy the pin list into an editor and prepare it</a></span></div></li>
<li class="level2"><div class="li"><span class="li"><a href="#step4insert_all_missing_data_into_the_spreadsheet" class="toc">Step4: Insert all missing data into the spreadsheet</a></span></div></li>
<li class="level2"><div class="li"><span class="li"><a href="#step5export_the_spreadsheet_into_a_tab_seperated_text_file" class="toc">Step5: Export the spreadsheet into a tab seperated text file</a></span></div></li>
<li class="level2"><div class="li"><span class="li"><a href="#step6execute_tragesym_and_create_the_symbol" class="toc">Step6: execute tragesym and create the symbol</a></span></div></li>
<li class="level2"><div class="li"><span class="li"><a href="#step7check_the_result_with_gschem_and_do_some_artwork" class="toc">Step7: check the result with gschem and do some artwork</a></span></div></li>
<li class="level2"><div class="li"><span class="li"><a href="#conclusion" class="toc">Conclusion</a></span></div></li>
<li class="level2"><div class="li"><span class="li"><a href="#credits" class="toc">Credits</a></span></div></li></ul>
</li></ul>
</div>
</div>



<h1><a name="creating_gschem_symbols_quickly_and_easily_using_tragesym_and_a_spreadsheet_programm" id="creating_gschem_symbols_quickly_and_easily_using_tragesym_and_a_spreadsheet_programm">Creating gschem symbols quickly and easily using tragesym and a spreadsheet programm</a></h1>
<div class="level1">

<p>
 Creating symbols for schematic capture can be very time consuming, error prone, and an all around pain. Luckily, gschem uses an open, text based file format that is very easy to use with scripting. This short tutorial describes how to use the tragesym script, to create symbols very quickly (probably more quickly than with any commercial package).
</p>

</div>
<!-- SECTION "Creating gschem symbols quickly and easily using tragesym and a spreadsheet programm" [1-450] -->
<h2><a name="required_steps" id="required_steps">Required Steps</a></h2>
<div class="level2">
<ul>
<li class="level1"><div class="li"> Step1: Open a tragesym template file</div>
</li>
<li class="level1"><div class="li"> Step2: Download the part data sheet and find the pin list</div>
</li>
<li class="level1"><div class="li"> Step3: Copy the pin list into an editor and prepare it</div>
</li>
<li class="level1"><div class="li"> Step4: Insert all missing data into the spreadsheet</div>
</li>
<li class="level1"><div class="li"> Step5: Export the spreadsheet into a tab seperated text file</div>
</li>
<li class="level1"><div class="li"> Step6: execute tragesym and create the symbol</div>
</li>
<li class="level1"><div class="li"> Step7: check the result with gschem and do some artwork</div>
</li>
</ul>

</div>
<!-- SECTION "Required Steps" [451-873] -->
<h2><a name="step1open_a_tragesym_template_file" id="step1open_a_tragesym_template_file">Step1: Open a tragesym template file</a></h2>
<div class="level2">

<p>
 tragesym comes with two template files. One is <a href="media/tragesym/template2.txt.src" class="media" target="_blank" title="tragesym:template2.txt.src">ASCII text</a>, the second is a <a href="media/tragesym/template2.ods" class="media" target="_blank" title="tragesym:template2.ods">OpenOffice spreadsheet file</a>. You can obtain them from the gEDA utility package, too (utils/examples/tragesym/template.src and utils/examples/tragesym/template.ods).  If you prefer a different spreadsheet program, like gnumeric or kspread, just create your own template out of the textual template file. The only difference between the textual template and the spreadsheet template is the syntax of the key value pairs in the [options] and [geda_attr] sections. The textfile splits them with an equal sign (key=value), the spreadsheet has the value in the second column (which becomes a tab after beeing exported).
</p>

</div>
<!-- SECTION "Step1: Open a tragesym template file" [874-1673] -->
<h2><a name="step2download_the_part_data_sheet_and_find_the_pin_list" id="step2download_the_part_data_sheet_and_find_the_pin_list">Step2: Download the part data sheet and find the pin list</a></h2>
<div class="level2">

<p>
 For this example, we will create a symbol from the Philips Semiconductor PCA9555 16-bit IIC IO port. The description of product and datasheet is available at Philips:  <a href="http://www-us.semiconductors.philips.com/cgi-bin/pldb/pip/pca9555.html" class="urlextern" title="http://www-us.semiconductors.philips.com/cgi-bin/pldb/pip/pca9555.html"  rel="nofollow">http://www-us.semiconductors.philips.com/cgi-bin/pldb/pip/pca9555.html</a>. Download the datasheet and open it with a pdf viewer that allows copying text out of the pdf file, such as kpdf or acroread. Flip through the pages until you find the pinout for the device: 
</p>

<p>
<a href="media/tragesym/kpdf_pinconfiguration.png" class="media" target="_blank" title="tragesym:kpdf_pinconfiguration.png"><img src="media/tragesym/kpdf_pinconfiguration.png" class="media" alt="" /></a> <a href="media/tragesym/acroread_selectiontable.png" class="media" target="_blank" title="tragesym:acroread_selectiontable.png"><img src="media/tragesym/acroread_selectiontable.png" class="media" alt="" /></a>
</p>

<p>
Inside the datasheet the pin list may only be in the drawing of the pin configuration. If there’s a nice table, like in the second picture from a different datasheet, use this one.
</p>

</div>
<!-- SECTION "Step2: Download the part data sheet and find the pin list" [1674-2447] -->
<h2><a name="step3copy_the_pin_list_into_an_editor_and_prepare_it" id="step3copy_the_pin_list_into_an_editor_and_prepare_it">Step3: Copy the pin list into an editor and prepare it</a></h2>
<div class="level2">

<p>
Select the pin list and copy it into a text editor. This intermediate step is required as your spreadsheet programm may need a special field seperator, like comma or tab. You may have to remove duplicate seperators or replace it with tabs. 
</p>

<p>
<strong>Note:</strong> The selection behaviour of kpdf is different from the acroread viewer. The kpdf viewer seems to give you a copy that looks more like the graphical representation, while the acroread viewer produces an output that is more “file order” oriented. If you have to create a lot of symbols, try both and compare the results.
</p>

<p>
<a href="media/tragesym/xemacs_rawselection.png" class="media" target="_blank" title="tragesym:xemacs_rawselection.png"><img src="media/tragesym/xemacs_rawselection.png" class="media" alt="" /></a> <a href="media/tragesym/xemacs_modifiedselection.png" class="media" target="_blank" title="tragesym:xemacs_modifiedselection.png"><img src="media/tragesym/xemacs_modifiedselection.png" class="media" alt="" /></a> <a href="media/tragesym/ooo_selection.png" class="media" target="_blank" title="tragesym:ooo_selection.png"><img src="media/tragesym/ooo_selection.png" class="media" alt="" /></a>
</p>

<p>
The pictures above illustrate the steps: 
</p>
<ul>
<li class="level1"><div class="li"> insert the selection from your pdf viewer into a text editor</div>
</li>
<li class="level1"><div class="li"> modify the pinlist to make your spreadsheet programm happy </div>
<ul>
<li class="level2"><div class="li"> cut out pinlist 24 to 13 with a rectangular selection</div>
</li>
<li class="level2"><div class="li"> insert the rectangular selection below the pins 1 to 12</div>
</li>
<li class="level2"><div class="li"> sort the lines (xemacs can do that <img src="images/smileys/icon_wink.gif" align="middle" alt=";-)" />)</div>
</li>
<li class="level2"><div class="li"> remove or repair the lines with the numbers 2,3,&hellip; They are not in the same line. You can easily recreate the pin numbers later</div>
</li>
<li class="level2"><div class="li"> replace the spaces with tabs (not really need when using OpenOffice)</div>
</li>
</ul>
</li>
<li class="level1"><div class="li"> copy the modified data into the spreadsheet template somewhere beside</div>
</li>
</ul>

</div>
<!-- SECTION "Step3: Copy the pin list into an editor and prepare it" [2448-3823] -->
<h2><a name="step4insert_all_missing_data_into_the_spreadsheet" id="step4insert_all_missing_data_into_the_spreadsheet">Step4: Insert all missing data into the spreadsheet</a></h2>
<div class="level2">

<p>
 Now, move the labels into the label column and the pin numbers into the pin number column. You can use the autofill feature of your spreadsheet programm to create the pin numbers, too.
</p>

<p>
<a href="media/tragesym/ooo_rearanged.png" class="media" target="_blank" title="tragesym:ooo_rearanged.png"><img src="media/tragesym/ooo_rearanged.png" class="media" alt="" /></a>
</p>

<p>
Set the type, style and position column to the most common value. You can use the autofill feature again.
</p>

<p>
Now you want to change some fo the values. Take a look at the pin description table in the datasheet:
</p>

<p>
<a href="media/tragesym/kpdf_pindescription.png" class="media" target="_blank" title="tragesym:kpdf_pindescription.png"><img src="media/tragesym/kpdf_pindescription.png" class="media" alt="" /></a>
</p>

<p>
Regarding to that table we change the following things (see result below): 
</p>
<ul>
<li class="level1"><div class="li"> Pin 1 is an output, we like to have a negation bubble and a negation overbar</div>
</li>
<li class="level1"><div class="li"> A1 to A3 are inputs, we change the type and move them to the left side</div>
</li>
<li class="level1"><div class="li"> set the SCL type to input and move SCL and SDA to the left side, too </div>
</li>
<li class="level1"><div class="li"> change the type of the power pins VSS and VDD and add net names. We use the more usual GND and Vcc.</div>
</li>
</ul>

<p>
 <strong>Note:</strong> If one of your pin labels has a backslash “\” inside, you have to replace it with it’s escape sequence “\\”.
</p>

<p>
<a href="media/tragesym/ooo_changedpins.png" class="media" target="_blank" title="tragesym:ooo_changedpins.png"><img src="media/tragesym/ooo_changedpins.png" class="media" alt="" /></a>
</p>

<p>
Before going on set the attributes and the options to appropriate values.
</p>

<p>
<a href="media/tragesym/ooo_attributes.png" class="media" target="_blank" title="tragesym:ooo_attributes.png"><img src="media/tragesym/ooo_attributes.png" class="media" alt="" /></a>
</p>

</div>
<!-- SECTION "Step4: Insert all missing data into the spreadsheet" [3824-5032] -->
<h2><a name="step5export_the_spreadsheet_into_a_tab_seperated_text_file" id="step5export_the_spreadsheet_into_a_tab_seperated_text_file">Step5: Export the spreadsheet into a tab seperated text file</a></h2>
<div class="level2">

<p>
 You can either use the export function of your spreadsheet programm to create a tab seperated textfile or just select the table and copy the content into your text editor and save the file.
</p>

</div>
<!-- SECTION "Step5: Export the spreadsheet into a tab seperated text file" [5033-5297] -->
<h2><a name="step6execute_tragesym_and_create_the_symbol" id="step6execute_tragesym_and_create_the_symbol">Step6: execute tragesym and create the symbol</a></h2>
<div class="level2">

<p>
Use a shell and execute tragesym: 
</p>

<p>
<code>werner@werner-amd64:~/Desktop/tragesym_tutorial&gt; tragesym pca555.src pca555.sch</code>
</p>

<p>
If tragesym says that there’s an error, just make some changes in the spreadsheet and export the file again, or just edit the exported file.
</p>

</div>
<!-- SECTION "Step6: execute tragesym and create the symbol" [5298-5618] -->
<h2><a name="step7check_the_result_with_gschem_and_do_some_artwork" id="step7check_the_result_with_gschem_and_do_some_artwork">Step7: check the result with gschem and do some artwork</a></h2>
<div class="level2">

<p>
 Now open the generated symbol with gschem and check the result 
</p>

<p>
<code>werner@werner-amd64:~/Desktop/tragesym_tutorial&gt; gschem pca555.sch</code> 
</p>

<p>
Enabling the hidden text (“en”, Edit&rarr;Show/Hide Inv Text), you can see the whole generated symbol. It’s not really necessary to change anything, but it might improve the look of the symbol if you rearange the pins a little bit.
</p>

<p>
<a href="media/tragesym/gschem_showhidden.png" class="media" target="_blank" title="tragesym:gschem_showhidden.png"><img src="media/tragesym/gschem_showhidden.png" class="media" alt="" /></a> <a href="media/tragesym/gschem_finished.png" class="media" target="_blank" title="tragesym:gschem_finished.png"><img src="media/tragesym/gschem_finished.png" class="media" alt="" /></a>
</p>

<p>
Now we have a complete symbol. You can copy the symbol to your local symbol library e.g. /usr/local/share/gEDA/sym/local/ and use it.
</p>

</div>
<!-- SECTION "Step7: check the result with gschem and do some artwork" [5619-6260] -->
<h2><a name="conclusion" id="conclusion">Conclusion</a></h2>
<div class="level2">

<p>
This was a simple example with a small pincount, but this method really pays off when you have high pin counts (ie, bga-272, tfqp-100, etc).
</p>

</div>
<!-- SECTION "Conclusion" [6261-6425] -->
<h2><a name="credits" id="credits">Credits</a></h2>
<div class="level2">

<p>
Many thanks to &lt;Russ.Dill(AT)asu.edu&gt;, who wrote the first version of this tutorial. You can find that tutorial at <a href="http://www.geda.seul.org/docs/current/tutorials/tragesym/tragesym.html" class="urlextern" title="http://www.geda.seul.org/docs/current/tutorials/tragesym/tragesym.html"  rel="nofollow">http://www.geda.seul.org/docs/current/tutorials/tragesym/tragesym.html</a>  
</p>

</div>
<!-- SECTION "Credits" [6426-] --></body>
</html>