How to Program the Wikinger decoder "ON-TRACK"
The Wikinger decoder can be programmed on the track, without the need to remove the locomotive shell and operate dipswitches or potentiometers on the decoder.
The following parameters are programmable:
1. Decoderaddress, primary address.
2. Delay, start and stop time (reactiontime).
3. Speedcurve, value of each speedstep.
4. Light output functionality.
5. F4 functionality.
6. Decoderaddress, secondary address.
7. Enable/disable secondary address.
8. F3 functionality.
9. Enable/disable extra speedsteps.
Entering on-track programming mode :
The programming mode is initiated by selecting the appropriate decoder address and holding down the reverse button (REV) on the Central Unit (CU) for approx. 8 seconds.The decoder will flash the lights 10 times to signal that it has entered programming mode.
To leave programming mode, address 80 must be selected on the CU, and REV pressed. The decoder will signal that is has left programming mode by flashing the lights 10 times. Now the decoder is back in normal operating mode.
On Märklin CU's, it is necessary to do a reset before programming the decoder. This is because the CU maintains all selected locomotive addresses in a repetitive manner, and the time needed to transmit enough reverse commands to the address of interest will take much longer than 8 seconds. This is not a fault of either the CU or the decoder.
[Technical: The number of needed reverse command double packets equals 256. If a PC controls the CU through the Märklin interface, the number of reverse commands needed from the PC to the interface equals 16.]
Once the decoder is in programming mode, the user can select one of 9 different options. This is done by selecting address 1-9 on the CU, and pressing REV. This level in the programming mode is designated the main menu level. The decoder will flash the lights corresponding to the selected option, or the selected parameter.
Option 1: Selecting the decoders primary address :
The decoder can be programmed to any of the 80 addresses in the official Märklin format, and any of the 255 addresses in the Uhlenbrock/Modeltreno extended format. Default address is 78.
Select the wanted primary address on the CU and press REV.
Option 2: Selecting start/stop delay :
The delay can be selected in steps of approx. 0,5 second. Valid values are 1-79. A value of 79 corresponds to 38 seconds delay. A value of 80 can be entered, but will result in a 2 minute delay, which is not a practical value. Default delay is 01.
Select the address corresponding to the wanted delay on the CU, and press REV.
Option 3: Adjusting the speedcurve :
The value of each speedstep can be selected individually. This gives the user the possibility to tailor the speedcurve to any locomotive and/or motor.
Before programming the speedcurve, it is advised to experiment with the default values. Find out which speedstep is appropriate for minimum speed, for half of maximum speed and for maximum speed. Draw a coordinate system, with speedsteps 0 and 2-15 on the horizontal axis and the speedvalues 1-63 on the vertical axis. Plot the three points found experimentally into the coordinate system as speedsteps 2, 8 and 15, and connect these points with a smooth curve. The values for the remaining speedsteps can now be read from the curve.
Each speedvalue is programmed by selecting the address corresponding the wanted speedstep on the CU, and pressing REV. The decoder will flash the number of the speedstep. Then enter the wanted speedvalue as the address on the CU, and press REV. The decoder will flash once, and return to the programlevel where the speedstep is selected. To exit the speedcurve option, select address 80, and press REV. The program returns to the main menu level.
Although the available range of 1-63 might indicate that only 64 speedvalues are used internal to the decoder, this is not true. This limitation is dictated by the addressrange of the CU, which is 1-80. Thus it is not possible to specify a speedvalue of 81 or above. The entered speedvalue is multiplied by two before being stored in memory, thus utilizing 128 internal speedvalues.
The default values for the 14 speedsteps are as follows:
Speedstep |
02 |
03 |
04 |
05 |
06 |
07 |
08 |
Linear |
4 |
9 |
13 |
18 |
22 |
27 |
31 |
Default value |
10 |
11 |
13 |
15 |
17 |
20 |
23 |
Speedstep |
09 |
10 |
11 |
12 |
13 |
14 |
15 |
Linear |
36 |
40 |
45 |
49 |
54 |
58 |
63 |
Default value |
27 |
31 |
36 |
42 |
48 |
55 |
62 |
Option 4: Light output functionality :
The lightoutputs can behave in three different ways, one of which is selected by entering the number corresponding to the wanted mode. All modes are direction dependent.
Default mode is mode 1.
Mode 1: The lights are always turned on.
Mode 2: The lights are automatically turned of when the speed is zero.
Mode 3: The lightoutputs are controlled by the FUNC button on the CU.
Select the address corresponding to the wanted mode on the CU, and press REV.
Note that the operation of the FUNC button differs in the old and the new Märklin format. If the old format is used, and the lights are mode 1 or 2, the FUNC button controls the two outputs F1 and F2 on the decoder. In mode 3 the FUNC button controls the light outputs.
If the new format is used, the only way to gain access to the FUNC functionality is to choose mode 3 for the light output. Otherwise FUNC will not be decoded.
Option 5: F4 functionality :
Pressing F4 on the CU can have two different results, one of which is selected by entering the number corresponding to the wanted mode.
It may seem illogical to turn the delay off by turning F4 on. Unfortunately this is the only way to provide a turn on/off functionality, and at the same time utilize the delay function in the old format.
Default mode is mode 2.
Mode 1: F4 controls the F4 output.
Mode 2: F4 controls the delay. F4 on means delay turned off, F4 off means delay turned on.
Select the address corresponding to the wanted mode on the CU, and press REV.
Option 6: Selecting the decoders secondary address :
The decoder can be programmed to any of the 80 addresses in the official Märklin format, and any of the 255 addresses in the Uhlenbrock/Modeltreno extended format. Select the wanted secondary address on the CU and press REV.
Option 7: Enabling/disabling the secondary address.
Two different modes can be selected. Default mode is mode 1.
Mode 1: The secondary address is inactive.
Mode 2: The secondary address is active.
Select the address corresponding to the wanted mode on the CU, and press REV.
Option 8: F3 functionality.
The F3 function have four different modes, which is closely related to the speed dependent smokeunit feature and the shunting feature.
It may seem illogical to turn the smoke off by turning F3 on. Unfortunately this is the only way to provide a turn on/off functionality, and at the same time utilize the smoke function in the old format.
The speed dependent smokeoutput is non-linear, for ease of programming. The difference between low and high setting is a factor of two over the speedrange 2-13. The amount of smoke is the same for both settings at speed 0 and speed 14. The amount of smoke is directly proportional to speed. A version where the amount of smoke is inversely proportional to speed is under consideration.
Default mode is mode 1.
Mode 1: F3 controls the F3 output.Select the address corresponding to the wanted mode on the CU, and press REV.
Note that mode 4 cannot be used when using the old Märklin format. If mode 4 is chosen, and the old format is used, the normal speedtable is used.
Option 9: Enabling/disabling the extra speedsteps.
By using an "illegal" extension to the Märklin format, it is possible, in a simple way, to implement twice as many speedsteps as normal. Obviously Märklin CU's will not support this feature.
It is done by using the FUNC trit in the protocol as two binary bits instead as one binary trit. Märklins decoders doesn't mind this, as they only decode the first bit of this trit.
The extra speedsteps is not directly programmable, as they are automatically calculated from the normal 14 speedsteps by simple interpolation.
The extra speedsteps are numbered 2+ to 15+, resulting in 28 speedsteps. The only reason for providing the possibility of turning this feature on or off, is that Märklin might utilize the same trit for other purposes in the future.
Default mode is mode 1. Mode 1: Extra speedsteps are turned off. Mode 2: Extra speedsteps are turned on.
Select the address corresponding to the wanted mode on the CU, and press REV.
[Technical: Normally the FUNC trit have the values 00 or 11, corresponding to FUNC off and FUNC on. To select one of the extra speedsteps, the value 00 is altered to 01 and the value 11 is altered to 10. This will select the extra speedstep specified in the speed part of the package (trits 6 to 9).]
Option 80: Leaving programming mode.
Not a real option, simply the command to issue to end the on-track programming mode of the decoder. The decoder returns to normal operational mode. Select address 80 on the CU, and press REV.
Advanced programming.
It is possible to specify most of the parameters when programming the PIC on the decoder. All parameters reside in the EEPROM. So it is possible to change their value from a PIC programmer software.
The parameters are mapped as follows:
Standard speedtable 2000-201F hex. Even addresses are the normal speedstep values, uneven addresses are the extra speedsteps.
Decoder primary address 2021 hex.
Delay value 2022 hex.
Functionality of F3, F4, FUNC and lights 2023 hex. bit0=0: low smoke setting, bit0=1: high smoke setting bit1=0: smoke off, bit1=1: smoke on bit2=0: shunting off, bit2=1: shunting on bit3=0: lights always on, bit3=1: lights off when speed=0 bit4=0: light output is light, bit4=1: light output is FUNC bit5=0: F4 controls output, bit5=1: F4 controls delay on/off bit6=0: secondary address disabled, bit6=1: secondary address enabled bit7=0: extra speedsteps disabled, bit7=1: extra speedsteps enabled
Decoder secondary address 2024 hex.
Shunting speedtable 2030-203F hex.
2025-202F hex are unused.