Tips2012-04-14 00:00:00
Hexadecimal Programming
While programs such as JMRI have abstracted many programming details away, thereare several places where it may be useful to look at the CVs directly and in
hex. Trying to use "normal numbers" or base-10 to program CVs may make things
harder than they have to be.
Some CVs such as CV29 can be thought of as a series of 8 on/off switches.
Programming these CVs in hex can be much easier than using decimal. If you want
to turn off bit 3, using decimal you have to subtract 8 or using hex all you
have to do is set the bit to zero and look up the new value.
8-bit hexadecimal can be thought of as two groups for 4 bits. The low nibble
contains the first 4 bits (0-3) and the high nibble contains the next 4 bits
(4-7). The two groups are side-by-side to complete the byte. 0100 0110 is
0x46.
Memorize this table:
Nibble Hex
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F
The low bit (0 & 4) is the rightmost bit.
To change a bit, leave the others alone and change the appropriate value. Look
up the new result in the table.
To use Hexadecimal mode with the DT40x-series throttle during programming, set
the left-hand value to something other than an address and press the right knob
once. (It does not appear address programming can be done in hex.)