The NMRA has specified a Recommended Practice that defines how to program decoders (NMRA RP-9.2.3). While this recommended practice provides the precise packet formats a command station must transmit to program decoders, it does not specify the user interface provided to the model railroad operator who is using the system. This is left up to each manufacturer to provide.
To program a value into the decoder each system asks the user a value. The problem is there are several methods to represent this value, (Decimal, Hex, Binary and English explanation) and not all systems support all forms. Thus the user must often translate the numbering scheme provided by the decoder manufacturer to the numbering scheme requested by the Command Station/Programmer. The purpose of this page is to assist users in this conversion process.
![]()
TTTrains' Home Page |
Modeler's
Corner | Large Scale |
Links |
World
of DCC | TTTrains Train Shops |
Lenz O Scale
In most cases no. For the most part you can use the native instructions provided by the command station manufacturer to program any decoder (for exceptions to this rule see the DCC problems page). This is because for the most part the NMRA has defined and the Manufacturers have agreed to use common CVs (Configuration Variables) with common values. However, there are differences in preferred values and there are several manufacturer unique CVs. In this case an understanding on how to convert between the various styles makes programming much easier.
Return to Index | Return to The World of DCC
Lets first start with the popular forms of representing values
Decimal number has 10 numbers (0-9). This is perhaps the easiest form as we all know how to count using Decimal. Systems such as Lenz and the System One family commonly use Decimal for all values.
Hex is a computer form of counting which has 16 numbers (0-9 and A-F). Using Hex can be useful to the command station developer as 256 values can be expressed in just 2 positions (FF Hex = 255 Decimal). Digitrax uses hex for many values.
Binary uses just 2 numbers 1, and 0. This form may be the easiest from a DCC standpoint as DCC is a binary format. A DCC word has 8 binary bits or 255 different values in a data word. (11111111 = 255 Decimal). The NMRA RPs are written using the binary representation. Now just to confuse you a little more there are two common methods for numbering the bits in binary. Consider the Decimal number 3 which is represented by 00000011 in binary. Lenz counts the bits from 1 to 8.
| bit 8 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 |
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
The NMRA (which developed its numbering scheme after the Lenz system was on the market) counts the bits using the more common computer notation from 0 to 7
| bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
Notice that the NMRA numbering starts with 0 while the Lenz numbering starts with a 1. Translation is easy. Just add one to the NMRA bit positions to achieve the Lenz notation or subtract one from the Lenz bit numbers to achieve the NMRA notation.
Some systems use buttons, sliders, knobs, or menus to enter values. The positions of these buttons, sliders, or knobs are converted by the command station into the proper binary representation. To program other decoders on these systems it is best to understand what these various buttons, sliders, or Knobs actually do. Most entry systems (such as the Digitrax Challenger, and MRC Command 2000) use this form of programming. The System One family as well as most computer based programmers use menus to help guide the user in selecting the appropriate value.
Return to Index | Return to The World of DCC
CV29 (The Basic Decoder Configuration), is used to set up the decoder's basic properties. This may be the hardest CV to understand as each bit means something completely different and many manufacturers try using words while others prefer HEX or Decimal or Binary.
The following table provides an explanation of this most basic decoder configuration CV as well as provides the translations into the various numbering schemes.
| Function | English Description | NMRA Bit meaning | Lenz Bit meaning | Decimal | Hex | Binary |
| Locomotive Direction | Normal Direction | NMRA Bit-0=0 | Lenz Bit-1=0 | 0 | 00 | 00000000 |
| Reverse Direction | NMRA Bit-0=1 | Lenz Bit-1=1 | 1 | 01 | 00000001 | |
| Headlight Location | 14 Speed Step mode | NMRA Bit-1=0 | Lenz Bit-2=0 | 0 | 00 | 00000000 |
| 28 Speed Step Mode | NMRA Bit-1=1 | Lenz Bit-2=1 | 2 | 02 | 00000010 | |
| Power Source Conversion | NMRA Digital Mode Only | NMRA Bit-2=0 | Lenz Bit-3=0 | 0 | 00 | 00000000 |
| Analog Conversion Enabled | NMRA Bit-2=1 | Lenz Bit-3=1 | 4 | 04 | 00000100 | |
| Speed Table | Use Decoder Defined Speed Curve | NMRA Bit-4=0 | Lenz Bit-5=0 | 0 | 00 | 00000000 |
| Use User Defined Speed Table | NMRA Bit-4=1 | Lenz Bit-5=1 | 16 | 10 | 00010000 | |
| Extended Addressing | 127 address mode | NMRA Bit-5=0 | Lenz Bit-6=0 | 0 | 00 | 00000000 |
| 10,000 address mode | NMRA Bit-5=1 | Lenz Bit-6=1 | 32 | 20 | 00100000 |
To achieve multiple effects just add the various properties desired. For example if you want the decoder to allow for analog conversion and operate in 28 speed step mode you provide the Decimal 6 (4+2). I suggest adding the decimal values and then looking up the appropriate value in the conversion table below as adding binary or Hex can be somewhat more complicated.
Return to Index | Return to The World of DCC
Following is a table that converts the 256 DCC numbers between Decimal, Hex and Binary. This table is useful in converting between the different manufacturers preferred different programming methods.
| Decimal | Hex | Binary |
| 0 | 00 | 00000000 |
| 1 | 01 | 00000001 |
| 2 | 02 | 00000010 |
| 3 | 03 | 00000011 |
| 4 | 04 | 00000100 |
| 5 | 05 | 00000101 |
| 6 | 06 | 00000110 |
| 7 | 07 | 00000111 |
| 8 | 08 | 00001000 |
| 9 | 09 | 00001001 |
| 10 | 0A | 00001010 |
| 11 | 0B | 00001011 |
| 12 | 0C | 00001100 |
| 13 | 0D | 00000101 |
| 14 | 0E | 00001110 |
| 15 | 0F | 00001111 |
| 16 | 10 | 00010000 |
| 17 | 11 | 00010001 |
| 18 | 12 | 00010010 |
| 19 | 13 | 00010011 |
| 20 | 14 | 00010100 |
| 21 | 15 | 00010101 |
| 22 | 16 | 00010110 |
| 23 | 17 | 00010111 |
| 24 | 18 | 00011000 |
| 25 | 19 | 00011001 |
| 26 | 1A | 00011010 |
| 27 | 1B | 00011011 |
| 28 | 1C | 00011100 |
| 29 | 1D | 00010101 |
| 30 | 1E | 00011110 |
| 31 | 1F | 00011111 |
| 32 | 20 | 00100000 |
| 33 | 21 | 00100001 |
| 34 | 22 | 00100010 |
| 35 | 23 | 00100011 |
| 36 | 24 | 00100100 |
| 37 | 25 | 00100101 |
| 38 | 26 | 00100110 |
| 39 | 27 | 00100111 |
| 40 | 28 | 00101000 |
| 41 | 29 | 00101001 |
| 42 | 2A | 00101010 |
| 43 | 2B | 00101011 |
| 44 | 2C | 00101100 |
| 45 | 2D | 00100101 |
| 46 | 2E | 00101110 |
| 47 | 2F | 00101111 |
| 48 | 30 | 00110000 |
| 49 | 31 | 00110001 |
| 50 | 32 | 00110010 |
| 51 | 33 | 00110011 |
| 52 | 34 | 00110100 |
| 53 | 35 | 00110101 |
| 54 | 36 | 00110110 |
| 55 | 37 | 00110111 |
| 56 | 38 | 00111000 |
| 57 | 39 | 00111001 |
| 58 | 3A | 00111010 |
| 59 | 3B | 00111011 |
| 60 | 3C | 00111100 |
| 61 | 3D | 00110101 |
| 62 | 3E | 00111110 |
| 63 | 3F | 00111111 |
| 64 | 40 | 01000000 |
| 65 | 41 | 01000001 |
| 66 | 42 | 01000010 |
| 67 | 43 | 01000011 |
| 68 | 44 | 01000100 |
| 69 | 45 | 01000101 |
| 70 | 46 | 01000110 |
| 71 | 47 | 01000111 |
| 72 | 48 | 01001000 |
| 73 | 49 | 01001001 |
| 74 | 4A | 01001010 |
| 75 | 4B | 01001011 |
| 76 | 4C | 01001100 |
| 77 | 4D | 01000101 |
| 78 | 4E | 01001110 |
| 79 | 4F | 01001111 |
| 80 | 50 | 01010000 |
| 81 | 51 | 01010001 |
| 82 | 52 | 01010010 |
| 83 | 53 | 01010011 |
| 84 | 54 | 01010100 |
| 85 | 55 | 01010101 |
| 86 | 56 | 01010110 |
| 87 | 57 | 01010111 |
| 88 | 58 | 01011000 |
| 89 | 59 | 01011001 |
| 90 | 5A | 01011010 |
| 91 | 5B | 01011011 |
| 92 | 5C | 01011100 |
| 93 | 5D | 01010101 |
| 94 | 5E | 01011110 |
| 95 | 5F | 01011111 |
| 96 | 60 | 01100000 |
| 97 | 61 | 01100001 |
| 98 | 62 | 01100010 |
| 99 | 63 | 01100011 |
| 100 | 64 | 01100100 |
| 101 | 65 | 01100101 |
| 102 | 66 | 01100110 |
| 103 | 67 | 01100111 |
| 104 | 68 | 01101000 |
| 105 | 69 | 01101001 |
| 106 | 6A | 01101010 |
| 107 | 6B | 01101011 |
| 108 | 6C | 01101100 |
| 109 | 6D | 01100101 |
| 110 | 6E | 01101110 |
| 111 | 6F | 01101111 |
| 112 | 70 | 01110000 |
| 113 | 71 | 01110001 |
| 114 | 72 | 01110010 |
| 115 | 73 | 01110011 |
| 116 | 74 | 01110100 |
| 117 | 75 | 01110101 |
| 118 | 76 | 01110110 |
| 119 | 77 | 01110111 |
| 120 | 78 | 01111000 |
| 121 | 79 | 01111001 |
| 122 | 7A | 01111010 |
| 123 | 7B | 01111011 |
| 124 | 7C | 01111100 |
| 125 | 7D | 01110101 |
| 126 | 7E | 01111110 |
| 127 | 7F | 01111111 |
| 128 | 80 | 10000000 |
| 129 | 81 | 10000001 |
| 130 | 82 | 10000010 |
| 131 | 83 | 10000011 |
| 132 | 84 | 10000100 |
| 133 | 85 | 10000101 |
| 134 | 86 | 10000110 |
| 135 | 87 | 10000111 |
| 136 | 88 | 10001000 |
| 137 | 89 | 10001001 |
| 138 | 8A | 10001010 |
| 139 | 8B | 10001011 |
| 140 | 8C | 10001100 |
| 141 | 8D | 10000101 |
| 142 | 8E | 10001110 |
| 143 | 8F | 10001111 |
| 144 | 90 | 10010000 |
| 145 | 91 | 10010001 |
| 146 | 92 | 10010010 |
| 147 | 93 | 10010011 |
| 148 | 94 | 10010100 |
| 149 | 95 | 10010101 |
| 150 | 96 | 10010110 |
| 151 | 97 | 10010111 |
| 152 | 98 | 10011000 |
| 153 | 99 | 10011001 |
| 154 | 9A | 10011010 |
| 155 | 9B | 10011011 |
| 156 | 9C | 10011100 |
| 157 | 9D | 10010101 |
| 158 | 9E | 10011110 |
| 159 | 9F | 10011111 |
| 160 | A0 | 10100000 |
| 161 | A1 | 10100001 |
| 162 | A2 | 10100010 |
| 163 | A3 | 10100011 |
| 164 | A4 | 10100100 |
| 165 | A5 | 10100101 |
| 166 | A6 | 10100110 |
| 167 | A7 | 10100111 |
| 168 | A8 | 10101000 |
| 169 | A9 | 10101001 |
| 170 | AA | 10101010 |
| 171 | AB | 10101011 |
| 172 | AC | 10101100 |
| 173 | AD | 10100101 |
| 174 | AE | 10101110 |
| 175 | AF | 10101111 |
| 176 | B0 | 10110000 |
| 177 | B1 | 10110001 |
| 178 | B2 | 10110010 |
| 179 | B3 | 10110011 |
| 180 | B4 | 10110100 |
| 181 | B5 | 10110101 |
| 182 | B6 | 10110110 |
| 183 | B7 | 10110111 |
| 184 | B8 | 10111000 |
| 185 | B9 | 10111001 |
| 186 | BA | 10111010 |
| 187 | BB | 10111011 |
| 188 | BC | 10111100 |
| 189 | BD | 10110101 |
| 190 | BE | 10111110 |
| 191 | BF | 10111111 |
| 192 | C0 | 11000000 |
| 193 | C1 | 11000001 |
| 194 | C2 | 11000010 |
| 195 | C3 | 11000011 |
| 196 | C4 | 11000100 |
| 197 | C5 | 11000101 |
| 198 | C6 | 11000110 |
| 199 | C7 | 11000111 |
| 200 | C8 | 11001000 |
| 201 | C9 | 11001001 |
| 202 | CA | 11001010 |
| 203 | CB | 11001011 |
| 204 | CC | 11001100 |
| 205 | CD | 11000101 |
| 206 | CE | 11001110 |
| 207 | CF | 11001111 |
| 208 | D0 | 11010000 |
| 209 | D1 | 11010001 |
| 210 | D2 | 11010010 |
| 211 | D3 | 11010011 |
| 212 | D4 | 11010100 |
| 213 | D5 | 11010101 |
| 214 | D6 | 11010110 |
| 215 | D7 | 11010111 |
| 216 | D8 | 11011000 |
| 217 | D9 | 11011001 |
| 218 | DA | 11011010 |
| 219 | DB | 11011011 |
| 220 | DC | 11011100 |
| 221 | DD | 11010101 |
| 222 | DE | 11011110 |
| 223 | DF | 11011111 |
| 224 | E0 | 11100000 |
| 225 | E1 | 11100001 |
| 226 | E2 | 11100010 |
| 227 | E3 | 11100011 |
| 228 | E4 | 11100100 |
| 229 | E5 | 11100101 |
| 230 | E6 | 11100110 |
| 231 | E7 | 11100111 |
| 232 | E8 | 11101000 |
| 233 | E9 | 11101001 |
| 234 | EA | 11101010 |
| 235 | EB | 11101011 |
| 236 | EC | 11101100 |
| 237 | ED | 11100101 |
| 238 | EE | 11101110 |
| 239 | EF | 11101111 |
| 240 | F0 | 11110000 |
| 241 | F1 | 11110001 |
| 242 | F2 | 11110010 |
| 243 | F3 | 11110011 |
| 244 | F4 | 11110100 |
| 245 | F5 | 11110101 |
| 246 | F6 | 11110110 |
| 247 | F7 | 11110111 |
| 248 | F8 | 11111000 |
| 249 | F9 | 11111001 |
| 250 | FA | 11111010 |
| 251 | FB | 11111011 |
| 252 | FC | 11111100 |
| 253 | FD | 11110101 |
| 254 | FE | 11111110 |
| 255 | FF | 11111111 |
Return to Index | Return to The World of DCC
Copyright 1997-2007 by Tried & True Trains,
Inc.
This page is written and maintained by: Stan Ames
For more information contact Debbie Ames,
President tttrains