This document is a manual for Pcb, the open source, interactive printed circuit
board layout system.
Copyright © 1994,1995,1996,1997 Thomas Nau
Copyright © 1998,1999,2000,2001,2002 harry eaton
This program is free software; you may redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANT-ABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Pcb is a handy tool for laying out printed circuit
boards.
Pcb was first written by Thomas Nau for an Atari ST in 1990 and
ported to UNIX and X11 in 1994.
It was not intended as a professional layout system,
but as a tool which supports people who do some
home-developing of hardware.
The second release 1.2 included menus for the first time. This made
Pcb easier to use and thus a more important tool.
Release 1.3 introduced undo for highly-destructive commands, more straightforward action handling and scalable fonts. Layer-groups were introduced to group signal-layers together.
Release 1.4 provided support for add-on device drivers. Two layers (the solder and the component side) were added to support SMD elements. The handling of libraries was also improved in 1.4.1. Support for additional devices like GERBER plotters started in 1.4.4. The undo feature was expanded and the redo-feature added in 1.4.5.
harry eaton took over pcb development beginning with Release 1.5, although he contributed some code beginning with Release 1.4.3
Release 1.5 provides support for rats-nest generation from simple net lists. It also allows for automatic clearances around pins that pierce a polygon. A variety of other enhancements including a Gerber RS-274X driver and NC drill file generation have also been added.
Release 1.6 provides automatic screen updates of changed regions. This should eliminate most of the need for the redraw (R key). Also some changes to what order items under the cursor are selected were made for better consistency - it is no longer possible to accidentally move a line or line point that is completely obscured by a polygon laying over top of it. Larger objects on the upper most layers can be selected ahead of smaller objects on lower layers. These changes make operations more intuitive. A new mode of line creation was added that creates two line on 45 degree angles with a single click. The actual outline of the prospective line(s) are now shown during line creation. An arc creation mode was added. Drawn arcs are quarter circles and can be useful for high frequency controlled impedance lines. (You can have eighth circle arc if the source is compiled with -DARC45, but be aware that the ends of such arcs can never intersect a grid point). Two new flags for pins and vias were created - one indicates that the pin or via is purely a drill hole and has no copper annulus. You can only toggle this flag for vias - for elements, it must be an integral part of the element definition. The other flag controls whether the pad will be round or octagonal. There is also now a feature for converting the contents of a buffer into an element.
Release 1.6.1 added the ability to make groups of action commands bound to a single X11 event to be undone by a single undo. Also a simple design rule checker was added - it checks for minimum spacing and overlap rules. Plus many fixes for bugs introduced with the many changes of 1.6
Release 1.7 added support for routing tracks through polygons without touching them. It also added support for unplated drill files, and drawing directly on the silk layer. A Netlist window for easily working with netlist was also added.
Release 2.0 adds an auto-router, a new simpler library mechanism, much improved support for graphically creating (and editing) elements, viewable solder-mask layers (and editing), snap to pins and pads, netlist entry by drawing rats, element files (and libraries) that can contain whole sub-layouts, metric grids, improved user interface, a GNU autoconf/automake based build system, and a host of other improvements.
Special thanks goes to:
Thomas Nau (who started the project and wrote the early versions).
C. Scott Ananian (who wrote the auto-router code).
Bernhard Daeubler (Bernhard.Daeubler@physik.uni-ulm.de)
Harald Daeubler (Harald.Daeubler@physik.uni-ulm.de)
DJ Delorie (djdelorie@users.sourceforge.net)
Larry Doolittle (ldoolitt@recycle.lbl.gov)
Dan McMahill (danmc@users.sourceforge.net)
Roland Merk (merk@faw.uni-ulm.de)
Erland Unruh (Erland.Unruh@malmo.trab.se)
Albert John FitzPatrick III (ajf_nylorac@acm.org)
Boerge Strand (borges@ifi.uio.no)
Andre M. Hedrick (hedrick@Astro.Dyer.Vanderbilt.Edu)
who provided all sorts of help including porting Pcb to
several operating systems and platforms, bug fixes, library enhancement,
user interface suggestions and more. In addition to these people,
many others donated time for bug-fixing and
other important work. Some of them can be identified in the source code
files. Thanks to all of them. If you feel left out of this list, I
apologize; please send me an e-mail and I'll try to correct the omission.
Pcb is an open source printed circuit board editor.
Pcb includes many professional features such as:
Pcb is Free Software
Each layout consists of several, mostly independent, objects. This chapter
gives an overview of the object types and their relationship to each other.
For a complete description of how to use Pcb, refer to
Getting Started.
The layout is generated on-screen on a grid that can have its origin
at any desired location.
The X coordinate increases to the right, Y increases down to the bottom.
All distances and sizes in Pcb are measured in mils
(0.001 inch). One unit on the coordinate display is one mil in
distance on the board.
The grid may be set on a metric pitch, but is only correct to within
the nearest +/- 0.01 mil because Pcb stores all dimensions as
integer multiples of 1/100 of a mil or 0.00001 inch.
The sections in this chapter are sorted by the order of appearance of the objects within a layout file.
The top object is the layout itself. It uses a set of symbols
that resides at the first logical level. Each symbol is uniquely identified
by a seven bit ASCII code. All layout objects share the same set of
symbols. These symbols are used to form text objects on the silkscreen
and copper layers. Undefined symbols are drawn as filled rectangles.
Every font file is preprocessed by a user-defined command when it is loaded. For details see ‘fontCommand’, Resources.
Vias provide through-hole connectivity across all layers. While vias look a lot like element pins, don't use vias for adding elements to the layout, even if that seems easier than creating a new element. The default solder-mask will cover over vias, so you won't be able to solder to them. Of course, you can change this so that vias also have solder-mask cut-outs, but it is not the default. Vias are also useful for defining arbitrary drill points such as those used for mounting a board. Vias used in this way have a special flag set so that they have no annular copper ring, and also appear in the unplated drill file. Ctrl-H key over a via switches it between being a pure-mounting hole and a regular via. You can assign a name to a via, which is useful during the creation of new element definitions. Each via exists on all copper layers. (i.e. blind and buried vias are not supported)
Elements represent the components on a board.
Elements are loaded from ASCII coded files in a
similar manner to the layout file itself, or from the
library selector window.
An element is composed of lines and arcs on the silk-screen
layer (used to define the package outline), pins
(or pads for SMD) and three labels that define the
description, the element's layout-name (which also
appears on the silk-screen layer) and its value. You
can choose which of the names are displayed on the screen
with the Screen menu; however, the silk screen in
the printout will always show the layout-name.
Element pins are contained on the first logical level
and so reside on all layers, but the pads of surface-mount
elements reside on only the component or solder
layers. An element can have a mixture of pins, pads
(on one or both sides), and mounting holes.
A mark is used to position the element with
respect to the cross hair during pasting.
The mark will lie on a grid point when the element
is positioned. The mark is drawn as a small diamond
shape, but is only visible when both the silk
and pins/pads layers are visible.
All parts of an element are treated as one unit, except for
the name.
It is not possible to delete a single pin or move
only part of an element on the layout.
You can resize separate pieces of an element,
but doing so is usually a bad idea. You can move/rotate
the element name independently of the element it belongs
to. When you move an element name, a line is draw from
the cursor to the element mark so it is easy to tell
which element the name belongs to.
Each pin and pad has two string identifiers, one is the "name" which is a functional description of the pin (e.g. "clock in") and the other is the "number" of the pin which is used to identify it in a netlist. The "number" is usually an integer, but it can be any string. You can edit the "name" of each pin of an element, but the "number" is embedded in the element definition and is determined when the new element is first created. Pads are similar to lines on a layer but they must be oriented either vertically or horizontally. Pads can have either rounded or square ends. Pins can be round, square, or octagonal.
Elements are supported by several special layers: silk, pins/pads and
far-side. The silk layer shows the package outline and
also holds legend text and element names. The pins/pads layer is used to toggle
whether the element's pins and pads are displayed. The far-side layer controls visibility
of objects (silkscreen and pads) that are on the far (i.e. not currently viewed) side
of the board.
The “oldlib” style of footprint libraries distributed with
Pcb rely upon the M4 macro processor. M4 is typically
installed under the name m4 on most unix-like operating
systems. It is recommended that you use the GNU version of M4 to
avoid limitations found in some vendor implementations. See the m4
man page on your system for more information.
Every element file is preprocessed by a user-defined command when the file is read.
For details see ‘elementCommand’, Resources. m4, the default
value of ‘elementCommand’, allows you to create libraries for
package definitions that are shared by all elements.
The old element libraries distributed with Pcb expect m4 or an
equivalent to be the elementCommand. The new library scheme simply has
each element stored in a self-contained file, so there is no need to learn
m4 to add to the libraries.
Pcb can create a list of
all connections from one (or all) elements to the others or a list of
unconnected pins.
It can also verify the layout connections against a netlist file.
The element's ‘layout-name’ is the name used to identify the element
in a netlist file (see Netlist File).
The old libraries, or very old (pre-1.6) layout files may have
incorrect pin numbering since there was no concept of pin numbers
when they were created. Pcb uses the order of appearance of
the pin definitions in the layout or library file if it uses the
old format, but there is no guarantee that it will be correct for
these old objects.
Be aware that a few of the old library parts may still be incorrectly
implemented regarding pin-numbering. All of the DIL (Dual-
Inline-Pins) parts are correct and most of the others are too,
but you should verify the pin numbering
of any non-DIL part before using an old library part.
(use the ‘generate object report’ in the Info menu
to see what Pcb thinks a pin's number is)
All of the old
library names begin with a ~, so you can easily identify them.
The old libraries also may contain other sorts of errors,
including incorrect pin spacing, silkscreen overlapping solder areas, etc.
Check carefully any element in the old library before using it!
As the new library grows, the old library will be pared down to
at least remove all of the elements with errors, but this will
take time.
You can make your own element definitions graphically now. Simply draw vias for the pins, lines on the solder and/or component layers for surface-mount pads (they must be either horizontal or vertical), and lines and arcs on the silkscreen layer for the silkscreen outline. You should name (N key) each via and copper line with the pin number. Once you are happy with the geometry, select everything that is to become part of the element, then choose ‘convert selection to element’ from the Select menu. Afterwords you can make pin (or pad) one square if you like, and give the element its various names. You can also give the pins and pads their functional names. Note that the element mark corresponds to the position you click after choosing the conversion from the menu, so decide where the mark goes and make sure it falls on a grid point before you request the conversion. If the vias/lines are not named, then the pin numbering will correspond to the order in which they were placed.
When you create a new element, remember that silkscreen lines should never overlap the copper part of the pins or pads, as this can interfere with soldering. The silkscreen should identify the maximum extent of the element package so it is easy to see how close elements can be placed together.
If you want to make an element similar to an existing one, you can
break an element into constituent pieces from the Buffer menu.
Paste the pieces to the layout, make the necessary changes, then
convert it back into an element. If the pin numbers haven't changed,
there is no need to name each via/line as they are pre-named when
the element was broken apart. When you create a new element, you
can save it to a file in order to have easy access to it the next
time you run Pcb.
Every layout consists of several layers that can be used independently or treated as a group. Layer groups can be used to logically separate (and color-code) different traces (e.g. power and signal); however, all layers within a group reside on the same physical copper layer of a board, so using different layers within the same group won't provide electrical separation where they touch or overlap. For details, see ‘layerGroups’, Resources. Each layer is drawn in a color defined in the resource file and identified by a name that you can change (for details see ‘layerColor’, Resources.) Layers are really just containers for line, arc, polygon, and text objects. The component and solder layers contain SMD elements as well, but the file structure doesn't reflect that fact directly.
Each layer group represents a physical layer on the printed circuit board. If you want to make a four layer board, you'll need to have at least four layer groups. Connections between layer groups are established only through element pins and vias. The relationship between a specific layer and the board itself is configurable from the ‘Edit layer groups’ option in the Settings menu. The layer groups corresponding to the physical layers: component-side and solder-side are always defined and you must map at least one logical layer to each, even if you plan to make a single-sided board. You are not obligated to put tracks on either of them. Surface mount elements always reside on either the component-side or the solder-side layer group. When you paste an element from the buffer, it will go onto whichever side of the board you are viewing. You can swap which side of the board you are viewing by pressing the Tab key, or by selecting ‘view solder side’ from the Screen menu. The layer groups just have a name or number associated with them - where they are sandwiched in the board is left for you to tell the manufacturer.
The silkscreen layer is special because there are actually two silkscreen layers, one for the top (component) and one for the bottom (solder) side of the board. Which silk layer you draw on is determined by the side of the board that you are viewing. If you are viewing the component side, then drawing on the silk layer draws to the component-side silk layer.
The netlist layer is another special layer. It shows rat's-nest lines
(i.e. guides that show how the netlist expects the element to interconnect).
If you make this the active layer, you can use the Line tool to add
entries into the netlist, or to delete connections from the netlist
window. Except for these two purposes, you should not
make the netlist layer the active layer. Usually there is no need to
do this because a separate schematic package should be used to create the
netlist. Pcb can automatically draw all of the rats from
the netlist. In some cases you may want to make a small change without
going to the trouble of modifying the schematic, which is why this
facility is provided.
Lines are used to draw tracks on the pc board. When in the line mode, each Btn1 press establishes one end of a line. Once the second point is defined, the line is drawn and a new line started where the first one ended. You can abandon the new starting point in favor of another by pressing Ctrl-Btn1, or Btn3, but don't use Btn2. The undo function (U key or ‘Undo’ from the Edit menu) will take you back point by point if you use it while in the line mode.
New lines can be restricted to 45 degree angles if desired. You can toggle this restriction on and off while creating lines by pressing the period key. If the 45 degree restriction is turned on, then the / (forward slash) key can be used to cycle through three different modes of 45 degree line creation. One mode just creates a single line forced to the nearest 45 degree vector. The next mode creates two lines from the start to end points such that the first line leaves the start point at a 90 degree vector, and the second line enters the end point on a 45 degree vector. The last mode creates two lines such that the first line leaves the start point on a 45 degree vector and arrives at the end point on a 90 degree vector. You can temporarily swap between the last two modes by holding the Shift key down.
It is simple to edit a line object by breaking it into pieces (insert point mode),
moving an end point or the whole line (Arrow tool),
or changing the layer it resides on (M key moves the line under the pointer
to the active layer).
In the case when two line segments meet at exactly the same
point you can delete the intermediate point, otherwise the delete tool removes an entire line.
Feel free to experiment
since Pcb will allow you to undo and redo anything that materially affects your work.
If you switch active layers in the midst of placing lines a via will automatically be
placed, when necessary, in order to continue the connection.
If you draw a line inside a polygon, it will either plow through the polygon creating a clearance, or touch the polygon. This behavior is selectable in the Settings menu for new lines. To change the behavior of an existing line, hit the J key with the cross hair over the line. You can increase the size of the clearance by 2 mils on each edge with the K key. Shift-K will decrease the clearance by 2 mils. The increment may be changed from 2 mils through the application resource file. The clearance can be also increased, decreased and set by the ChangeClearSize action.
Lines do not need to intersect the center of a pin, pad, via, or other
line for Pcb to understand that they make electrical connection.
If the connection is too tenuous, running the design rule checker will report
that the connection may break if the line width shrinks slightly.
Pcb can handle arcs of any angular extent, but when you
create an arc with the Arc tool, it will
be a quarter circle (this means they always bend a right angle). Arcs are very similar
to lines otherwise. They are created on the active layer and have the same thickness
that new lines will have. The various clicks for creating lines work pretty much the
same way for creating arcs.
In order to make the arc curve in the desired direction, drag the mouse along
the tangent line from the starting position towards the end position. If the grid is
too coarse, it may not be possible to distinguish whether you've moved over then up,
or up then over, so if you can't seem to make the arc go in the direction you want, try pressing
the Shift key while drawing the arc. Decreasing the grid spacing may also help.
Alternatively you can draw the wrong arc, then
rotate and move it where you want. Like the Line tool, after an arc is drawn a new
starting point is established at the end point.
Whenever a starting point is established by either the Line or Arc tools it will be retained if you switch directly between the tools (e.g. F2 key for Lines, F8 key for Arcs). Arcs can either touch or clear polygons just like lines do. Of course connection searches, undo and all the other features you'd expect work with arcs too.
Sometimes it's useful to fill large areas with solid copper. The way to do this is with polygons. Polygons can be created in either the polygon mode or the rectangle mode. In the polygon mode, you'll have to define each corner of the polygon with a mouse click (Btn1). When the last point is clicked exactly on top of the starting point, the polygon is finished. Since this can be hard to do, the Shift-P key will enter the final point for you, closing the polygon. If the 45 degree angle restriction is turned on and you try to close the polygon when it is not possible, you'll get a warning instead. If you haven't finished entering a polygon, but want to undo one (or more) of the points that you've already defined, use the undo command (U key).
With the rectangle tool, defining the two diagonally opposite corners is sufficient, but of course the resulting polygon is a rectangle. Like lines, a polygon can by edited by deleting, inserting and moving the points that define it. Pins and vias always clear through polygons without touching them when first positioned. You must add a thermal with the thermal tool in order to connect pins and vias to polygons. Thermals can be added and removed by clicking Btn1 with the thermal tool over the pin or via. The thermal tool always places a thermal to polygons on the active layer, so if the tool doesn't seem to work, it's probably because the polygon you want to touch is not on the active layer. You can change the style of thermal used or make a solid connection by holding down Shift while clicking Btn1 with the thermal tool over the pin or via.
Pcb is capable of handling complex polygons, but
using a number of simpler ones improves performance of the connection tracing code.
You also must be careful not to create polygons that touch or overlap themselves.
The fabricated board may not look the way you expect if you violate this
principle. It is always ok to have two (or more) polygons touch or overlap
each other, but not for points within the same polygon to do so.
The great advantage to this new polygon behavior is that simple or complex ground
and/or power planes can be easily made with polygons and seen on the screen.
If you don't want this auto-clearance behavior, or you load a layout created by
an early version of Pcb, the old behavior
(shorts to all piercing pins and vias) is available. A ‘ChangeSize’
operation (S key) toggles a polygon between the new and old polygon/pin
behavior.
Text objects should be used to label a layout or to put additional information on the board. Elements have their ‘layout-name’ labels on the silk-screen layer. If you are making a board without a silkscreen, you can use copper text to label the elements, but you have to do this manually.
Text is always horizontal when first created, but the rotate mode can align it along 0, 90, 180 and 270 degree angles. Text on the far side of the board will automatically appear mirror-imaged.
Warning: TEXT OBJECTS ON A COPPER LAYER CREATE COPPER LINES BUT THEY ARE NOT SCANNED FOR CONNECTIONS OR TESTED FOR CREATING SHORTS VS. THE NETLIST. NEITHER ARE TEXT OBJECTS TESTED AGAINST ANY DESIGN RULES.
Layout files also contain the netlist that describes how the elements are supposed to be interconnected. This list of connections can be loaded from a netlist file (see Netlist File), or entered by drawing rat-lines as described previously. Each net has a name and routing style associated with it. The net contains a list of all element layout-name names and pin numbers that should be connected to the net. Loading a netlist file will replace all existing nets with the ones from the file. The Netlist window provides an easy way to browse through the net list. You can display the rat's-nest by selecting ‘optimize rats-nest’ from the Connects menu. If you move or rotate elements, the rat's-nest will automatically follow the movements, but they won't necessarily show the shortest paths until you optimize them again.
The goal of this chapter is to give you enough information to learn how
Pcb works and how to develop your layouts to make the best use of Pcb's
features. All event translations (i.e. the buttons and keys you
press) refer to the default application resource file shipped with Pcb.
There is probably no need to change this unless your window
manager uses some of the button events itself; however, if you want
to customize the behavior of Pcb then changing the resource file
is usually the best way to do it.
Get yourself a printout of this chapter and User Commands, if you haven't already done so, and follow the examples.
Start Pcb (the actual command will use all lower-case letters)
without any additional options.
If you get the error message:
can't find default font-symbol-file 'default_font'
then the font searchpath or filename in the application resource
file is wrong. Be sure that your m4 program supports search paths.
If not, get GNU m4.
For other messages, see problems.
Another quick-start is provided by pcbtest.sh in the src
directory. If some features don't seem to work, try running pcbtest.sh,
if that works, then Pcb hasn't been installed properly.
The main window consists of five areas: the menu at the top, the layer control in the upper left, the tool buttons located below the layer controls, the Layout area to the right of these, and the status line at the bottom of the window.
The menus are located at the top of the Layout area. Most, but not all, of their functions are also available from the keyboard. Similarly, some functions are only achievable through the keyboard or command entry. Some menu entries such as ‘center layout’ in the Screen menu require a certain cross hair position. In this case a prompt message will popup at the bottom of the screen with wording similar to the following:
move pointer to the appropriate screen position and press a button
Any mouse button will do the job, whereas any key except the arrow (cursor) keys will cancel the operation. If it seems like the menu hasn't done what you expected, check to see if it is waiting for the position click. For details see Actions.
Pressing Btn3 in the Layout area also pops up a menu with many of the most common operations (except when you're in the midst of drawing a line or arc). When a choice in the Btn3 popup menu needs a cross hair position, it uses the position where the cross hair was when Btn3 was pressed. For example, to get detailed information on an object, place the cross hair over the object, press Btn3, then choose ‘object report’. If you pop up the Btn3 menu but don't want to take any of the actions, click on one of the headers in the menu.
The View menu also allows you to turn on and off the visibility of the solder-mask layer. When the solder-mask layer is made visible it obscures most of the layout, so only turn this on when you really want to know what the solder-mask will look like. The solder-mask that you see belongs to the side of the board you are viewing, which can be changed with the ‘Flip up/down’ option, also found in the View menu. When the solder-mask is displayed, the pin and pad clearance adjustments (see Line Objects) alter the size of mask cut-outs.
Pcb always knows which tracks
were routed by the auto-router, and you can selectively remove them
without fear of changing tracks that you have manually routed
with the ‘rip-up all auto-routed tracks’ entry in the Connects
menu. The ‘design rule checker’ entry runs a check for copper
areas that are too close together, or connections that touch too
tenuously for reliable production. The DRC stops when the first
problem is encountered so after fixing a problem be sure to
run it again until no problems are found.
Warning: COPPER TEXT IS IGNORED BY THE DRC CHECKER.
Pcb's
windows to the front. The Library window is used to
bring elements from the library into the paste-buffer. The
Message Log window holds the various messages that
Pcb sends to the user. The Netlist window shows
the list of connections desired.
Now that you're familiar with the various menus, it's time to try some things out. From the File menu choose ‘Open...’, navigate to the tutorial folder, then load the file ‘tut1.pcb’.
The status-line is located at the bottom edge of the main window. During normal operation the status information is visible there. When a selected menu operation requires an additional button click, the status-line is replaced by a message telling you to position the cursor and click. When a text input is required, the status-line is replaced by the Input-field which has a prompt for typing the input.
The status-line shows, from left to right, the side of the board that you are viewing (Tab key changes this), the current grid values, if new lines are restricted to 45 degrees, which type of 45 degree line mode is active, whether rubberband move and rotate mode is on (R), and the zoom factor. This information is followed by the active line-width, via-size and drilling hole, keepaway spacing, and text scaling. Last is the active buffer number and the name of the layout. An asterisk appearing at the far left indicates that the layout has been modified since the last save. Note that the name of the layout is not the same thing as the filename of the layout. Change the grid factor to 1.0 mm from the Screen menu. Observe how the status line shows the new grid setting. Except for the case of the metric grid, all dimensions in the status line are in units of 0.001 inch (1 mil).
The input-field pops up (temporarily replacing the status-line) whenever user input is required. Two keys are bound to the input field: the Escape key aborts the input, Return accepts it. Let's change the name of a component on the board to see how the input-field works. Position the cross hair over R5, and press the N key. The input field pops-up showing the name for you to edit. Go ahead and change the name, then hit return. Notice the name of the element changed. Now undo the change by pressing the U key. You can position the cross hair over the name, or the element before pressing the N key.
Now select ‘realign grid’ from the Screen menu. Notice that the status line has been replaced with an instruction to position the cursor where you want a grid point to fall. In this case, since the cross hair can only fall on a grid point, you must move the tip of the finger cursor to the place where you want a grid point to appear. Do not worry that the cross hair is not coincident with the cursor. Click Btn1 at your chosen location. See how the grid has shifted, and the status line has returned.
The present cross hair position is displayed in the upper right corner of the window. Normally this position is an absolute coordinate, but you can anchor a marker at the cross hair location by pressing Ctrl-M (try it now) and then the display will read both the absolute cross hair position as well as the difference between it and the marker. The numbers enclosed in < > are the X and Y distances between the cross hair and the mark, while the numbers enclosed in parenthesis are the distance and angle from the mark to the cross hair. The values displayed are always in units of 0.001 inch (1 mil). Pressing Ctrl-M again turns the marker off.
The layer control panel, located in the upper left, is used to turn on and off the display of layer groups and to select the active drawing layer. If a layer hasn't been named, the label "(unknown)" is used as the default. If this happens, it probably means the application resources are not installed properly.
The upper buttons are used to switch layers on and off. Click <Btn1> on one or more of them. Each click toggles the setting. If you turn off the currently active layer, another one that is visible will become active. If there are no others visible, you will not be able to turn off the active layer. When the layers are grouped, clicking on these buttons will toggle the visibility of all layers in the same group. This is a good idea because layers in the same group reside on the same physical layer of the actual board. Notice that this example has 2 groups each having 3 layers, plus two other layers named ‘unused’. Use the ‘Edit layer groups’ option in the ‘Settings’ menu to change the layer groupings in the lesstif GUI or the ‘Preferences’ dialog from the ‘File’ menu in the GTK+ GUI. Note that changing the groupings can radically alter the connectivity on the board. Grouping layers is only useful for helping you to color-code signals in your layout. Note that grouping layers actually reduces the number of different physical layers available for your board, so to make an eight layer board, you cannot group any layers.
The far side button turns on and off the visibility of elements (including SMD pads) on the opposite (to the side you're viewing) board side, as well as silk screening on that side. It does not hide the x-ray view of the other copper layers, these must be turned off separately if desired. Use the tab key to view the entire board from the other side. To see a view of what the back side of the board will actually look like, make the solder layer the active layer then press tab until the status line says "solder" on the right, then turn off the visibility of all layers except solder, pins/pads, vias, and silk. Now turn them all back on.
The lowest button, named active, is used to change the active drawing layer. Pressing <Btn1> on it pops up a menu to select which layer should be active. Each entry is labeled with the layer's name and drawn in its color. The active layer is automatically made visible. The active layer is always drawn on top of the other layers, so the ordering of layers on the screen does not generally reflect the ordering of the manufactured board. Only the solder, component, silkscreen, and solder-mask layers are always drawn in their physical order. Bringing the active layer to the top makes it easier to select and change objects on the active layer. Try changing the active layer's name to ABC by selecting ‘edit name of active layer’ from the ‘Edit’ menu. Changing the active layer can also be done by pressing keys 1..MAX_LAYER.
Turn off the visibility of the component layer. Now make the component layer the active layer. Notice that it automatically became visible. Try setting a few other layers as the active layer. You should also experiment with turning on and off each of the layers to see what happens.
The netlist layer is a special layer for adding connections to the netlist by drawing rat lines. This is not the recommended way to add to the netlist, but occasionally may be convenient. To learn how to use the netlist layer see Net Objects.
The tool selector buttons reside below the layer controls. They are used to select which layout tool to use in the drawing area. Each tool performs its function when Btn1 is pressed. Every tool gives the cursor a unique shape that identifies it. The tool selector buttons themselves are icons that illustrate their function. Each layout tool can also be selected from the keyboard:
F1 key Via tool
F2 key Line tool
F3 key Arc tool
F4 key Text tool
F5 key Rectangle tool
F6 key Polygon tool
F7 key Buffer tool
F8 key Delete tool
F9 key Rotate tool
Insert key Insert-point tool
F10 key Thermal tool
F11 key Arrow tool
F12 key Lock tool
Some of the tools are very simple, such as the Via tool. Clicking Btn1 with the Via tool creates a via at the cross hair position. The via will have the diameter and drill sizes that are active, as shown in the status line. The Buffer tool is similar. With it, <Btn1> copies the contents of the active buffer to the layout, but only those parts that reside on visible layers are copied. The Rotate tool allows you to rotate elements, arcs, and text objects 90 degrees counter-clockwise with each click. Holding the Shift key down changes the Rotate tool to clockwise operation. Anything including groups of objects can be rotated inside a buffer using the rotate buffer menu option.
The Line tool is explained in detail in Line Objects. Go read
that section if you haven't already.
Activate the Line tool. Set the active layer to the solder layer.
Try drawing some lines. Use the U key to undo some of the
lines you just created. Zoom in a bit closer with the Z key.
Draw some more lines. Be sure to draw some separate lines by starting
a new anchor point with Ctrl-Btn1. Change the ‘crosshair snaps to pin/pads’
behavior in the Settings menu. Now draw a line. Notice that
the new line points must now always be on a grid point. It might not
be able to reach some pins or pads with this setting. Increase the active line thickness
by pressing the L key. Note that the status line updates
to reflect the new active line thickness. Now draw another line. Before completing the
next line, make the component layer active by pressing the 4 key.
Now finish the line. Notice that a via was automatically placed where
you switched layers. Pcb does not do any checks to make sure that
the via could safely be placed there. Neither does it interfere with
your desire to place lines haphazardly. It is up to you to place
things properly when doing manual routing with the Line tool.
The Arc tool is explained in detail in Arc Objects. Its use is very similar to the Line tool.
The Rectangle tool, Polygon tool and Thermal tool are explained in detail in Polygon Objects. Go read that section. Remember that the Thermal tool will only create and destroy thermals to polygons on the active layer. Use the Rectangle tool to make a small copper plane on the component layer. Now place a via in the middle of the plane. Notice that it does not touch the plane, and they are not electrically connected. Use the Thermal tool to make the via connect to the plane. Thermals allow the via or pin to be heated by a soldering iron without having to heat the entire plane. If solid connections were made to the plane, it could be nearly impossible to solder. Shift-click on the via with the Thermal tool to change the style of thermal used or to make the connection solid. Click on the via again with the Thermal tool to remove the connection to the plane.
The Insert-point tool is an editing tool that allows you to add points into lines and polygons. The Insert-point tool enforces the 45 degree line rule. You can force only the shorter line segment to 45 degrees by holding the Shift key down while inserting the point. Try adding a point into one of the lines you created. Since line clipping is turned on, you may need to move the cross hair quite far from the point where you first clicked on the line. Turn off the line clipping by selecting ‘all-direction lines’ from the Settings menu (or hit the Period key). Now you can place an inserted point anywhere. Try adding a point to the rectangle you made earlier. Start by clicking somewhere along an edge of the rectangle, then move the pointer to a new location and click again.
The delete-mode deletes the object beneath the cursor with each Btn1 click. If you click at an end-point that two lines have in common, it will replace the two lines with a single line spanning the two remaining points. This can be used to delete an "inserted" point in a line, restoring the previous line. Now delete one of the original corner points of the polygon you were just playing with. To do this, place the cross hair over the corner and click on it with the Delete tool. You could also use the Backspace key if some other tool is active. Try deleting some of the lines and intermediate points that you created earlier. Use undo repeatedly to undo all the changes that you've made. Use redo a few times to see what happens. Now add a new line. Notice that you can no longer use redo since the layout has changed since the last undo happened. The undo/redo tree is always pruned in this way (i.e. it has a root, but no branches).
The Arrow tool is so important, it has its own section: Arrow Tool. Go read it now.
The Lock tool allows you to lock objects on the layout. When an object is locked, it can't be selected, moved, rotated, or resized. This is useful for very large objects like ground planes, or board-outlines that are defined as an element. With such large objects, nearly anywhere you click with the Arrow tool will be on the large object, so it could be hard to draw box selections. If you lock an object, the Arrow tool will behave as if it didn't exist. You cannot unlock an object with undo. You must click on it again with the Lock tool. If an object is locked, previous changes to it cannot be undone either. When you lock an object, a report message about it is popped up and will always tell you what object it is, and that it is locked if you just locked it. Other than noticing your inability to manipulate something, the only way to tell an object is locked is with a report from the Info menu. Use the Lock tool sparingly.
The layout area is where you see the layout. The cursor shape depends on the active tool when the pointer is moved into the layout area. A cross hair follows the mouse pointer with respect to the grid setting. Select a new grid from the Screen menu. The new value is updated in the status line. A different way to change the grid is Shift<Key>g to decrease or <Key>g to increase it, but this only works for English (integer mil) grids. The grid setting is saved along with the data when you save a pcb layout. For homemade layouts a value around 50 is a good setting. The cursor can also be moved in the layout area with the cursor (arrow) keys or, for larger distances, by pressing the Shift modifier together with a cursor key.
This optional window is used to display all kind of messages including
the ones written to stderr by external commands. The main advantage
of using it is
that its contents are saved in a scrolling list until the
program exits. Disabling this feature by setting the resource
useLogWindow to false will generate popup windows to display
messages. The stderr of external commands will appear on Pcbs
stderr which normally is the parent shell. I suggest you iconify
the log window after startup for example by setting *log.iconic to
true in the resource file. If raiseLogWindow is set true,
the window will deiconify and raise itself whenever new messages are to be
displayed.
The library window makes loading elements (or even partial layouts) easy.
Just click the appropriate library from the list on the left. A list
of its elements then appears on the right. Select an element
from the list by clicking on its description. Selecting an element from the
library will also automatically copy the element into
the active buffer, then invoke the Buffer tool so
you can paste it to the layout. Elements in the old library should be
taken with a grain of salt (i.e. check them carefully before
using). The old library names all begin with ~ so you can easily distinguish between
the old and new libraries. All of the elements in the new library
should be thoroughly vetted, so you
can use them with confidence. The new libraries are stored simply
as directories full of element files, so making additions to the
new library is easy since there is no need to learn m4.
For details on the old libraries,
check-out Library File and Library Contents File. For
details on the format of an element file used for the new libraries,
see Element File.
The netlist window is very similar to the library window. On the left is a list of all of the nets, on the right is the list of connections belonging to the chosen net. The chosen net is highlighted in the list and also shown on the second line of the window in red. If the net name has a star to the left of it then it is "disabled". A disabled net is treated as if it were not in the net list. This is useful, for example, if you plan to use a ground plane and don't want the ground net showing up in the rat's nest. You can enable/disable individual nets by double-clicking the net name. If you want to enable or disable all nets at once, there are two buttons at the top of the netlist window for this purpose.
The button labeled ‘Sel Net On Layout’ can be used to select (on the layout) everything that is connected (or is supposed to be connected) to the net. If you click on a connection in the connection list, it will select/deselect the corresponding pin or pad in the layout and also center the layout window where it is located. If you "Find" (‘lookup connection’ in the Connects menu [also F key]), a pin or pad it will also choose the net and connection in the netlist window if it exists in the netlist.
If no netlist exists for the layout, then the netlist window does not appear. You can load a netlist from a file from the File menu. The format for netlist files is described in Netlist File.
hace begging gutting here, and do a real-world tutorial example.
There are several ways of creating new objects: you can draw them yourself, you can copy an existing object (or selection), or you can load an element from a file or from the Library window. Each type of object has a particular tool for creating it.
The active tool can be selected from the tool selectors in the bottom left corner or by one of the function keys listed earlier in this chapter. Each <Btn1> press with the tool tells the application to create or change the appropriate object or at least take the first step to do so. Each tools causes the cursor to take on a unique shape and also causes the corresponding tool selector button to be highlighted. You can use either cue to see which tool is active.
Insert mode provides the capability of inserting new points into existing polygons or lines. The 45 degree line clipping is now enforced when selected. Press and hold the shift key while positioning the new point to only clip the line segment to the nearer of the two existing points to 45 degrees. You can also toggle the 45-degree clipping in the middle of a point insertion by pressing the <Key>. If the shift key is not depressed and the 45 degree line clipping mode is on, both new line segments must be on 45 degree angles - greatly restricting where the new point may be placed. In some cases this can cause confusion as to whether an insertion has been started since the two new lines may be forced to lie parallel on top of the original line until the pointer is moved far from the end points.
Removing objects, changing their size or moving them only applies to objects that are visible when the command is executed.
There are several keystrokes and button events referring to an object without identifying its type. Here's a list of them:
<Btn1> creates (or deletes) an object depending on the current mode.
<Key>BackSpace or <Key>Delete removes the visible object at the cursor location. When more than one object exists at the location, the order of removal is: via, line, text, polygon and element. The drawn layer order also affects the search - whatever is top - most (except elements) is affected before lower items. Basically all this means that what is removed is probably just what you expect. If for some reason it isn't, undo and try again. Only one object is removed for each keystroke. If two or more of the same type match, the newest one is removed.
Use <Key>s and Shift<Key>s to change the size (width) of lines, arcs, text objects, pins, pads and vias, or to toggle the style of polygons (whether pins and vias automatically have clearances).
<Key>n changes the name of pins, pads, vias, the string of a text object, or the currently displayed label of an element.
<Key>m moves the line, arc, or polygon under the cross hair to the active layer if it wasn't on that layer already.
<Key>u (undo) recovers from an unlimited number of operations such as creating, removing, moving, copying, selecting etc. It works like you'd expect even if you're in the midst of creating something.
Shift<Key>r restores the last undone operation provided no other changes have been made since the undo was performed.
<Key>tab changes the board side you are viewing.
For a complete list of keystrokes and button events see Translations.
To draw new lines you have to be in line-mode. Get there either by selecting it from the Tool palette or by pressing <Key>F2. Each successive notify event creates a new line. The adjustment to 45 degree lines is done automatically if it is selected from the Display menu. You can toggle the 45 degree mode setting by pressing the <Key>. (That is the period key). When 45 degree enforcement is turned on there are three distinct modes of line creation: a single line on the closest 45 degree vector towards the cross hair (but not necessarily actually ending at the cross hair), two lines created such that the first leaves the start point on a 90 degree vector and the second arrives at the cross hair on a 45 degree vector, and finally two lines created such that the first leaves the start point on a 45 degree vector and the second arrives at the cross hair on a 90 degree vector. These last two modes always connect all the way from the start and end points, and all lines have angles in 45 degree multiples. The <Key>/ cycles through the three modes. The status line shows a text icon to indicate which of the modes is active and the lines following the cross hair motion show the outline of the line(s) that will actually be created. Press <Key>Escape to leave line-mode.
<Key>l, Shift<Key>l and the entries in the Sizes menu change the initial width of new lines. This width is also displayed in the status line.
An Arc is drawn with the arc-tool. Get there either by selecting it from the Tool palette or by pressing <Key>F8. Press Btn1 to define the starting point for the arc. Drag the mouse towards the desired end point along the path you want the arc to follow. The outline of the arc that will be created is shown on the screen as you move the mouse. Arcs are always forced to be 90 degrees and have symmetrical length and width ( i.e. they are a quarter circle). The next Btn1 click creates the arc. It will have the same width as new lines (displayed in the status line) and appear on the active layer. The arc leaves the starting point towards the cross hair along the axis whose distance from the cross hair is largest. Normally this means that if you drag along the path you want the arc to follow, you'll get what you want. If the grid is set to the arc radius, then the two distances will be equal and you won't be able to get all of the possible directions. If this is thwarting your desires, reduce the grid spacing (!Shift<Key>G) and try again.
A polygon is drawn by defining all of its segments as a series of consecutive line segments. If the first point matches a new one and if the number of points is greater than two, then the polygon is closed. Since matching up with the first point may be difficult, you may use Shift<Key>p to close the polygon. The Shift<Key>p won't work if clipping to 45 degree lines is selected and the final segment cannot match this condition. I suggest you create simple convex polygons in order to avoid a strong negative impact on the performance of the connection scanning routines. The rectangle-mode is just an easy way to generate rectangular polygons. Polygon-mode also is selected by <Key>F6 whereas rectangle-mode uses <Key>F4. Pressing a <Btn1> at two locations creates a rectangle by defining two of its corners. <Key>Insert brings you to insert-point-mode which lets you add additional points to an already existing polygon. Single points may be removed by moving the cross hair to them and selecting one of the delete actions (remove-mode, BackSpace, or Delete. This only works if the remaining polygon will still have three or more corners. Pressing <Key>u or <Key>p while entering a new polygon brings you back to the previous corner. Removing a point does not force clipping to 45 degree angles (because it's not generally possible). Newly created polygons will not connect to pins or vias that pierce it unless you create a thermal (using the thermal mode) to make the connection. If the edge of a polygon gets too close to a pin or via that lies outside of it, a warning will be issued and the pin will be given a special color. Increasing the distance between them will remove the warning color.
Pressing <Key>F5 or clicking one of the text selector buttons changes to text-mode. Each successive notify event (<Btn1>) pops up the input line at the bottom and queries for a string. Enter it and press <Key>Return to confirm or <Key>Escape to abort. The text object is created with its upper left corner at the current pointer location. The initial scaling is changed by <Key>t and Shift<Key>t or from the Sizes menu.
Now switch to rotate-mode and press <Btn1> at the text-objects location. Text objects on the solder side of the layout are automatically mirrored and flipped so that they are seen correctly when viewing the solder-side.
Use <Key>n to edit the string.
TEXT OBJECTS ON COPPER LAYERS CREATE COPPER LINES BUT THEY ARE NOT SCANNED FOR CONNECTIONS. If they are moved to the silkscreen layer, they no longer create copper.
The initial size of new vias may be changed by <Key>v and Shift<Key>v or by selecting the appropriate entry from the Sizes menu. Mod1<Key>v and Mod1 Shift<Key>v do the same for the drilling hole of the via. The statusline is updated with the new values. Creating a via is similar to the other objects. Switch to via-mode by using either the selector button or <Key>F1 then press <Key>] or <Btn1> to create one. <Key>n changes the name of a via. If you want to create a mounting hole for your board, then you can place a via where you want the hole to be then convert the via into a hole. The conversion is done by pressing !Ctrl<Key>h with the cross hair over the via. Conceptually it is still a via, but it has no copper annulus. If you create such a hole in the middle of two polygons on different layers, it will short the layers. Theoretically you could arrange for such a hole not to be plated, but a metal screw inserted in the hole would still risk shorting the layers. A good rule is to realize that holes in the board really are vias between the layers and so place them where they won't interfere with connectivity. You can convert a hole back into a normal via with the same keystroke used to convert it in the first place.
Some of the functions related to elements only work if both the package layer and the pin layer are switched on.
Now that you're familiar with many of the basic commands, it is time to put the first element on the layout. First of all, you have to load data into the paste buffer. There are four ways to do this:
1) load the data from a library
2) load the data from a file
3) copy data from an already existing element
4) convert objects in the buffer into an element
We don't have any elements on the screen yet nor anything in the buffer, so we use number one.
Select lsi from the menu in the library window press
<Btn1> twice at the appropriate text-line to get
the MC68030 CPU.
The data is loaded and the mode is switched to pastebuffer-mode.
Each notify event now creates one of these beasts. Leave the mode
by selecting a different one or by <Key>Escape which resets
all modes..
The cross hair is located at the mark position as defined by
the data file. Rotating the buffer contents is done by selecting
the rotate entry of the Buffer menu or by pressing
Shift<Key>F3. The contents of the buffer
are valid until new data is loaded into it either by a cut-to-buffer
operation, copy-to-buffer operation or by loading a new data file.
There are 5 buffers
available (possibly more or less if changed at compile time
with the MAX_BUFFER variable in globalconfig.h).
Switching between them is done by selecting a menu entry or
by Shift<Key>1..MAX_BUFFER.
Each of the two board sides has its own buffers.
The release includes all data files for the circuits that are used by the demo layout. The elements in the LED example are not found in the library, but you can lift them from the example itself if you want. If you have problems with the color of the cross hair, change the resource cross hairColor setting to a different one.
Now load a second circuit, the MC68882 FPU for example. Create the circuit as explained above. You now have two different unnamed elements. Unnamed means that the layout-name of the element hasn't been set yet. Selecting description from the Display menu displays the description string of the two circuits which are CPU and FPU. The values of the circuits are set to MC68030 and MC68882. Each of the names of an element may be changed by <Key>n at the elements location and editing the old name in the bottom input line. Naming pins and vias is similar to elements. You can hide the element name so that it won't appear on the board silkscreen by pressing <key>h with the cursor over the element. Doing so again un-hides the element name.
Entering :le and selecting an element data file is the second way to load circuits.
The third way to create a new element is to copy an existing one. Please refer to Moving and Copying.
The fourth way to create a new element is to convert a buffer's contents into an element. Here's how it's done: Select the Via-tool from the Tool pallet. Set the grid spacing to something appropriate for the element pin spacing. Now create a series of vias where the pins go. Create them in pin number order. It is often handy to place a reference point (!Ctrl<Key>m) in the center of the first pin in order to measure the location of the other pins. Next make a solder-side layer the active layer from the active-layer popup menu. Now draw the outline of the element using lines and arcs. When you're done, select everything that makes up the element with a box selection (<Btn3Down> drag, <Btn3Up>). Now select "cut to buffer" from the Buffer menu. Position the cursor over the center of pin 1 and press the left button to load the data into the buffer. Finally select "convert buffer to element" from the Buffer menu. You'll only want to create elements this way if they aren't already in the library. It's also probably a good idea to do this before starting any of the other aspects of a layout, but it isn't necessary.
To display the pinout of a circuit move to it and press Shift<Key>d or select show pinout from the Objects menu. A new window pops up and displays the complete pinout of the element. This display can be difficult to read if the component has been rotated 90 degrees :-( therefore, the new window will show an un-rotated view so the pin names are readable. <Key>d displays the name of one or all pins/pads inside the Layout area, this is only for display on-screen, it has no effect on any printing of the layout.
You also may want to change a pin's or pad's current size by pressing <Key>s to increase or Shift<Key>s to decrease it. While this is possible, it is not recommended since care was probably taken to define the element structure in the first place. You can also change the thickness of the element's silkscreen outline with the same keys. You can change whether a pin or SMD pad is rounded or square with the <Key>q. SMD pads should usually have squared ends. Finally, you can change whether the non-square pins are round or octagonal with the !Ctrl<Key>o.
SMD elements and silkscreen objects are drawn in the "invisible object" color if they are located on the opposite side of the board.
For information on element connections refer to Connection Lists.
The line-stack and element-buffer of former releases have been replaced
by 5 (possibly more or less if changed at compile time
with the MAX_BUFFER variable in globalconfig.h)
multi-purpose buffers that are selected by
Shift<Key>1..MAX_BUFFER. The status line shows which buffer is
the active one.
You may load data from a file or layout into them.
Cut-and-paste works too.
If you followed the instructions earlier in this chapter you should
now have several objects on the screen. Move the cross hair to one of them
and press <Btn3Down> to toggle its selection flag. (If you drag the
mouse while the button is down, a box selection will be attempted instead
of toggling the selection.) The object
is redrawn in a different color. You also may want to try
moving the pointer while holding the third button down and
release it on a different location. This selects all objects inside the
rectangle and unselects everything else. If you want to add a box selection
to an existing selection, drag with Mod1<Btn3Down> instead.
Dragging Shift Mod1<Btn3Down> unselects objects in a box.
Now change to pastebuffer-mode and select some operations from the
Buffer menu. Copying objects to the buffer is available as
Mod1<Key>c while cutting them uses Mod1<Key>x as
shortcut. Both clear the buffer before new data is added.
If you use the menu entries, you have to supply a cross hair position by
pressing a mouse button. The objects are attached to the pastebuffer
relative to that cross hair location.
Element data or PCB data may be merged into an existing layout by loading
the datafiles into the pastebuffer. Both operations are available from
the File menu or as user commands.
All objects can be moved including element-names, by <Btn2Down>, dragging the pointer while holding the button down and releasing it at the new location of the object. If you use Mod1<Btn2Down> instead, the object is copied. Copying does not work for element-names of course. You can move all selected objects with Shift <Btn1>. This uses the Pastebuffer, so it will remove whatever was previously in the Pastebuffer. Please refer to Pastebuffer. If you want to give a small nudge to an object, but you don't think that the mouse will give you the fine level of control that you want, you can position the cursor over the object, press <Key>[, move it with the arrow keys, then press <Key>] when it's at the desired position. Remember that all movements are forced onto grid coordinates, so you may want to change the grid spacing first.
To move a trace or group of traces to a different layer, first select the tracks to be moved. It's easiest to do this if you shut off everything but that layer first (i.e. silk, pins, other layers, etc). Now set the current layer to be the new layer. Press Shift-M to move all the selected tracks to the current layer. See the MoveToCurrentLayer action for more details.
After your first experience with Pcb you will probably want to save
your work. :s name passes the data to an external program which
is responsible for saving it. For details see saveCommand in
Resources.
Saving also is available from the File menu, either with or
without supplying a filename. Pcb reuses the last
filename if you do not pass a new one to the save routine.
To load an existing layout either select Open... from the File menu or use :l filename. A file select box pops up if you don't specify a filename. Merging existing layouts into the new one is supported either by the File menu or by :m filename.
Pcb saves a backup of the current layout at a user specified interval.
The backup filename is created by appending a dash, "-", to the .pcb filename.
For example, if you are editing the layout in projects/board.pcb then the
backup file name will be projects/board.pcb-. If the layout is new and
has not been saved yet, then the backup file name is PCB.####.backup where the "####"
will be replaced by the process ID of the currenting running copy of Pcb.
This default backup file name may be changed at compilation time via the
BACKUP_NAME
variable in globalconfig.h. During critical
sections of the program or when data would be lost it is saved as
PCB.%i.save. This file name may be changed at compile time
with the SAVE_NAME variable in globalconfig.h.
Pcb now has support for device drivers,
PostScript, encapsulated PostScript,
and Gerber RS-274X drivers are
available so far. The Gerber RS-274X
driver additionally generates a numerical control (NC) drill file for
automated drilling,
a bill of materials file to assist in materials procurement and
inventory control, and a centroid (X-Y) file which includes the
centroid data needed
by automatic assembly (pick and place) machines.
I recommend the use of GhostScript if you
don't have a PostScript printer for handling the PostScript
output. Printing always generates
a complete set of files for a specified driver.
See the page about
the Print() action for additional information about the filenames.
The control panel offers a number of options. Most of them are not available
for Gerber output because it wouldn't make sense, for example, to scale the gerber output
(you'd get an incorrectly made board!). The options are:
X11 geometry specification.
This entry is only available if you use X11R5 or later.
For earlier releases the user defined size or, if not available, A4
is used.
Well known size are:
A3
A4
A5
letter
tabloid
ledger
legal
executive
X11R5 or later. A zero
offset is used for earlier releases.
The created file includes some labels which are guaranteed to stay unchanged
awk script to produce several printouts on one piece of paper by
duplicating the code and putting some translate commands in front.
Note, the normal PostScript units are 1/72 inch.
To export a layout choose Export layout from the File menu, then select the desired exporter.
Produces a bill of materials (BOM) file and a centroid (XY) file.
The gcode exporter can generate RS274/NGC G-CODE files to be used with a CNC mill to produce pcb's by mechanically removing copper from the perimeter of all elements.
The elements are enlarged in order to compensate for the cutting tool size so that the remaining copper corresponds to the original size; however all polygons are left unchanged and will end up being a little smaller; this is not a problem because the electrical connection is done with traces, which are correctly enlarged.
A .cnc file is generated for every copper layer, with the bottom layer mirrored so that the milling is done right; of course it's not possible to produce directly multi-layer (more than 2) pcb's with this method, but the cnc files for intermediate layers are generated anyways.
A drill file is also generated, and it contains all drills regardless of the hole size; the drilling sequence is optimized in order to require the least amount of movement.
The export function generates an intermediate raster image before extracting the contour of copper elements, and this image is saved as well (in .png format) for inspection.
When the spacing between two elements is less than the tool diameter they will merge and no isolation will be cut between them; the control image should be checked for this behaviour.
Possible workarounds are: increasing spacing, decreasing the tool size, increasing the intermediate image resolution.
To maximize the chance of producing correct pcb's it would be better to increase the DRC clearance to at least the tool diameter and use traces as thick as possible; the rule is: use the largest element that will not prevent the isolation cut.
The exporter parameters are:
All .cnc files specify Z values as parameters, so that it's easy to change them without the need to run the exporter again.
Operation was verified with the EMC2 g-code interpreter.
Following is a sample layout that is converted with default settings:

The control image shows that the spacing is sufficient:

The final tool path follows the perimeter of all elements:

Produces RS274-X (a.k.a. gerber) photo plot files and Excellon drill files.
Numerical analysis package export.
Produces GIF/JPEG/PNG image files.
Export as postscript. Can be later converted to pdf.
Export as eps (encapsulated postscript) for inclusion in other documents. Can be later converted to pdf.
After completing parts of your layout you may want to check if all drawn connections match the ones you have in mind. This is probably best done in conjunction with a net-list file: see Rats Nest. The following examples give more rudimentary ways to examine the connections.
1) create at least two elements and name them
2) create some connections between their pins
3) optionally add some vias and connections to them
Now select lookup connection from the Connections menu,
move the cursor to a pin or via and press any mouse button. Pcb
will look for all other pins and/or vias connected to the one you have
selected and display the objects in a different color.
Now try some of the reset options available from the same menu.
There also is a way to scan all connections of one element. Select a single element from the menu and press any button at the element's location. All connections of this element will be saved to the specified file. Either the layout name of the element or its canonical name is used to identify pins depending on the one which is displayed on the screen (may be changed by Display menu).
An automatic scan of all elements is initiated by choosing all elements. It behaves in a similar fashion to scanning a single element except the resource resetAfterElement is used to determine if connections should be reset before a new element is scanned. Doing so will produce very long lists because the power lines are rescanned for every element. By default the resource is set to false for this reason.
To scan for unconnected pins select unused pins from the same menu.
Some commands mentioned earlier in this chapter also are able to operate on all selected and visible objects. The Arrow tool is used to select/deselect objects and also to move objects or selections. If you click and release on an object with the Arrow tool, it will unselect everything else and select the object. Selected objects change color to reflect that they are selected. If you Shift click, it will add the object to (or remove) the object from the existing selection. If you drag with the mouse button down with the Arrow tool, one of several things could happen: if you first pressed the button on a selected object, you will be moving the selection to where you release the button. If you first pressed the button on an unselected object, you will be moving that object. If you first pressed the button over empty space, you will be drawing a box to select everything inside the box. The Shift key works the same way with box selections as it does with single objects.
Moving a single un-selected object is different from moving a selection. First of all, you can move the end of line, or a point in a polygon this way which is impossible by moving selections. Secondly, if rubber banding is turned on, moving a single object will rubber-band the attached lines. Finally, it is faster to move a single object this way since there is no need to select it first.
You can select any visible object unless it is locked. If you select an object, then turn off its visibility with the Layer controls, it won't be moved if you move the remaining visible selection.
If you have not configured to use strokes in the Pcb user interface, then
the middle mouse button is automatically bound to the arrow tool, regardless
of the active tool (which is bound to the first mouse button). So using
the middle button any time is just like using the first mouse button
with the Arrow tool active.
The entries of the Selection menu are hopefully self-explanatory. Many of the Action Commands can take various key words that make them function on all or some of the selected items.
If you have a netlist that corresponds to the layout you are working on, you can use the rats-nest feature to add rat-lines to the layout. First you will need to load a netlist file (see :rn, User Commands). <Key>w adds rat-lines on the active layer using the current line thickness shown in the status line (usually you'll want them to be thin lines). Only those rat-lines that fill in missing connectivity (since you have probably routed some connections already) are added. If the layout is already completely wired, nothing will be added, and you will get a message that the wiring is complete.
Rat-lines are lines having the special property that they only connect to pins and pads at their end points. Rat-lines may be drawn differently to other lines to make them easier to identify since they have special behavior and cannot remain in a completed layout. Rat-lines are added in the minimum length straight-line tree pattern (always ending on pins or pads) that satisfies the missing connectivity in the circuit. Used in connection with moves and rotates of the elements, they are extremely useful for deciding where to place elements on the board. The rat-lines will always automatically rubberband to the elements whether or not the rubberband mode is on. The only way for you to move them is by moving the parts they connect to. This is because it is never desirable to have the rat-lines disconnected from their element pins. Rat-lines will normally criss-cross all over which gives rise to the name "rats nest" describing a layout connected with them. If a SMD pad is unreachable on the active layer, a warning will be issued about it and the rat-line to that pad will not be generated.
A common way to use rats nests is to place some elements on the board, add the rat-lines, and then use a series of moves/rotates of the elements until the rats nest appears to have minimum tangling. You may want to iterate this step several times. Don't worry if the layout looks messy - as long as you can get a sense for whether the criss-crossing is better or worse as you move things, you're fine. After moving some elements around, you may want to optimize the rats nest <Key>o so that the lines are drawn between the closest points (this can change once you've moved components). Adding rat-lines only to selected pads/pins (Shift<Key>w) is often useful to layout a circuit a little bit at a time. Sometimes you'll want to delete all the rat-lines (<Key>e) or selected rat-lines (Shift<Key>e) in order to reduce confusion. With a little practice you'll be able to achieve a near optimal component placement with the use of a rats nest.
Rat-lines are not only used for assisting your element placement, they can also help you to route traces on the board. Use the <Key>m to convert a rat-line under the cursor into a normal line on the active layer. Inserting a point into a rat-line will also cause the two new lines to be normal lines on the board. Another way that you can use rat-lines is to use the <Key>f with the cursor over a pad or pin. All of the pins and pads and rat-lines belonging to that net will be highlighted. This is a helpful way to distinguish one net from the rest of the rats nest. You can then route those tracks, turn off the highlighting (Shift<Key>f) and repeat the process. This will work even if the layer that the rat-lines reside on is made invisible - so only the pins and pads are highlighted. Be sure to erase the rat-lines (<Key>e erases them all) once you've duplicated their connectivity by adding your own lines. When in doubt, the <Key>o will delete only those rat-lines that are no longer needed.
If connections exist on the board that are not listed in the netlist when <Key>w is pressed, warning messages are issued and the affected pins and pads are drawn in a special warnColor until the next Notify() event. If the entire layout agrees completely with the netlist, a message informs you that the layout is complete and no rat-lines will be added (since none are needed). If the layout is complete, but still has rat-lines then you will be warned that rat-lines remain. If you get no message at all it's probably because some elements listed in the net list can't be found and where reported in an earlier message. There shouldn't be any rat-lines left in a completed layout, only normal lines.
The Shift<Key>w is used to add rat-lines to only those missing connections among the selected pins and pads. This can be used to add rat-lines in an incremental manner, or to force a rat-line to route between two points that are not the closest points within the net. Often it is best to add the rats nest in an incremental fashion, laying out a sub-section of the board before going further. This is easy to accomplish since new rat-lines are never added where routed connectivity already makes the necessary connections.
After you've finished laying out a board, you may want to check to be certain that none of your interconnections are too closely spaced or too tenuously touching to be reliably fabricated. The design rule checking (DRC) function does this for you. Use the command ":DRC()" (without the quotes of course) to invoke the checker. If there are no problem areas, you'll get a message to that effect. If any problem is encountered, you will get a message about it and the affected traces will be highlighted. One part of the tracks of concern will be selected, while the other parts of concern will have the "FindConnection" highlighting. The screen will automatically be centered in the middle of the object having the "FindConnection" (Green) highlighting. The middle of the object is also the coordinates reported to be "near" the problem. The actual trouble region will be somewhere on the boundary of this object. If the two parts are from different nets then there is some place where they approach each other closer than the minimum rule. If the parts are from the same net, then there is place where they are only barely connected. Find that place and connect them better.
After a DRC error is found and corrected you must run the DRC again because the search for errors is halted as soon as the first problem is found. Unless you've been extremely careless there should be no more than a few design rule errors in your layout. The DRC checker does not check for minimum spacing rules to copper text, so always be very careful when adding copper text to a layout. The rules for the DRC are specified in the application resource file. The minimum spacing value (in mils) is given by the Settings.Bloat value. The default is 7 mils. The minimum touching overlap (in mils) is given by the Settings.Shrink value. This value defaults to 5 mils. Check with your fabrication process people to determine the values that are right for you.
If you want to turn off the highlighting produced by the DRC, perform an undo (assuming no other changes have been made). To restore the highlighting, use redo. The redo will restore the highlighting quickly without re-running the DRC checker.
PCB includes a flexible trace optimizer. The trace optimizer can be run after auto routing or hand routing to clean up the traces.
To locate text or a specific element or grouping of similar elements choose ‘Select by name’ from the Select menu, then choose the appropriate subsection. At the bottom of the screen the prompt pattern: appears. Enter the text or Regular Expressions of the text to be found. Found text will be highlighted.
To measure distances, for example the pin-to-pin pitch of a part to validate a footprint, place the cursor at the starting measurement point, then press !Ctrl<Key>m. This marks the current location with a X. The X mark is now the zero point origin for the relative cursor position display. The cursor display shows both absolute position and position relative to the mark as the mouse is moved away from the mark. If a mark is already present, the mark is removed and the cursor display stops displaying relative cursor coordinates.
Pcb includes support for mapping drill holes to a specified set
of sizes used by a particular vendor. Many PCB manufacturers have a
prefered set of drill sizes and charge extra when others are used.
The mapping can be performed on an existing design and can also be
enabled to automatically map drill holes as vias and elements are
instantiated.
The first step in using the vendor drill mapping feature is to create a resource file describing the capabilities of your vendor. The file format is the resource file format described in Resource Syntax. A complete example is given below.
# Optional name of the vendor
vendor = "Vendor Name"
# units for dimensions in this file.
# Allowed values: mil/inch/mm
units = mil
# drill table
drillmap = {
# When mapping drill sizes, select the nearest size
# or always round up. Allowed values: up/nearest
round = up
# The list of vendor drill sizes. Units are as specified
# above.
20
28
35
38
42
52
59.5
86
125
152
# optional section for skipping mapping of certain elements
# based on reference designator, value, or description
# this is useful for critical parts where you may not
# want to change the drill size. Note that the strings
# are regular expressions.
skips = {
{refdes "^J3$"} # Skip J3.
{refdes "J3"} # Skip anything with J3 as part of the refdes.
{refdes "^U[1-3]$" "^X.*"} # Skip U1, U2, U3, and anything starting with X.
{value "^JOHNSTECH_.*"} # Skip all Johnstech footprints based on the value of a part.
{descr "^AMP_MICTOR_767054_1$"} # Skip based on the description.
}
}
# If specified, this section will change the current DRC
# settings for the design. Units are as specified above.
drc = {
copper_space = 7
copper_width = 7
silk_width = 10
copper_overlap = 4
}
The vendor resource is loaded using the LoadVendor action. This is invoked by entering:
:LoadVendor(vendorfile)
from within Pcb. Substitute the file name of your vendor
resource file for ‘vendorfile’. This action will load the vendor
resource and modify all the drill holes in the design as well as the
default via hole size for the various routing styles.
Once a vendor drill map has been loaded, new vias and elements will automatically have their drill hole sizes mapped to the vendor drill table. Automatic drill mapping may be disabled under the “Settings” menu. To re-apply an already loaded vendor drill table to a design, choose “Apply vendor drill mapping” from the “Connects” menu.
See Actions for a complete description of the actions associated with vendor drill mapping.
Note that the expressions used in the skips section are regular
expressions. See Regular Expressions for an introduction to
regular expressions.
Pcb includes an autorouter which can greatly speed up the
layout of a circuit board. The autorouter is a rectangle-expansion
type of autorouter based on
“A Method for Gridless Routing of Printed Circuit Boards” by
A. C. Finch, K. J. Mackenzie, G. J. Balsdon, and G. Symonds in the
1985 Proceedings of the 22nd ACM/IEEE Design Automation Conference.
This reference is available from the ACM Digital Library at
http://www.acm.org/dl for those with institutional or personal
access to it. It's also available from your local engineering
library. The reference paper is not needed for using the autorouter.
Before using the autorouter, all elements need to be loaded into the layout and placed and the connectivity netlist must be loaded. Once the elements have been placed and the netlist loaded, the following steps will autoroute your design.
NOTE: If you will be manually routing these later not using planes, it is usually better to let the autorouter route them then rip them up yourself afterwards. If you plan to use a ground/power plane manually, consider making it from one or more pure rectangles and letting the autorouter have a go at it.
After the design has been autorouted, you may want to run the trace optimizer. See section Trace Optimizer for more information on the trace optimizer.
The entering of user-commands is initiated by the action routine
Command() (normally bound to the (":") character) which
replaces the bottom statusline with an input area or opens a separate
command window. It is finished by either <Key>Return or
<Key>Escape to confirm or to abort. These two key-bindings
cannot be changed from the resource file. The triggering event,
normally a key press, is ignored.
Commands can be entered in one of two styles, command entry syntax: “Command arg1 arg2” or action script syntax “Action1(arg1, arg2); Action2(arg1, arg2);”. Quoting arguments works similar to bash quoting:
There are simple usage dialogs for each command and one for the complete set of commands.
Netlists are used for generating rat's nests (see Rats Nest) and for verifying the board layout (which is also accomplished by the Ratsnest command).
vi users and
have the same functionality as s combined with q.
The synopsis of the pcb command is:
pcb [OPTION ...] [LAYOUT-FILE.pcb] to start the application in GUI mode,
or
pcb [-h | -V | --copyright] for a list of options, version, and copyright,
or
pcb -p [OPTION ...] [LAYOUT-FILE.pcb] to print a layout,
or
pcb -x HID [OPTION ...] [LAYOUT-FILE.pcb] to export.
Possible values for the parameter ‘HID’ are:
There are several resources which may be set or reset in addition to the standard toolkit command-line options. For a complete list refer to Resources.
--help--version--verbose--copyright--show-defaults--show-actions--dump-actions--grid-units-mm <string>--clear-increment-mm <string>--grid-increment-mm <string>--line-increment-mm <string>--size-increment-mm <string>--clear-increment-mil <string>--grid-increment-mil <string>--line-increment-mil <string>--size-increment-mil <string>--backup-interval0 to disable.
The default value is 60.
--groups <string>"1,c:2:3:4:5:6,s:7:8".
--route-styles <string>"Signal,1000,3600,2000,1000:Power,2500,6000,3500,1000
:Fat,4000,6000,3500,1000:Skinny,600,2402,1181,600"
--element-path <string>--action-script <string>--action-string <string>--fab-author <string>--layer-stack <string>--save-last-command--save-in-tmp--reset-after-element--ring-bell-finished--pinout-offset-x <num>100mil.
--pinout-offset-y <num>100mil.
--pinout-text-offset-x <num>800mil.
--pinout-text-offset-y <num>-100mil.
--draw-grid--clear-line--full-poly--unique-names--snap-pin--all-direction-lines--show-number--listen--bg-image <string>--pcb-menu <string>--listen--bg-image <string>--pcb-menu <string>--black-color <string>--black-color <string>--background-color <string>--crosshair-color <string>--cross-color <string>--via-color <string>--via-selected-color <string>--pin-color <string>--pin-selected-color <string>--pin-name-color <string>--element-color <string>--rat-color <string>--invisible-objects-color <string>--invisible-mark-color <string>--element-selected-color <string>--rat-selected-color <string>--connected-color <string>--found-color <string>--off-limit-color <string>--grid-color <string>--layer-color-<n> <string><n>, where <n> is an integer from 1 to 16.
--layer-selected-color-<n> <string><n>, when selected. <n> is an integer from 1 to 16.
--warn-color <string>"#ff8000"
--mask-color <string>"#ff0000"
--layer-name-1 <string>"top".
--layer-name-2 <string>"ground".
--layer-name-3 <string>"signal2".
--layer-name-4 <string>"signal3".
--layer-name-5 <string>"power".
--layer-name-6 <string>"bottom".
--layer-name-7 <string>"outline".
--layer-name-8 <string>"spare".
--lib-newlib <string>--lib-name <string>--default-font <string>--file-path <string>--font-path <string>--lib-path <string>All parameters should be given with an unit. If no unit is given, 1/100 mil
(cmil) will be used. Write units without space to the
number like 3mm, not 3 mm.
Valid Units are:
--via-thickness <num>60mil.
--via-drilling-hole <num>28mil.
--line-thickness <num>10mil.
--rat-thickness <num><unit>px which
sets the rat thickness to a fixed value in terms of screen pixels.
Maximum fixed thickness is 100px. Minimum saling rat thickness is 101nm.
Default value is 10mil.
--keepaway <num>10mil.
--default-PCB-width <num>6000mil.
--default-PCB-height <num>5000mil.
--text-scale <num>100.
--alignment-distance <num>2mil.
--grid <num>10mil.
--minimum polygon area <num>pcb uses external commands for input output operations. These commands can be
configured at start-up to meet local requirements. The command string may include
special sequences %f, %p or %a. These are replaced when the
command is called. The sequence %f is replaced by the file name,
%p gets the path and %a indicates a package name.
--font-command <string>--file-command <string>--element-command <string>"M4PATH='%p';export M4PATH;echo 'include(%f)' | m4"
--print-file <string>--lib-command-dir <string>--lib-command <string>"QueryLibrary.sh '%p' '%f' %a"
--lib-contents-command <string>"ListLibraryContents.sh %p %f" or,
on Windows builds, an empty string (to disable this feature).
--save-command <string>--rat-command <string>%f is replaced by the netlist filename.
All parameters should be given with an unit. If no unit is given, 1/100 mil (cmil) will be used for backward compability. Valid units are given in section Sizes.
--bloat <num>10mil.
--shrink <num>10mil.
--min-width <num>10mil.
--min-silk <num>10mil.
--min-drill <num>15mil.
--min-ring <num>10mil.
--bomfile <string>--xyfile <string>--xy-unit <unit>--gerberfile <string>--all-layers--verbose--metric--psfile <string>--drill-helper--align-marks--outline--mirror--fill-page--auto-mirror--ps-color--ps-bloat <num>--ps-invert--media <media-name><media-name> can be any of the standard names for paper size: ‘A0’
to ‘A10’, ‘B0’ to ‘B10’, ‘Letter’, ‘11x17’,
‘Ledger’, ‘Legal’, ‘Executive’, ‘A-Size’, ‘B-size’,
‘C-Size’, ‘D-size’, ‘E-size’, ‘US-Business_Card’,
‘Intl-Business_Card’.
--psfade <num>--scale <num>--multi-file--xcalib <num>--ycalib <num>--drill-copper--show-legend--eps-file <string>--eps-scale <num>--as-shown--monochrome--only-visible--outfile <string>--dpi--x-max--y-max--xy-max--as-shown--monochrome--only-visible--use-alpha--fill-holes--format <string><string> can be ‘PNG’,
‘GIF’, or ‘JPEG’.
--png-bloat <num><dim>--photo-mode--photo-flip-x--photo-flip-y--photo-mask-colour <colour><colour> can be ‘green’, ‘red’, ‘blue’, or ‘purple’.
--photo-plating<colour> can be ‘tinned’, ‘gold’,
‘silver’, or ‘copper’.
--photo-silk-colour<colour> can be ‘white’, ‘black’, or ‘yellow’.
--lprcommand <string>lpr. This can be used to produce
PDF output with a virtual PDF printer. Example: --lprcommand "lp -d CUPS-PDF-Printer".
-- basename <string>--dpi <num>--copper-height <num>--substrate-height <num>--substrate-epsilon <num>
This chapter gives an overview about the additional X11 resources which
are defined by Pcb as well as the defined action routines.
In addition to the toolkit resources, Pcb defines the
following resources:
Pcb has an automatic backup feature which saves the current data
every n seconds. The default is 300 seconds. A value of zero disables
the feature. The backup file is named /tmp/PCB.%i.backup by
default (this may have been changed at compilation time via the
BACKUP_NAME
variable in globalconfig.h).
%i is replaced by the process ID.
See also, the command-line option –backup-interval.
X11 server because only
the colormap index is used in the boolean operation and Pcb doesn't
create its own colormap. The default setting is XtDefaultForeground.
Pcb uses a user defined command to read element files. This resource
is used to set the command which is executed by the users default shell.
Two escape sequences are defined to pass the selected filename (%f) and the
current search path (%p). The command must write the element data
to its standard output. The default value is
M4PATH="%p";export M4PATH;echo 'include(%f)' | m4
Using the GNU version of m4 is highly recommended.
See also, the command-line option –element-command.
cat %f
See also, the command-line option –file-command.
cat %f
See also, the command-line option –font-command.
X11 server because only
the colormap index is used in the boolean operation and Pcb doesn't
create its own colormap. The default setting is XtDefaultForeground.
Pcb uses a command to read element data from libraries.
The resource is used to set the command which is executed by the users
default shell. Three escape sequences are defined to pass the selected
filename (%f), the current search path (%p) as well (%a) as the three
parameters template, value and package to the command.
It must write the element data to its standard output. The default value is
NONE/share/pcb/oldlib/QueryLibrary.sh %p %f %a
Pcb uses the command specified
by this resource to list the contents of a library.
NONE/share/pcb/oldlib/ListLibraryContents.sh %p %f
is the default.
LIBRARYFILENAME variable in globalconfig.h.
MIN_LINESIZE and MAX_LINESIZE variables in
globalconfig.h), defines the
initial thickness of new lines. The value is preset to ten mil.
PostScript device. Predefined
values are a3, a4, a5, letter, tabloit,
ledger, legal, and executive.
The second way is to specify the medias width, height and margins in mil.
The resource defaults to a4 size unless changed at compile time
with the DEFAULT_MEDIASIZE variable in globalconfig.h.
%f in the string. It must read the data from
its standard input. The default command is:
cat - > %f
See also, the command-line option –save-command.
EMERGENCY_NAME variable in globalconfig.h.
.
%i is replaced by the process ID.
As an example, loading a new layout when the old one hasn't been saved would
use this resource.
See also, the command-line option –save-in-tmp.
DEFAULT_SIZE variable in globalconfig.h.
MIN_PINORVIASIZE and MAX_PINEORVIASIZE variables in
globalconfig.h), with at least 20
mil of copper.
The default thickness is 40 mil and the default drilling hole is
20 mil.
XBell() which sets the volume of the X
speaker.
The value lies in the range -100..100 and it defaults to the maximum volume of
100.
Refer also to Command-Line Options.
All user accessible commands may be bound to almost any X event. Almost
no default binding for commands is done in the binaries, so it is vital for the
application that at least a system-wide application resource file exists.
This file normally resides in the share/pcb directory and
is called Pcb. The bindings to which the manual refers to are the
ones as defined by the shipped resource file. Besides binding an action to
an X11 event, you can also execute any action command using a ":" command
(see User Commands).
Take special care about translations related to the functions keys and the
pointer buttons because most of the window managers use them too.
Change the file according to your hardware/software environment.
You may have to replace all occurrences of baseTranslations to
translations if you use a X11R4 server.
Passing Object as an argument to an action routine causes the object at the cursor location to be changed, removed or whatever. If more than one object is located at the cross hair position the smallest type is used. If there are two of the same type the newer one is taken. SelectedObjects will handle all selected and visible objects.
None<Key>w: AddRats(AllRats)
!Shift<Key>w: AddRats(SelectedRats)
None<Key>o: DeleteRats(AllRats) AddRats(AllRats)
!Shift<Key>o: DeleteRats(SelectedRats) AddRats(SelectedRats)
ApplyVendor()
!Mod1<Key>k: ChangeClearSize(Object, +2, mil)
!Mod1 Shift<Key>k: ChangeClearSize(Object, -2, mil)
!Mod1<Key>s: Change2ndSize(Object, +5, mil)
!Mod1 Shift<Key>s: Change2ndSize(Object, -5, mil)
:ChangeFlag(SelectedVias,thermal,1)
:ChangeFlag(SelectedPads,square,0)
!Ctrl<Key>h: ChangeHole(Object)
None<Key>n: ChangeName(Object)
!Ctrl<Key>o: ChangeOctagon(Object)