
What explains the unintuitive numbering of chip pins? - DSpinellis
https://www.spinellis.gr/blog/20200320/
======
dboreham
I think this is wrong. Pins really pads that are numbered on the die. The die
is square (or was back then). Pads are numbered in sequence around the pad
ring. So the concept of columns doesn't exist in the context of the die. As to
why number counterclockwise vs clockwise, possibly that's to do with existing
convention from valves. However note that in the beginning dual inline
packaging wasn't the norm. There were flip chip packages, die on board,
circular TO-xx metal can packages etc. So whatever led to the counterclockwise
numbering convention certainly predated DIL packages.

~~~
Waterluvian
That's a really good point. So if you wanted a single numbering system for
4-sided and 2-sided chips, the current approach is quite a sensible
compromise.

If you have the little key symbol in a corner, you can just "walk the chip"
from there, regardless of sidedness

~~~
vvanders
These days of SMT chips the trend is towards more QFN and QFP so columns make
less sense as well.

~~~
monocasa
I'd say the trend is towards BGA on the active components.

------
eqvinox
The only pin numbering I ever perceived as unintuitive is on PLCC packages
where pin 1 is in the _middle_ of one of the 4 sides. Especially since there's
still a marker dot in one of the _corners_ generally.

Luckily, PLCCs are rare these days.

Example:
[https://www.zilog.com/manage_directlink.php?filepath=docs/z8...](https://www.zilog.com/manage_directlink.php?filepath=docs/z80/ps0180&extn=.pdf)
(Note that the orientation on the PLCC package is indicated by one of the
corners being different, yet that's not where pin 1 is.)

~~~
neltnerb
Yeah, I've seen those. Do you have any idea why they did that? I had twenty or
thirty on a recent board and they took so much extra work to double check
because they didn't follow convention. I probably read that pinout in
disbelief for an hour before I called them to check.

I think that's why people number them the counterclockwise way, if they didn't
they'd get furious engineers calling them and yelling (I didn't yell, I was
just very confused) that they aren't following the standard. There are so many
ways to make a mistake in a circuit board already, once someone decided on a
numbering scheme momentum probably just kept it going to be honest. Why would
you change it when there is no functional difference and it makes mistakes
less likely?

~~~
eqvinox
> Do you have any idea why they did that?

No, not the slightest clue. If you find an answer, I'm interested too...

~~~
neltnerb
All I can find is the definition, which states that pin one is in the middle
of the top at least in the 44 pin package.

[http://www.interfacebus.com/ic-package-plcc-dimension-
outlin...](http://www.interfacebus.com/ic-package-plcc-dimension-outline-
drawing.html)

No idea on the history though, hopefully someone can enlighten us, Google did
not.

------
bnegreve
> Why are pins counter-intuitively numbered in a rotating fashion rather than
> by columns as one would expect for a rectangular package?

I am not sure why this is counter intuitive, on a 8 pin package, it makes
sense to keep pin 5 close to pin 4 to simplify the layout of the wires, and in
general, it makes sense to keep consecutive pins close to one another. This
applies to vacuum tubes as well.

~~~
thedufer
Is there something particularly five-y about pin 5? Surely if you called it 8
nothing else would change. No one is suggesting redesigning the whole thing.
Just move a few labels.

~~~
bnegreve
Yes, consecutive pins are often related in some way. Let say pin 3,4,5 and 6
belong to the same port, and must be connected to a connector on the other
side of the PCB.

If pins were numbered by columns, you would have to connect two tracks to one
end of the chip and two other tracks to the other end of the chip. Once you've
done that, routing the remaining tracks is basically impossible on a single
PCB layer.

~~~
thedufer
> If pins were numbered by columns, you would have to connect two tracks to
> one end of the chip and two other tracks to the other end of the chip.

You have missed my point entirely. All you have to do is re-label them. There
is absolutely no re-wiring or re-routing implied by changing the pin numbers.

~~~
bnegreve
No I haven't, but I've failed to convince you, it seems.

It does make a difference because the chip designer doesn't know or doesn't
care how the chip is going to be packaged and where the pins are going to be
placed on the package.

With the standard numbering, two consecutive pins are _always_ placed next to
eachother no matter the package, and the chip designer can use this
information to optimize the placement of related pins.

This is not true with the alternative numbering "by column", where pin 4 and 5
are close on most packages, but far away on a DIP 8 package.

------
amelius
Well, we now have packages where pins are on 4 sides (not just 2 sides). For
example [1]. So here it certainly makes sense that numbering goes around the
package instead of in columns/rows.

[1]
[https://en.wikipedia.org/wiki/Quad_Flat_Package](https://en.wikipedia.org/wiki/Quad_Flat_Package)

------
smoyer
Why would a convention be considered unintuitive? You learn it and it's just a
design fact. I'm not sure I agree with the article - it seems like a case of
human-pattern matching.

~~~
aendruk
What's unintuitive is that it doesn't follow other conventions that could
reasonably be applied.

~~~
eqvinox
Which conventions would that be?

~~~
aendruk
Reasonable candidates, per the article:

\-
[https://en.wikipedia.org/wiki/Left_to_right](https://en.wikipedia.org/wiki/Left_to_right)

\-
[https://en.wikipedia.org/wiki/Clockwise](https://en.wikipedia.org/wiki/Clockwise)

~~~
eqvinox
By that logic:

\-
[https://en.wikipedia.org/wiki/Counterclockwise](https://en.wikipedia.org/wiki/Counterclockwise)

Also, it's clockwise when viewed from what used to be the wiring side, i.e.
bottom.

Also-also, mathematical/engineering sense of rotation for positive angles is
counterclockwise. ("The mathematician works against the clock.")

Also-also-also, you've listed 2 conventions with no preference between them.
If either would have been picked, we would be having the same discussion right
now on why it wasn't the other one. The only thing that would give any
advantage here is if there were established context or logic giving
significant preference to any of them.

~~~
aendruk
Yes, you understand correctly. In this case, assume the life and cultural
context of the author.

------
pwg
Also, when creating wire wrap circuits
([https://en.wikipedia.org/wiki/Wire_wrap](https://en.wikipedia.org/wiki/Wire_wrap))
one works from the underside of the board, so the underside pin numbering
image shown in the webpage is the pin numbering one follows while wire
wrapping a circuit.

------
emilfihlman
It seems like the author just wanted to write about something, and he chose
something he's not familiar with but what appears as quirky to him. I expected
the article to talk about IC design and peripherals (the placement of which is
what is actually something that might seem unintuitive at first to many, well
perhaps more annoying than unintuitive).

~~~
joezydeco
_It seems like the author just wanted to write about something, and he chose
something he 's not familiar with but what appears as quirky to him._

Welcome to Hacker News, you must be new here. =)

