Pages

Saturday, April 21, 2012

CadSoft Eagle is a great tool. However, I've only ever come across basic tutorials to get you started. A lot of features of Eagle are buried in the help files. These tips should help you become a power Eagle user and take advantage of a lot of things that eagle can do.

I assume the reader has basic familiarity with Eagle, and has a basic understanding of PCB design. I will explain some of the more advanced features of Eagle

First up, Pin Direction

Let us start in a symbol for a device.

When you add pins to a symbol, there are several options for the pin. Most of the options are aesthetic, but some come in handy when you run ERC. If you look in Eagle's help file under the 'PIN' command you can find this little blurb.

The Help

Direction
The logical direction of signal flow. It is essential for the Electrical Rule Check (ERC) and for the automatic wiring of the power supply pins. The following possibilities may be used:
NC - not connected
In - input
Out - output (totem-pole)
IO - in/output (bidirectional)
OC - open collector or open drain
Hiz - high impedance output (e.g. 3-state)
Pas - passive (for resistors, capacitors etc.)
Pwr - power input pin (Vcc, Gnd, Vss, Vdd, etc.)
Sup - general supply pin (e.g. for ground symbol)
Default: IO
If Pwr pins are used on a symbol and a corresponding Sup pin exists on the schematic, nets are connected automatically. The Sup pin is not used for components.

Time to go through these one at a time, and explain them a little more and how they interact with each other. I suggest creating a simple device with one of each direction of pin, like the following, and experimenting with the different types.

The Breakdown

NC - Many devices have pins that are left unconnected. Perhaps, a pin provides some manufacturer's test feature which is not suitable for a user application. You often see them called 'Reserved' pins. If you would like to represent the NC's in your device set, mark your pin as 'NC'. Pretty straight forward. If for some reason, a net gets attached to an NC pin, ERC will put up a warning.

In - Standard high impedance input. These can be connected to Out, IO, OC, Hiz, Pas, Pwr, Sup, and other IN pins. Any number of these pins can be on the same net. However, ERC will throw an error if a net is only connected to inputs. ERC will also produce errors if an input pin is left floating and not connected to a net.

Out - Standard 'totem-pole' or 'push-pull' output. These can be connected to In, IO, Hiz, Pas, and Pwr pins. Out should not be mixed with OC, and will give you an error. ERC will give you a warning, however, if you connect an Out to a Pwr pin. If you have an output of, say, a linear regulator, use Pwr instead, which can be connected to Sup pins.

IO - Bidirectional input and output. Eagle 6 changed this from I/O to IO. These can be connected to In, Out, IO, OC, Hiz, Pas, Pwr, and Sup pins. There are no special ERC checks for IO pins. IO is the default setting for pin direction.

OC - Open collector or open drain. These can be connected to In, IO, OC, Hiz, and Pas pins. Typically, you will have multiple OC pins on the same net, mixed with perhaps Pas pins. ERC will produce errors if you connect OC to anything other that the pin directions listed.

Hiz - High impedance output. These can be happily connected to anything except NC pins. Typical designs have multiple Hiz pins on the same net. 3-state devices are dangerous, however. The designer must take careful consideration when designing a circuit with Hiz direction pins. Just because the ERC doesn't complain, doesn't mean you won't burn something up.

Pas - Passive. Passive pins can also be happily connected to anything except NC pins. Generally, these are reserved for things like capacitors, resistors, inductors, and other passive devices.

Pwr - Power input pins. Pwr pins can be connected to In, Out, IO, Hiz, Pas, Pwr, and Sup pins. If the net is not named the same as the Pwr pin, ERC will bring up a warning. Pwr pins with the same name are automatically connected unless the pin overwritten by connecting it to a net with a different name.

Sup - Supply pins. Supply pins can be connected to In, IO, Hiz, Pas, and Pwr. These are special symbolic representations of power supplies. Please do not use these on devices. Supply pins should be used in device sets with a symbol and no package.