As mfm37 pointed out, a DCC decoder needs to do two things: pick up power from the rails and transfer that power to the motor. That requires four wires, two for power pick up and two for the motor.
A basic decoder is typically a 2-function decoder, meaning that it also provides control over a forward light (headlight) and a reverse light (rear light). That basic lighting requires 3 wires, one for each light and a "common" wire. So, now you need 7 wires, thus the 8-pin connector with one blank position.
To accomodate more lighting features such as a Mars light, numberboards, ditch lights, etc., more advanced decoders provide 4-functions for lighting. A 9-pin connector is used to accomodate the extra 2 wires for those two additional functions.
A 21-pin connector is used for sound decoders and provides additional function capability as well.
Rich
Alton Junction
I'm of the old school Mel camp. But NixTrainz makes a replacement circuit board that will accept 21 pin decoders. Having never used one, I am not the person to explain them,
Henry
COB Potomac & Northern
Shenandoah Valley
I model the early to mid 1950s so the original NMRA 8 pin works fine for me. None of my locomotives need modern lighting. I wired all of my locomotives using the 8 pin sockets. The only exception are a couple of E7 diesels that I ordered Digitrax decoders for that came with the 9 pin JST connector harness.For me the compatibly of the 8 pin connector works out great.I made me a DCC tester and the 8 pin connectors workout great.I mounted a female 8 pin on all of my steam locomotives for connecting the tenders with decoders.
I made a short male pigtail for the tenders.
I can easily check the operation of my locomotives by plugging in my tester to the 8 pin female connector.Mel Modeling the early to mid 1950s SP in HO scale since 1951My Model Railroad http://melvineperry.blogspot.com/ Bakersfield, California Aging is not for wimps.
ndbprr So we now have 8, 9 and 21 pin sockets being factory installed. Can the sockets only use decoders with alike number of pins?
So we now have 8, 9 and 21 pin sockets being factory installed. Can the sockets only use decoders with alike number of pins?
ndbprr Will an 8 pin fit a 9 socket?
Will an 8 pin fit a 9 socket?
ndbprr Will either fit in a 21 pin socket or are multiple sockets being installed to allow a choice?
Will either fit in a 21 pin socket or are multiple sockets being installed to allow a choice?
Any decoder could be adapted to work. All mobile decoders need 4 pins to work. Two in from the rails (Red and black) and two out to the motor Orange and Grey). The rest are for functions and/or sound. Use the ones you want or need. the rest can stay disconnected.
So we now have 8, 9 and 21 pin sockets being factory installed. Can the sockets only use decoders with alike number of pins? Will an 8 pin fit a 9 socket? Will either fit in a 21 pin socket or are multiple sockets being installed to allow a choice?