Summary: Digital Command Control systems partition their address ranges into Primary, Accessory and Extended Addresses. These addresses allow control of various decoders by the DCC system.

Short Definition
The range of addresses available on a Digital Command Control system.

Multifunction decoders can be addressed by either Two or Four digit numbers. The digits in are Hexadecimal (base 16) numbers, not Decimal (base 10).

Two-digit addresses ranging from 1 to 127 are possible. Some systems, such as Lenz, may limit the maximum to 99 for legacy reasons. Four digit addressing offers a potential range of addresses from 1 to 10239.

## Multifunction and Accessory Decoder Address Ranges

### Select − And − Run

With Digital Command Control there is no need to worry about where the train is located, which cab you're using, or flip switches to get control a locomotive. To run a loco, you simply pick up a cab, select the loco address (number) you wish to run, and take control of it. This allows you to easily and quickly control the train's speed, direction, lights, and functions.

This section explains the numbering systems and terms which will be used.

While this is an Advanced Digital Command Control Topic, it is useful to know how Digital Command Control addresses are structured.

• Numbering systems will be indicated using mathematical notation, where a subscript indicates the radix or base, where 1210 indicates a decimal (base 10) value, or C216 is Base 16 or Hexadecimal. In this article, Hex numbers may also be prefixed with a dollar sign (\$). If there is no subscript indicating the base, the number has a decimal (0 - 9) value.
• The number of digits refers to a Hex Number, where a digit has a value from 0 to 15 (\$0 - \$F).
• A Multifunction Decoder can use one byte for the Primary Address, or two bytes for an Extended Address.
• An Accessory Decoder may use three bytes for its address.
• NMRA DCC Standard defines the address partitions for 2- and 4-digit addresses, while the actual implementation is determined by the manufacturer of the system. Not all systems implement the addressing scheme in the same manner within their software, so there may be issues with two-digit addresses used by a your DCC system when operated on another DCC system.
• For example, while Address "100" is a two digit (\$64 in hex) Primary Address, a DCC manufacturer may have limited their primary address range to a maximum value of 99 or \$63. [1]

Do not worry about hexadecimal too much, many DCC systems allow entry in decimal numbers and will do the conversion internally.

### Should I Use Primary or Extended Addresses for Multifunction Decoders?

#### Notes Regarding Address Partitions and Multifunction Decoders

• Primary Addresses range is from 1 to 127 [2].
• Extended Addresses occupy a separate address partition, with valid addresses from 128 to 10,239. They do not overlap the Primary Address partition.
• The NMRA has mandated that any DCC compatible product lacking support for features such as Extended Addressing, a reduced Primary Address space or 28/128 Speed Steps must state that on the package and within the instructions.

The choice of addressing modes is a personal one. If operation with multiple unit consists are planned, Extended Address mode is a better choice. Using an Extended Address avoids conflicts with Consist Addresses which occupy the Primary Address partition.

With less than 20 or 25 locos on the layout, Primary Addresses work. Give each loco an address using the last two digits of the road number on the side of the loco. If you have duplicate numbers, use the first two digits of the road number. If that doesn't work, you may have to renumber one or more locos − or switch to Extended Addressing.

Mixing Primary and Extended Addressing can lead to an unintended problem with consisting.

Two locomotives with Extended Addresses are consisted and assigned Consist Address 126. A third locomotive exists with the Primary Address of 126, which will not be included in the consist. Commands sent to Address 126 will be acted on both Consist Address 126 and Primary Address 126. Despite the fact that locomotive #126 is not physically part of the consist, logically it is.

To use Extended Addresses, both the command station and decoders must support Extended Addresses, as well as the throttles. Typically, all decoders support both modes, and the majority of DCC systems support Extended Addressing. Research your choice of DCC systems and components for compatibility, as restrictions, such as limited Primary Address support, are required be stated on the packaging. Extended addressing makes it easy to use the road number of a locomotive as its address (Exception: Europe, where 5 digits may be used by the prototype).

### Address Partitioning, Extended Packet Format (S−9.1.2)

The Address Partitioning allows the decoder to determine if the packet is a multifunction[3] or accessory[4] decoder packet.

