Address Range

DCCWiki, a community DCC encyclopedia.

Short Definition

The range of addresses available on a DCC system.

This DCC topic deals with the address range used by mobile decoders. For stationary decoders, see the article on Accessory Decoder Addressing.

Mobile Decoders can be addressed by either two or four digit numbers. If you have a large number of decoders, you may want a system that can handle four digit addressing. The digits in question are Hexadecimal (base 16) numbers, not Decimal (base 10).

With two digits you can have addresses from 1 to 127 (excluding 0 and 3). Four digit addressing increases that range (in theory) from 0 to 10239.


Decoder Features

Movement & speed
Back EMF
Decoder-Assisted Consisting
Dither
High Frequency
Kick Start
Loco Momentum
Loco Trim
Loco Momentum
MU consisting
Speed Steps
Speed Table
Switching Speed
Three Step Speed Table

Forward/Reverse Trim

Vstart
Vmid
Vhigh

Programming
Addressing
CV Reset
Programming
Programming Lock
User Identifier

Lighting & Effects
Directional Lights
Func Remap
FX Lighting
Master Switch

Misc
Short-Circuit
Thermal Protection
Transponding

DCC Core components

Intro
Booster
Command station
Decoder
Power supply
Throttle

Track work components

Track wiring
Track work

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 a cab to talk to a loco. To run a loco, you simply pick up a cab, select the loco address (number) you wish to run, and control it. This allows you to easily and quickly control the train's speed, direction, lights, sounds, or devices such as couplers or animation.

NMRA Address Ranges

The NMRA defines the address structure for 2 and 4 digit address, the actual implementation is determined by the manufacturer of the system. Not all systems implement this in the same way in their software, so there may be some issues running locomotives set up for 2 digit addresses on one DCC system when using another system.

In this article, 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 Hexidecimal. The $ symbol will also indicate a hexadecimal number.

NMRA Standards for Locomotive (Mobile) Decoders:

  1. One to 127 are Primary Addresses (Sometimes called Short Addresses)
  2. One through 10,239 are Extended (or Long) Addresses
  3. Advanced Consist Addresses share the Primary Address' 1-127 range
  4. The Primary Address of "0" can have several applications.

The NMRA defines two ranges of addresses for mobile decoders:

Primary Address Range

  • The first address range defined is 1 through 127. This is called the Primary Address. It is a one byte (eight bit) address which in Hexadecimal (see Binary) can have the value of 0116 to 7F16 (1 ..127 decimal) - hence it is called a two digit address. Other terms used for the Primary address are "Short Address", "Baseline Address", "7-bit address", and "2-digit address". It is called a 7-bit address because the first (most significant) bit in the first byte of a DCC packet is always a zero when it is addressing a mobile decoder in primary address mode. The MSB of this byte is used for other purposes.

Extended Address Range

  • The second range of addresses is from 1 through 10239 (116 to 27FF16 - hence 4-digit address). This is called the Extended Address. Other terms used for the Extended addresses are "4-digit address", "14-bit address" and "Long Address". It is called a 14-bit address because 6 bits are transmitted in the first byte of a DCC packet in extended mode and 8 bits in the second byte. To reach FFFF16 (or 6553510) would require all 16 bits and then there wouldn't be any bits left to indicate which addressing mode is in use.
$27FF is 0010 0111 1111 1111 in Binary.

All DCC Command Stations, Cabs, 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.

It is possible for command stations to restrict the available addresses, but the NMRA DCC Standard mandates that limitations be identified on the package and in the instructions.

NMRA Address Range Summary

  1. Primary Addresses are the values from 1 to 127.
  2. Extended Addresses are values from 0 to 10239.
  3. Advanced Consist Addresses also use the Primary Address range.
  4. Address "0" can have a number of meanings. That address is not permitted in the Primary Address range.
  5. Manufacturers of DCC command stations are not required to implement the entire range of Primary and Extended addresses. Such as 1 - 99 for Primary Addresses.
  6. The terms "2 digit" and "4 digit" address are not technically correct.
    1. Primary Address is limited to 127, as the MSB (most significant bit) of the equivalent two byte binary number is used to indicate headlight status. The same limitation applies to 4 digit addresses.
    2. Extended Addresses use the MSBs of the first two bytes to indicate extended addressing and headlight mode.
    3. Two digit address refers to a two byte binary or 2 digit hex number, four digit means a 4 byte address. The actual decimal value can be more than 9999 in 4 digit mode.

Packet Construction

PRIMARY ADDRESS
Preamble 0 AAAAAAAA 0 CCCXDDDD 0 EEEEEEEE 1

"D" is direction "X" is an extra bit for speed steps, which may be used to headlight control to maintain compatibility. A Value of 0111 1111 is address 127: It will be transmitted like this:

