Accessory Decoders


Accessory Decoders, also known as stationary decoders, are DCC addressable devices used to perform some basic function. A set of addresses separate from those used by locomotives (mobile decoders) is set aside for these. Older devices used nine-bit addresses allowing up to 512 devices, while newer ones can address up to 4095 devices. However manufacturers may limit this. For example, the Digitrax BDL168 board is limited to addresses 1 to 999 (and an older BDL was limited to 256).

Like mobile decoders, accessory decoders get their commands through the track. It’s generally a good idea to wire these separately (i.e., split the track output at the command station and run a separate accessory decoder bus from the track power bus). Some decoders will also make provision for a separate “command bus” instead of taking commands from the command station’s track output (e.g., Digitrax’s LocoNet is an example of this). But on a simple layout, accessory decoders could be connected directly to the track to receive their commands.

Because the addresses are independent, command stations must use a different command to access them. For example, on Digitrax the current locomotive controlled by a throttle is selected via the “LOCO” button, but the current accessory decoder is selected via the ’SWCH” (aka “Switch”) button.

Accessory decoders tend to be designed to performa a specific function, and may require a specific setup defined by the manufacturer. This page notes some information based on the standards, but the reader is cautioned that accessory decoders may not implement any of this (beyond basic addressing) as it’s all optional. Additionally few, if any, command stations support programming directly via CVs using the accessory address, so programming a decoder may depend not only on the specific decoder, but the command station’s preferred method of programming. The decoder manufacturer should document this if it differs by command station, but you may need to consult your command station manual or manufacturer.

In short, most of the info on this page is probably useless for most decoders and command stations. It’s provided here for reference for myself, and it might apply in specific instances, but really, read your decoder’s manual.

Accessory decoders may use CVs, but since these do not control a locomotive motor or head/tail lights, the definitions are completely separate. For example, while the basic address for both is stored in CV1, in a mobile decoder up to 7 bits (locos 1-127) are stored in this CV, while in an accessory decoder only bits 6 bits (accessory decoders 1-63) are kept here. And in a mobile decoder CV1 is unused if longer addresses are assigned, while in an accessory decoder CV1 is used in addition to the additional CV(s).


Common CVs


While many decoders will have different behavior based on the specific application, the NMRA defined some standard functions (all of which other than the address and the configuration register are optional, and thus may not exist).

Note: programming CVs directly may not be desirable, or even possible, depending on the design of the decoder. Consult the manual for the specific decoder to determine what options exist and how the manufacturer expects them to be changed.


Addressing Accessory Decoders


Most command stations don’t support programming the accessory decoder address via the standard NMRA mechanism described here (my Digitrax does not, as far as I can tell). You’ll probably need to use a manufacturer-specific approach. One common method is to set a switch on the decoder and then send a turnout command for the desired address, which the decoder will then store as its own address; e.g., to set decoder address 12, set the physical switch on the decoder, select turnout 12 and send a “thrown” command, then turn off the physical switch on the decoder, and it should now respond to “12”. Some decoders have other methods for setting addresses.

The default address of an accessory decoder is “1”, and this is set in CV1 (or on some older decoders, in CV513). To change the address to any value up to 63, simply write the appropriate number into CV1 (or CV513) as long as the decoder wasn’t previously assigned a number higher than 63. However when addresses greater than 63 are used, addressing becomes more complex. Some command stations may hide the mechanics of this, and allow longer addresses to be programmed. But if they don’t, or if they don’t support all address sizes, larger addresses can still be set by programming the appropriate CVs directly, assuming both decoder and command station allow CV programming of accessory decoders.

Note: I’ve seen some accessory decoders that use mobile decoder programming of CVs via a special address (like 99) that’s hardwired into the decoder regardless of its programmed accessory decoder address. If the decoder manual is describing CV programming as a mobile decoder, some or all of what’s described here may not apply.

An individual decoder may also support more than one address. The most basic way is to use sequential addresses. Thus if the decoder supports, for example, four turnout controls, setting CV1 to “7” would assign 7 to the first output, 8 to the second, 9 to the third and 10 to the fourth. If you had two of these, you should not reuse addresses 8, 9 or 10, but instead program the second to 11 (or some higher number). Some decoders may provide for other ways to assign addresses that are not sequential, again consult the manufacturers manual for details.


Basic Addressing


For addresses up to 511, CV9 (CV521 on older decoders) is used in addition to CV1. This CV defaults to 0, and should be set to 0 if reprogramming from a higher address to a lower one. Note that as soon as CV9 is changed, the decoder address changes, which can complicate programming if not done via a “programming track” output from the command station.

If your decoder permits assigning the address via CV programming, and if your command station does as well, then to set an address larger than 63 (or change an existing one larger than 63) you need to connect to the programming track (“direct mode” programming) and do the following:

Assume you want to program an address “A” that’s between 64 and 511. To do that, you have to break it into a low part we’ll call “L” and a high part we’ll call “H”, and program these into two CVs. While this is somewhat like what is done for extended addresses on mobile decoders, both the math and the CV numbers are different for mobile decoders.

First, the math to get the two parts:

H = A / 64
dropping any fractional part (do not round).

For example, if A = 82, then H = 82 / 64 = 1.28125, truncated to 1. So H = 1.

L = (A - (H * 64))

For example, with A = 82, L = (82 - (1 * 64)) = 18
Note that we’re using the integer form of H, after dropping the fraction.

Now, program L into CV1 (CV513 on older decoders) and H into CV9 (CV521 on older decoders) and the decoder should respond to address A when connected to the track.

This has to be done on the programming track, because as soon as either CV is changed, the decoder has some new address but not the correct new address until both are programmed. And Ops Mode (track) programming uses the address to send programming commands, while Direct Mode (programming track) programming does not.

Note: when multiple addresses are used by the decoder based on the programmed address, the highest can still not exceed 511. Also, some systems reserve 511 for a broadcast address, and addresses used by decoders should not exceed 510 when used with such command stations.


Extended Addressing


Just to confuse things, even longer addresses can be used. Exactly how this works is as clear as mud, but it apparently uses the “output addressing mode” enabled by bit 6 of CV29 to convert the basic 1-511 address into longer addresses. I’ve seen references that this allows 2048 or 4096 addresses, but there doesn’t seem to be a formal definition in the Standards or Recommended Practices of just how this is supposed to work.


Configuration Register


Like mobile decoders, CV29 is used for some common configuration bits. However, the meanings of these are different from those used in a mobile decoder. Most of the bits are still reserved, except for:

Bit 3 (value 8) is set to 1 to enable bi-directional communication (RailCom, or a proprietary method like Transponding).

Bit 5 (value 32) is off for addresses up to 511, and must be set to 1 to use extended addresses (up to 2048?).

Bit 6 (value 64) if set enables “Output addressing mode” (which I still haven’t figured out).

Bit 7 (value 128) appears to be used for compatibility on older command stations that assume CV513+ when dealing with decoders, and allows newer CV-based decoders to convert such CV references to CV1+. It seems unlikely that there’s any such station out there to begin with, so this probably isn’t needed, and could even cause problems.


Timer CVs


CVs 3 - 6 are timers for functions 1 - 4. If these CVs are non-zero, they reflect the time the function will remain active after being turned on, before it will automatically be turned off.