DCCWiki.com
1 − 127 [5] 0000 0001 − 0111 1111 \$01 − \$7F Multifunction decoder 7 bit address. CV1[6]
128 − 191[5] 1000 0000 − 1011 1111 \$80 − \$BF Basic Accessory Decoder 9 Bit Address or
Extended Accessory Decoder 11 Bit Address
CV1/CV513 [7]
192 − 231[5] 1100 0000 − 1110 0111 \$C0 − \$E7 Multifunction Decoder 14 bit address. [8] CV17 [9]
232 − 254[5] 1110 1000 − 1111 1110 \$E8 − \$FE Reserved for Future Use
255 1111 1111 \$FF Idle Packet

By partitioning the addresses into distinct ranges, the decoder can examine the address byte and determine if that packet is for it or not. The command station will generate that specific address byte depending on what type of decoder it is addressed to. An address of 100 (\$64) is reserved for multifunction decoders, so a multifunction decoder with that address will respond to that packet. A packet with the address byte beginning with \$80 to \$BF would be for an Accessory decoder, and those beginning with \$C0 to \$E7 are Multifunction Decoder Extended Addresses. Address \$FF is reserved for the idle packet's address.

If an Extended Address is used, the first address byte will have values between 192 and 231[5]. Multifunction decoders set for Extended Address Mode (CV29) will respond to an address byte in that range, knowing that the second byte completes the address.

1. A Primary Address uses one byte to transmit 2 hexadecimal digits
3. The Primary Address is stored in the multifunction decoder’s CV1
4. The Extended Address uses calculated values stored in CV17 and CV18

Determining what type of address is simple for a decoder:

1. Check CV29 for addressing mode in use by decoder
3. If the Address Byte has a value between 1 and 127 (\$01 – \$7F), it is a 2-digit Primary Address for a multifunction decoder. (When Extended Address Mode is off, see CV29). [5] [10]
4. A value between \$80 – \$BF, it is a Basic or Extended Accessory Decoder Address. Address modes are determined by CV29 [5]
5. A value between \$C0 – \$E7, it is a 2-byte, Extended Multifunction Decoder Address. The following byte completes the address. (When Extended Address Mode is on, see CV29)
6. A value between \$E8 – \$FE is reserved for future use at this time.
7. If all the bits are set to 1 (\$FF), it is the Idle Packet.

Reference: Configuration Variables For Digital Command Control, All Scales, S-9.2.2

NMRA Standard S−9.2.2 defines the default Primary Address as 3 (three) for retail multifunction decoders. If the multifunction decoder is installed by a manufacturer in a locomotive or other vehicle, it can be any value. The often-repeated statement regarding the default always being 3 (three) is a myth. [11]

#### Multifunction Decoder Primary and Extended Address Ranges

As noted above, the NMRA Standard defines two ranges of addresses for multifunction decoders:

The Extended Address range is 1 through 10239 (116 to 27FF16). Many systems begin extended addresses at 128, reserving addresses below that value for Primary Addresses only. The Address Partitioning results in 39 or 40 (depending on the command station's software) groups of 256 addresses, for 9983 or 10239 possible addresses in total. To use an Extended Address, the EAM flag in CV29 must be set. Doing so tells the multifunction decoder's firmware to use the values stored in CV17 and 18.

This address consists of two bytes, six bits in the first address byte (CV17) and eight in the second (CV18). [14] To reach FFFF16 (or 6553510) would require all 16 bits, meaning there would not be any bits left to indicate which addressing mode is in use. Most command stations calculate CV17 and CV18 automatically, setting CV29 appropriately in the process. Some command stations may permit 1 – 127 as an Extended Address, others prevent their use or that of leading zeros to pad an address (i.e. 0075). This can be an issue if a locomotive it taken to layout which uses another DCC system.

Archaic terms for Extended Addresses are "14−bit" or "Long" Addresses. Sometimes called a 14−bit address as 6 address bits are transmitted in the first address byte of the DCC packet in extended address mode. The first two bits of the first byte are reserved and always set to 1.

All DCC Command Stations, Throttles, and Decoders support two−digit (Primary) addressing as per the NMRA standard. Even if your equipment has four−digit addressing, you don't have to use it. [1]

Also see the article on Consisting, as the Consist Address (CV19) can be an issue when a locomotive is used on another layout.

#### Multifunction Decoder

Address Zero is reserved in the NMRA Standard S-9.2.1 for exclusive usage as a "Broadcast Address". [15]

Any DCC locomotive receiving a DCC command packet sent to this address must accept the DCC command without regard or consideration of its assigned address. NCE uses this feature in the Power Pro software to clear consists.

The value stored in CV1 does not need to be "0" for this feature to work. Therefore, this address is NOT a locomotive address that a user needs for the normal control of his trains. However, this is an address the DCC system itself may want to send. An example at the DCC system level is E-STOP command which will halt all trains immediately without disconnection of track power.

See Braking District for more on using the broadcast packet to stop trains.

#### Note Regarding CV 1

Important: Never set CV1 to a value of Zero! CV1 acts with CV12 [16]. Setting CV1 to zero causes the decoder to ignore the Alternate Power Source switch in CV29, enabling Power Source Conversion (CV12 [17][18]), which may result in a runaway locomotive.

### NMRA Multifunction Decoder Address Range Summary

1. Primary Addresses are the values from 1 to 127 (inclusive). These values are found in CV1 (Primary Address). [19]
2. Extended Addresses are values from 128 to 10239. These values are stored in CVs 17 and 18 (Extended Address), and are only active if the Extended Address Mode flag in CV29 is set. [19]
4. Address "0" can have a number of meanings. That address is not permitted in CV1 (Primary Address).
5. Manufacturers of DCC command stations are not required to implement the entire range of Primary and Extended addresses, such as limiting the Primary Addresses to 1 − 99.
6. The terms "2 digit" and "4 digit" address are not technically correct for decimal numbers.
1. Primary Address is limited to 127, as the MSB (most significant bit) indicates directional status. [19]
2. Extended Addresses use the MSBs of the first byte to indicate Extended Addresses.
3. Two-digit address refers to a single byte binary or 2-digit hex number, four digit means a 2-byte address (Four Hex Digits). The actual decimal value can be more than 9999 in 4-digit mode.

Myth: A Multifunction Decoder's default address is 3 (three).

NMRA Standard S−9.2.2 defines the default Primary Address as 3 (three) for retail multifunction decoders. If the multifunction decoder is installed by a manufacturer in a locomotive or other vehicle, any valid address is permissible.

### Multifunction Decoder Address Compatibility Issues

There is some overlap in addressing, different command stations handle that overlap differently. Some command stations do not allow addresses 1 − 99 or 1 − 127 to be used as an Extended Address.

• The NMRA DCC Standard does not require the manufacturer to implement all the addresses possible in their command station software.
• Primary Addresses may be restricted to numbers between one and ninety-nine (0x63).[20] A locomotive programmed for 101 (0x65) will not run on a DCC system which restricts the maximum address to 99.
• Some systems may limit addresses to a small range, such as 1 to 10, often implemented for cost reasons. These restrictions must be clearly identified on the packaging and in the instructions for the DCC system in question.
• The Extended Address maximum value is 10,239 unique addresses. Some systems may limit this to 9,999 addresses or less. For most users this will not be an issue, as they still have 90% of the address space available.[21]
• With an overlap between Primary and Extended Address values of 1 – 127, the decoder recognizes the difference, as the address byte will equal to or greater than 192.
• If the Primary Address in CV1 is set to a value of 0 or an invalid address, the decoder will, upon power up, switch to the Alternate Power Source defined in CV12, overriding CV29's APS flag. Any locomotive configured in this manner will immediately accelerate to full speed when the DCC track power comes on.
• CV12 is an optional CV. If the decoder does not support an alternate command control system, CV12 will be omitted. In many multifunction decoders the only alternate mode available is Analog.

### Programming a Multifunction Decoder Address

Attempting to program an extended address using Program on the Main (POM) mode can cause problems. See the article on Decoder Programming for more details.

• Most command stations handle all the needed calculations required to program addresses. Their software eliminates the need to calculate and enter values into CV29, CV17 and CV18. This is why there may be an overlap between manufacturers regarding Primary and Extended address implementation.

### DCC Systems and Addressing Ranges

Primary 1 − 127 \$1 − \$7F
Extended 1 − 10239 \$1 − \$27FF

#### Digitrax

• 0 = Analog Mode

The software in the Digitrax command stations support Primary addresses in the range of 1-127 only. An Extended Address of 0001 to 0128 is not supported and will not be recognized by the command station.

Do not attempt programming an Extended Address using Ops Mode, as the programming operation will not succeed, and it is possible that a random address will be programmed instead.

The Extended Address restriction of 9983 is only present in a LocoNet throttle. External throttles such as JMRI can address the entire NMRA Extended Address Range.

#### EasyDCC and Lenz

• 0 = Analog Mode
• Not supported by EasyDCC

To maintain compatibility with their older, pre-DCC Standard command control products, Lenz limited the Primary Addresses to 1 – 99.

#### Atlas

Although Atlas DCC systems are supplied by Lenz, their software lacks support for Extended Addresses and Analog operations.

• Primary Address: 1 – 99
• Consist Address 1 – 99

#### Bachman EZDCC

• The EZDCC system lacks support for Advanced Consisting
• Analog operation uses another address.
• Primary Address Range limited to 1 – 9

#### NCE

• 0 = No locomotive selected
• 1 − 127: Either Primary or Extended depending on how selected, a leading 0 (i.e. 0100) will make selection extended. See Consisting article for more details.
• If a Primary Address is padded with leading zeros, the command station will interpret it as an Extended Address, and calculate the correct value. During configuration of a multifunction decoder with the handheld throttle it will set CV29's Extended Address flag.
• 0001 − 9999: Extended Address
• Example, Extended Address 55 is entered as 0055 or 055. The throttle will display an asterisk (*) before the address indicating an Extended Address.
Current NCE products do not support analog (no decoder installed) locomotives, older NCE systems, including those built around NCE OEM parts and software, did allow analog operations using a home built (analog only) throttle.

#### Zimo

• Analog Mode = User assigned address
• 1 − 127: Primary Address
• 100 − 10239: Extended Address

Main article: Accessory Decoder

As noted above, Basic Accessory Decoder Packets have addresses in the range of 128 − 191 (\$80 − \$BF) which are reserved for Accessory or Stationary Decoders. They are differentiated from Multifunction Decoder addresses by the value first two bits being 10.

Accessory Decoders have 9- or 11-bit addresses. This is accomplished by the structure of the data packet, where the first byte contains six address bits.

Accessory Decoders can be designed for momentary or contant on devices, the duration of each output is controlled by CVs 515 – 518. Bit 3 of the second byte (C) activates or deactives the controlled device.

As most devices are paired, bit 0 of the second byte determines which pair of outputs are being activated/deactivated. Bits 1 and 2 indicates which of four pairs the packet controls.

### Accessory Decoder 9 Bit Address

Basic Accessory Packets

Basic Accessory Decoder Packet
Preamble 0 10AAAAAA 0 1AAACDDD 0 EEEEEEEE 1

Where:

• C = Command and
• D = Data.

C activates/deactivates the addressed decoder as needed. The three data bits allow control of up to 8 functions (0-7), split into 2 pairs of 4 outputs.

By convention, the three address bits (bits 4-6) of the second byte are in One's Complement format. Bit 7 indicates the sign is negative.

### Accessory Decoder Extended (Eleven Bit) Address

• Extended or Signal Accessory Decoder Packet
• Intended for use with Signal Systems. Sometimes called a Five Digit address, as it can be values up to 16,383.

Basic Accessory Decoder Packet
Preamble 0 10AAAAAA 0 0AAA0AA1 0 000XXXXX 0 EEEEEEEE 1
Note that the four CDDD bits of the nine-bit address packet have been replaced with two additional address bits, 0AA1 to make an 11-bit address. The first 9 address bits are still present. Bit 7 (the leading bit) of the second byte is a 0, indicating bits 4-6 are a positive value. This allows the decoder to determine if the packet is for turnouts or signals

The XXXXX is for signal aspects. The five bits are for a single aspect, a value of 00000 indicates absolute stop. The five-bit values are determined by the signalling system and the prototype being modelled.

The following third byte contains 5 bits (XXXXX) which are for signalling applications. The third byte allows combinations up to \$1F, or 32 possible signal aspects. A value of 00000 is the absolute stop indication. This allows for various signal aspects dependant on the prototype modelled.

Additional commands are available for broadcast commands, configuration variable access, and Operations Mode programming. Some commands are unique to the basic and extended addressing modes.

See S-9.2.1, DCC Extended Packet Formats for more detail.

## Multifunction Decoder Packet Construction

Preamble [22] Start Bit Address Byte Data Start Bit Data Byte Data Start Bit Error Btye Packet End Byte
111111111111 0 0AAAAAAA 0 01DCSSSS 0 EEEEEEEE 1

All values are valid except for 0, 11111110 (\$FE) and 11111111 (\$FF).

• This byte can be used in special case for instructions, such as Service Mode Programming

Bits 0 – 5 [23] can any value. If both bits 6 and 7 are set to value of 1, the decoder interprets that as an extended address and expects a second byte for address data. A multifunction decoder's primary address may have any value from 1 to 127. Maximum permissible value is 127, but the manufacturer may limit the address space. [1]

For the consist address, see CV19.

#### Data Byte

• Bits 6 and 7 are set to 01 indicating this byte is for speed and direction information. These bits can also be used for other types of instruction data, defined in the Extended Packet Format Recommended Practice (RP-9.2.1)
• "D" is direction. When set to 1 the locomotive should move in the forward direction. [24]
• "C" is an additional speed bit, which enables the 28 speed step mode when combined with the S bits. For backward compatibility this bit may also be used to control the headlight. [25][26]
• "S" is the speed instructions.
• The 14 Speed Step Mode is obsolete.

#### Error Byte

This byte is used to determine the presence of errors. It cannot be used to correct an error, only identify the presence of one. It is created by an Exclusive OR (XOR) operation on the Address and Instruction Bytes.

Preamble Start Bit Address Byte Data Start Bit Address Byte Data Start Bit Data Byte Data Start Bit Error Btye Packet End Byte
111111111111 0 AAAAAAAA 0 AAAAAAAA 0 CCCDDDDD 0 EEEEEEEE 1

The Primary Address byte contains seven address bits. If the EAM flag is set in CV29, the decoder will ignore any valid address in CV1, switching to the values stored in CVs 17 and 18.

When the most significant bits are between 1100 0000 and 1110 0111 (decimal values 192-231) inclusive, a second address byte must follow immediately after. These values in the first byte signal to the decoder that this packet is a multifunction decoder packet with an extended address. The two address bytes are separated with a 0 bit.

The most significant bit of the two-byte address is bit 5, bits 6 and 7 having a value of 1 in this case. As 14 of the sixteen available bytes are used, the archaic term 14 bit address may be seen in older documents. [27]

#### Data Bytes

The data byte contains the instructions for the decoder. It can one to three bytes in length.

The instruction byte is defined as:

• CCCDDDDD,
• CCCDDDDD 0 DDDDDDDD,
• CCCDDDDD 0 DDDDDDDD 0 DDDDDDDD

Each instruction consists of a three-bit instruction field (CCC) followed by a five-bit data field. The five-bit data field may contain instruction subtype or tertiary types as well as flags. See the DCC Extended Packet Formats, S-9.2.1 for further details.

Instruction Bits Purpose
000 Decoder and Consist Control [28]
010 Speed and Direction for Reverse Operation [30]
011 Speed and Direction for Forward Operation [31]
100 Function Group One Instructions [32]
101 Function Group Two Instructions [33]
110 Feature Expansion [34]
111 Configuration Variable Access Instruction [35]

### Example of Differences Between Two and Four Digit Addressing

Numbers in CVs 1, 17 and 18 in the table are expressed in Hexadecimal. The address is a decimal value. Note that changing the address from Primary to Extended mode changes the value in CV17.

The Extended Address begins with \$C0, the next byte contains \$63, or 99 in Decimal. The first byte of the Extended Address can only equal values from 192 (\$C0) to 231 (\$E7). Setting CV29 controls the addressing mode a multifunction decoder will accept. In some DCC systems the software will automatically set a multifunction decoder's CV29 to Extended Address mode when an address within the Primary Address range is padded with leading zeros. Values 128 to 191 indicate an Accessory Decoder or Extended Accessory Decoder address. See the section on Address Partitions above.
Primary 99 \$63 -- --
Extended 099 Undefined \$C0 \$63
Extended 0099 Undefined \$C0 \$63

### Video: Long Addresses and CV29

CV29 is often called the Master Variable because it controls how several other functions operate. This makes it very important to get it right. In this video I'll share with your what CV29 does, and give you a handy table that saves you the trouble of hand calculating the needed values.

#### NMRA Documents

##### Normative
• S-9.1 DCC Electrical Standard
• S-9.2 DCC Communication Standard
• S-9.2.1.1 DCC Advanced Extender Packet Formats
• S-9.3.2 DCC Bi-Directional Communication
##### Informative
• TN-3.05 Electrical Specifications for Digital Command Control Decoder Transmission
• TN-4.05 Electrical Specifications for Digital Command Control Decoder Transmission
• RCN-210 DCC Protocol Bit Transmission
• RCN-211 DCC Packet Structure
• RCN-212 DCC Operating Commands for vehicle decoders
• RCN-213 DCC Operating commands for accessory decoders
• RCN-214 DCC configuration commands

There has been a concentrated effort to harmonize the Standards and Rail Community Norms listed above.