LSB Bit Value MSB
7 6 5 4 3 2 1 0
1 1 1 1 1 1 1 0

If bits 0-5 are any value except 111111, and 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. The address byte can have any value from 1 to 127.

The Least Significant Bit is transmitted first, so it can be a little confusing. Data is sent in serial fashion and clocked into a shift register one bit at a time. As each bit of data arrives, the values in the shift register move to the right. After all eight bits have arrived the LSB will be in the correct place at Bit 0.
EXTENDED ADDRESS
Preamble 0 AAAAAA11 AAAAAAAA 0 CCCDDDDD 0 EEEEEEEE 1

In this example, the most significant bits of the address byte are 6 and 7, set to "11", and if the others are not 111111, it indicates that another byte of address data will follow. Bit 5 forms part of the address and is the MSB for the address value. Since bits 0-5 cannot equal 111111, this limits the available address range.

The first address byte can hold any value from 192 to 231

Example of Differences Between 2 and 4 Digit Addressing

Numbers in CV 17 and CV18 are expressed in Hexadecimal. The address is a decimal value.

Type Address CV17 CV18
Primary 99 $63 --
Extended 0099 $C0 $63

Compatibility Issues

There is some overlap of addresses, different command stations handle that overlap differently. For example, some command stations do not allow you to use the low addresses (1-99 or 1-127) in four-digit mode. This is often done for cost reasons, allowing them to use components and software that cannot handle the full range. As noted above, it is permitted, but any restrictions must be clearly identified on the packaging and in the instructions for the DCC system in question.
  • Primary Address Range may be restricted to numbers between one and ninety-nine (0x63). A locomotive programmed for 101 (0x65) will not run on a DCC system which restricts the maximum address to 99.
  • The Extended Address range is limited to a maximum value of 9999. For most users this will not be an issue, as they still have 90% of the address space available.
  • With an overlap in some cases between Primary and Extended Address values 1-127, the decoder can recognize the difference between them based on the number of bytes used to transmit the address.
  • If the Primary Address in CV1 is set to a value of 0, the decoder will upon power up switch to the Alternate Power Source defined in CV12. This will override the value set in CV29. Any locomotive configured in this manner will immediately accelerate to full speed when the DCC track power comes on.
  • The standard doesn't require the manufacturer to implement all the addresses possible in that range.

Address Zero

Address Zero is reserved in the NMRA Standard S9.2.1 for exclusive usage as a "Broadcast Address".

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.

DCC Systems and Addressing Ranges

NMRA Standard Addressing Schemes

  • Primary Address: 1 - 127
    • Extended Address: 0 - 10239
  • Analog Operation: Allowed
  • Advanced Consist Address: 1 - 127
NMRA Addressing Method Address
Decimal Hexadecimal Binary
Primary 1 - 127 $1 - $7F 1 to 0111 1111
Extended 1 - 10239 $1 - $27FF 1 to 0010 0111 1111 1111
Advanced Consist 1 - 127 $1 - $7F 1 to 0111 1111

Digitrax

  • 0 = Analog Mode
  • 1-127: Primary Address
  • 128-9983: Extended Address
  • Advanced Consist Address: 1 - 127

EasyDCC and Lenz

  • 0 = Analog Mode (Not supported by EasyDCC)
  • 1-99: Primary Address
  • 100-9999: Extended Address
  • 1-99: Advanced Consist Address

Atlas

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

Bachman EZDCC

  • The EZDCC system lacks support for Advanced Consisting
  • Analog operation uses another address.
  • No Extended Addresses
  • 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.
  • 0-9999: Extended Address
  • Advanced Consist Address: 1 - 127
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
  • 1-99: Advanced Consist Address

Programming an Address

Something to keep in mind:

Attempting to program an address using Program on the Main (POM) mode can cause problems if the current address is an Extended Address.

See the article on Decoder Programming for more details.

  • Most command stations are setup to 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.

Additional Reading

More information is available in the NMRA DCC Standards documents:

Electrical Standard

Communications Standard

Which One Should I Use?

The choice of two or four digit addressing is a personal one.

If you have less than 20 or 25 locos on the layout, two-digit addressing works. Just 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 use four-digit 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 30. A third locomotive with the Primary Address of 30 also exists, and will be included in the consist. Commands sent to Address 30 will be acted on by Consist Address 30 and Primary Address 30. Despite the fact that locomotive #30 is not physically part of the consist, it is logically part of it.

Remember, no matter if you picked the first two, or the last two digits, be consistent.

To use four-digit addressing, you must have a command station and decoders that support four-digit addressing, and throttles that can use it. Typically, all decoders support four-digit addressing, and the majority of DCC systems support four-digit addressing. You'll need to research your choice of system for compatibility.

Four digit addressing makes it easy to just use the road number of a locomotive as its address.

External links

Hexadecimal