Is there a way to use schematic symbol pin names or numbers into labels?

I have a few schematic symbols with numbered pins and names assigned to them. For instance, one symbol is 3 digit 7 segment LED display with pins numbered from 1-12 with names a,b,c,e,d,e,f, etc. I don’t understand the purpose of the symbol’s pin name. At first, I thought its pin numbers was for pin ordering, orientation, and or either primary or secondary identification, for instance in a bus, while the name served as its default identifier which can be overridden in the schematics using a label.

It seems a bit odd to provide conveniences such as buses and keyboard shortcuts for labeling pins, yet still require pin labeling when they already have two forms of identification, making it tougher than ordering a beer. Is there a feature to automatically label pins by their pin names and or pin numbers?

Hello and welcome @Joe_Beazelman The letters assigned to the pin numbers show the pin that is assigned to which segment.

Note, each segment of the display has a letter.

Your symbol, being 12 pins will have one pin assigned to each letter, one to the decimal point, one to each complete number and probably one not connected.

Labeling pins is not for identifying pins, labeling pins is for identifying to what the pins are attached.

The pin number (actually name in general) is for matching with footprint pads. The pin label is for the reader to see the function of the pin.

Incidentally OP has a multiplexed display with 8 segment connections, 3 digit connections and probably 1 NC. It could be common anode or common cathode. Whereas jmk has shown a display with completely independent digits. The former saves pins.

Yeah, that was the first to show in google. Although incorrect, it had a nice chart alongside, Too lazy to look further so offered an explanation under.
Clear as mud? :face_with_spiral_eyes:

I assume you mean “what the pins are attached to.” Not doubting or disagreeing with you here, but defining a name to be strictly what it connects to seems a bit arbitrary and limiting. What pins are named and what they are connected to are often identical in the case of interoperating components such as microprocessors and memory where address and data pins have the same names across both components. For the vast majority of cases, it makes sense to use the assigned names as their labels. This happens so often, it makes sense to at least provide the capability of autolabeling pins based on their names, instead of tediously labeling each pin, especially with the modern centipede smds and ball arrays to contend with. Perhaps, I’ll see about creating such a script or plugin.

Pin names are for humans to more easily identify a pin function. Therefore a NE555 for examples has pins with names such as “Dis” for Discharge, “TR” for trigger, “VCC”, etc.

Pin numbers are for mapping pins of schematic symbols to PCB footprints. Usually IC packages have a standardized numbering scheme, and in KiCad the schematic symbols directly map these pin numbers onto the schematic symbols. These pin “numbers” are in fact an (upto) 4 character alfanumeric string, so also “chessboard” coordinates such as used on BGA’s can be “numbered”.

Labels are yet another thing. Labels are used to generating names for a net, and also for adding wires to a net. Without a label each net will have a generic name. Assigning names to nets makes it easier to design a PCB. You can then for example easily find your GND net and put it in a separate “netclass” (Which is a set of rules for track width and clearance (and more) for a certain group of nets).

Creating labels equal to pin names may have a slight advantage, but I’m not sure if it would be really useful. Different IC’s on a bus may use different names for their pins, and yet still have connections between each other.

One thing worth noting here is the automatic repetition with increment for labels. To try this, just place a label somewhere on the schematic, and then depress the [Ins] key. If the label ends in a number, then a new label, but with a number one higher is inserted just under the first label. For labeling a databus over multiple IC’s, the quickest way is to:

  1. Draw a horizontal wire.
  2. Make a bunch of them with the [Ins] key.
  3. Place a label (with for example D0 as name) on the first wire.
  4. Depress [Ins] again until you have (at least) enough labels.
  5. Optionally, add bus entries in the same way.
  6. Draw a box around your creation and press [Ctrl + D] to “Duplicate” your creation.
  7. Place the duplicated block on one of your IC’s.
  8. A block can be rotated and mirrored during placement.
  9. Repeat as many times as needed.
  10. Cleanup, delete excess stuff. It’s easier to repeat 10 to 15 wires and then delete the excess, then to repeat exactly 8 wires and labels, etc.

Sounds like you want to reuse pin labels as net labels. There is so much variance in how pins are labeled that you’ll have problems separating the ones that make sense from the ones that don’t. You yourself showed an example of a LED display where the segment pins are labelled a to g. Those names are too short and might clash with unrelated single letter labels.

