Download as Windows Vista Gadget
The CV29 calculator is available to download and install as a Windows Vista Gadget.

DCC CV29 Calculator

Within the setup of a DCC controlled locomotive, CV29 seems to cause an inordinate amount of trouble. I think half the blame must go on the makers of throttles which attempt to be "friendly" but fall a bit short and leave their users stuck without a clue what is going on. The other half has to be the lack of school time spent on binary maths :-)

So, what is CV29 ? After the address of the decoder, its probably the most important CV, and because its been like this for a while, we're stuck with it controlling multiple things. It's best thought of as eight on/off or yes/no settings. They can be selected in any combination, and most decoders only use five of the settings. The settings determine whether the decoder responds to 14 step or 28/128 step instructions, whether there is a short (two digit) or long (four digit) address, the type of speed curve, and reverses the direction which is "forwards". Many "my loco doesn't work" problems are traced back to incorrect values in CV29, for example: loco doesn't respond to 4 digit address (bit 5), erratic running or lights not working (often caused by bit 1).

The calculator below shows how it is constructed, and by ticking the boxes associated with the features required, it will calculate the decimal value required for CV29. Or you can put a value for CV29 (eg. readback from the chip) in the result box and click "BackCalc" and it will work out the options that value would select. It is initially set to "6" as this is the most common default setting for a chip straight from the manufacturer. As with any changing of CV's, it is recommended that you readback the initial value of CV29 before attempting to change things.

bit decimal value Tick if required feature controlled
0 1 Reverse Direction normal or reverse direction of loco movement. (handy if accidentally reversed wires between chip and motor)
1 2 28/128 speed steps 14 speed steps, mostly obselete, (off) or
28/128 speed steps (on).
Strongly recommend "on" unless sure that 14 steps are required.
2 4 DC operation Deny (off) or allow (on) operation on analogue DC current
(usually recommend to set "off" unless analogue is really required).
3 8 Railcom Railcom off/on (Lenz, Zimo, some ESU, and some very recent TCS decoders (undocumented TCS feature)).
Unless you know you use Railcom with this loco, leave switched off.
4 16 Complex speed curve simple "min, mid, max" (CV2, CV6, CV5) speed curve (off) or
complex (CV67 to CV94) speed curve (on)
5 32 Long Loco Address Short (sometimes called "two digit") addressing with CV1 (off) or
Long (four digit) addressing with CV17 & CV18 (on)
6 64

not usually used, consult decoder maker's manual for exceptions.

7 128 not usually used, consult decoder maker's manual for exceptions.
CV 29 value: Either tick the boxes above, and see CV29 in the box to the left, or enter the value readback from a decoder in the box, and press to see what options are selected.

 

 

Long Address (CV17/CV18 calculation and readback).

Firstly a quick explanation of "short" and "long" addresses.
All DCC decoders must support short addresses. Short addresses are stored in CV1, and can take values 1 to 127. Some command stations will accept short addresses all the way to 127, others declare that "100" is a "long" address. So, if you want your locos to run on all command stations, I recommend the short address is between 1 and 99.
Long addresses are an optional feature in the DCC specification, so there are a few cheap decoders which don't support long addresses. Long addresses are stored in CV's 17 and 18. In theory they can take values from 0001 to over 10,000; but in practise the limits vary between command station makers. Some accept 0001 to 9999, some 100 to 9999, some top-out at 9983 (a convinient number in binary), etc.. If you want your locos to be able to run on all command stations, I recommend restricting long addresses to between 128 and 9983

Most handsets have a mechanism to make the calculation of Long Address CV values more "friendly", but if you have to read or write the raw CV's for long address, they can be hard to interpret. This will calculate in either direction, either enter the loco address wanted and calculate CV17/18, or enter values read from CV17/18 and calculate the locomotive address. Remember to set CV29 for long addressing as well !

Long Locomotive Address CV17:
  CV18:

How its done: CV17 and CV18 are often mistakenly described as the first two and second two digits of the address - they are NOT ! The calculation isn't hard, but its got a twist! First convert the locomotive address to a 16 digit binary number. Then, change the left two digits to 11. Finally, split the number into two blocks of 8, converting each back to decimal. The left block goes in CV17, the right in CV18. Example: Loco 2537 -> binary 0000 1001 1110 1001 -> change left two digits 1100 1001 1110 1001 -> split this into two 8 digit numbers, the left is CV17 (1100 1001) = 201, and the right CV18 (1110 1001) = 233.

 

CV's 33-46 or Function Mapping

This is another area of confusion, and a number of decoder makers have their own extensions to the NMRA basic standard mapping which means much more complex options are possible (eg. Zimo, ESU), or additional features are overlayed (eg. CT). To be honest, this is where I'd give up trying to do things through a DCC command station, and get a computer interface and JMRI/DecoderPro. However, if stuck doing things the hard way....

Arnold Huebsch has written a rather decent calculator for these CV's, so rather than me re-write it, here is a link which opens his calculator in a new window. The vertical column are the CV values and handset function buttons, starting with "lights in forward direction/F0" at the top. The horizontal are the output wires on the decoder chip, right hand side being the first (lights) output (usually white wire).