Basic Decoder Programming

There are several very basic CVs (configuration variables) that you need to be aware of with DCC decoders. These include the short or primary address, the long or extended address, start voltage, acceleration and deceleration momentum, and CV29 also known as the master CV. All of these are simple enough to program that they can easily be changed with a handheld throttle. Let’s take a quick look at each.

The primary address is stored in CV1 and can be any value in the range 1-127. All new decoders are programmed to a value of “3” at the factory so you don’t have to try and figure out what a new decoder is set to. The extended address can be any value from 1-9999, although in some decoders this range may be limited a little. The great thing about having up to four digits is you can program your decoders to match the road number on your locomotive. This address is stored in CVs 17 & 18 but all the systems I am familiar with will store the address for you so you really don’t have to worry with two CVs.

The starting voltage is entered in CV2 and controls the initial voltage applied to the motor. This setting can be very useful when initially setting up your new decoder to get the best slow speed performance from your locomotive. I like to gradually increase the value in CV2 until the locomotive just begins to move when I open up the throttle to the first speed step. Values can be in the range of 0-255.

CVs 3 & 4 control the acceleration and deceleration rates, respectively, and also are sometimes referred to as momentum. The range of values begins at 0 with the top value being different among decoder brands. For example Digitrax decoders use 0-31 while Soundtraxx uses 0-255. Increasing these values increases the amount of time it takes for the locomotive to change speed, therefore mimicking prototype locomotives pulling a heavy train.

Finally let’s talk about CV29. This CV controls 4 things: (1) whether the 2 or 4 digit address is used, (2) the normal direction of travel of the locomotive relative to what the decoder thinks is forward or reverse, (3) whether 14 or 28/128 speed steps and a custom speed table are used, and (4) whether analog conversion is on or off. The first choice of 2 vs 4 digit addresses is up to you. The normal direction of travel ensures that the locomotive goes in the correct direction relative to what you set on your throttle. It also decides what the headlight and reverse light do. If your headlight and motor never synchronize in the same direction that means the motor is wired backwards. This can happen if you just got the wires reversed when doing the installation. You can also use this CV setting to correct direction of travel if for example your prototype runs its locomotives long hood forward.

Most folks will want to use the 28/128 speed step setting although a few may use custom speed tables–I’ll have a separate post on custom speed tables. Analog conversion controls whether your decoder responds to DC voltage from a power pack. It isn’t a good idea to leave this set to on since a short or power surge on the tracks may confuse your decoder into thinking the 14 volts on the track is DC and the locomotive going into runaway mode. Simply turning analog conversion off will prevent this from happening.

All these different possible options makes it a complex issue to calculate the value to enter in CV29 so most decoder manuals have a table showing them. For example in the 2015 Digitrax decoder manual the table is on page 38 and Soundtraxx has a similar table in each of their decoder user manuals. Hopefully this will get you going on these most commonly used CVs. I’ll be adding more posts over the next couple weeks on programming other CVs and features in decoders so stay tuned.


  • The topic of engine numbers makes me want to ask what best practice should be. I have a Santa Fe PA #51 (I have more of them but the same question applies to all). What should the best choice for engine number be? 51, 051 or 0051? Or 510 or 5100?

    • I would use the number exactly as it appears on the locomotive. That way there is less confusion plus you never forget what address you programmed the decoders.

  • Matt, from Soundtraxx informed me the other day, that when you enter an address of 3 (the factory default) that you should never use “03” Instead, you should only enter “3”, with the “0” being omitted. Larry, could you elaborate a little? Thanks

    • I remember this kind of thing coming up 20 pr so years ago occasionally but it been so long since I have seen anyone ask about it my memory is a bit fuzzy on that one. However I think that it goes back to the old short vs long address distinction and if you add the “0” it shifts it to a long address but I’d have it test it to make sure.

      • Yeah, It’s coming back to me now, Matt did say something about putting the zero in front of a whole single number had something to do with a long address.

  • Good Post Larry. One thing that I had forgotten was the range for 2 digit addresses. The other day I was programming a locomotive with a road number of 105 and for some reason I thought this had to be a 4 digit address because it was over 99 so I was having a problem getting the loco to respond. I finally realized it was still a 2 digit address. The short address covers all addresses from 1-127.


  • Andrew Thompson

    Thanks Larry, another interesting post. Whilst taliking about cv’s, perhaps you can help me with a problem I am having with a new install,(see youtube link below) the loco ran very well when I originally replace the Bachmann decoder with a generic basic 4 function decoder hard-wired in, but now I have moved to a Soundtraxx Econami I am having trouble with low speed operation…hoping you can guide me through some changes I might be able to make on cv settings.

    • Andrew–do a search here for my post on slow speed compensation with the Econami and see if that helps–Larry