[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gschem vs. PCB diode pin numbering



On 8/23/2011 8:47 PM, Matthew Lewis wrote:
> I was double checking a pcb layout today and I discovered a rather nasty
> gotcha. It seems that gschem and PCB don't agree on which end of a diode
> should be pin 1. Gschem views pin 1 as the anode and PCB considers pin 1
> to be the cathode. It doesn't prevent you from laying out a board
> correctly, but it does cause the silkscreen polarity to be printed
> backwards (for the SOD devices at least).

It gets worse that this.  The basic problem with a generic symbol like a
diode or a transistor is that physically it may come in many different
packages.  So on one package, the cathode may be pin 1 and on a
different package the cathode may be pin 2.  But wait, it gets worse...
 Some packages, SOT-23 for example, sometimes have their physical pins
numbered differently by different vendors.

This problem goes beyond diodes and transistors.  For example, the old
10H series of ECL parts came both in DIP packages as well as PLCC
packages.  Some of the parts though, would be in a 16 pin DIP or a 20
pin PLCC and so the pin numbers didn't agree between the two packages.

There are multiple ways to solve this problem but the approach I use (on
the rare occasion that I actually have time to do something like this)
is I created a transistor symbol which is really just a template.  The
pins are numbered @b@, @c@, and @e@.  Then I have an ASCII file that has
a line for each complete vendor part number.  By "complete" I mean the
part number including package codes.  On this line in the ASCII file, I
call out the template name, the footprint name, and the mapping from
symbol pin to package pin.  Then I have a smallish awk program which
creates all the different symbols with the footprints filled in and the
pin outs are all correct.

In my schematic, I don't instantiate an NPN, I instantiate a MMBT3904L
or instead of just a MAX882, I'd use MAX882CPA (DIP8) or MAX882CSA (SO8).

This has solved this issue for me.

> I've also noticed that gschem searches the older m4 library first ahead
> of the new pcblib. Is there a way to get PCB to use the newlib first?
> The reason I ask is because I swapped the pins on the diodes to match
> gschem in the newlib, but the change had no effect since the older m4
> lib is being used when you import a schematic. You have to go back and
> manually replace the footprints if you want newlib.

FWIW, the m4 generated library that ships with pcb has more and often
times better footprints than the newlib one which ships with pcb.  For
example all of the surface mount resistors and capacitors and quite a
number of surface mount IC packages.

-Dan






_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user