Most of the time when you connect symbols with wires or buses you don’t need net labels. I decry the tendency for some schematics to plonk down a bunch of IC symbols on a schematic and then join then up using net labels. Wires and buses are useful for showing the flow of signals to “tell a story”.

Yeah, sure, that also happens.
But I can also see that a method to start a wire from a pin, and have the wire automatically labeled with the same name as the pin could be a nice feature to have. Extending this, you could select a group of pins on a symbol (for example a databus) and then pull wires out of all the pins including labels and add bus entries.

Have you ever worked with an editor that has simultaneous multi line edit with multiple cursors? I have a simple (andmostly adequate) editor called “Geany” which has this in (unfortunately) a very limited way. I’ve seen it used in Notepad++, (Which is winidoze only, while I run Linux) where it has more functionality, and it can be a significant time saver.

Also, If you could pull a bunch of labeled wires out of an IC in a single swoop in KiCad, then you can also make a Duplicate of that bunch of wires, rotate and mirror it, and then attach it to another IC. This way you can very quickly create a bus that is connected to multiple IC’s and all have matching labels.

My example of pin 26 of ATXmega128A4U name: “RXD1/D-/Miso/PD6”.
Placing ATXmega128A4U symbol at schematic I know that:

  • if I want to use Port D UART1 I have at this pin the RXD line,
  • if I want to use USB I have D- line at this pin,
  • if I want to use Port D SPI I have MISO line at this pin,
  • if nothing above I can have here the general I/O pin 6 of port D.

The pin probably can have also some more functions, but defining the symbol I specified for each pin the functions that I expected to use. Thanks to that since I defined that symbol (something around 15 years ago) I had never need to look into its pdf when designing the schematic (I used it in about 20 PCBs).

Bear in mind that autolabeling should be on-demand, not automatic. This can be specified before inserting the component with a check box or when using the label pin. If one or more of the pin names are invalid, Kicad could simply complain with an error message (don’t beep at the user like Fusion 360), or even better bring up a dialog box listing one or more labels depending on the selection with the ability to make corrections. When adding names pins, it would be great to offer the option of both human and netnamable label names, i.e. “Enable ~{EN}” or “Data ~{D}”. The label names can be checked for validity during symbol creation.

Yes, of course, never automatic. It should always be initiated by the user on purpose.
But if you bury it too deep, it won’t be a time saver.

In my previous post I had the idea of doing this for a bunch of pins (such as a databus) in one single swoop. But I had not thought about what an implementation could look like. Just now I had a follow-up idea.

KiCad already has an “auto wire” function. You can start a wire just by starting from a pin. This could be extended. For example if you first select one of more pins, and then start a wire from one of those pins, then it duplicates that wire and adds the labels. If there is no selection, then it just starts a singe wire and does not place a label.

Also: Placing a few labels to many sometimes is not such a big deal. Removing extra labels is quicker then typing in the names of all the new labels and placing them.

And on top of that, there should also be an option in the Preferences to completely disable this function, similar to the Schematic Editor / Preferences / Preferences / Schematic Editor / Editing Options / Editing / [ ] Automatically start wires on unconnected pins.

I come from a long and hard MacOS tradition which established today’s user interface standards. They are NOT subjectively chosen, but developed through decades of cognitive research by Xerox PARC and Apple. Hate Apple, but they know how to design UIs with a long track record proving it. Every single EDA tool I’ve come across completely botches UI best practices and standards. Unfortunately, users have come to not only accept them, but conditioned to expect this user hostility as correct. Kicad’s user interface, including selecting items, is hopelessly primitive, which makes its modern lasso selection feature hilariously anachronistic.

Sure by all means give it a go. See how you fare with the real-world specimens out there, and whether it saves enough effort when it gets a match. Might be useful if you are making up labels for bus members; I think this was suggested. Sort of like autocompletion when writing a program perhaps.

BTW just to be clear, my nomenclature is:

Pin name: often the number of the pin, but in some cases a coordinate, like for BGA packages. This is called NUMBER in the table which isn’t always the case.
Pin label: a string describing the function of the pin, usually provided by the maker in datasheets. This is called NAME in the table.
Net label: used for labelling nets, only needed if direct wires not used

The first two come from the symbol from the library. There are other fields like Pin type, used for ERC, and graphical fields like coordinates and pin style.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.