Decoder Configuration Details

The multfunction decoder examples all for 4 functions to be assigned to any of the 17 available pins: on/off control, single line blinking with variable rate, servo control with start position/stop position/transit rate CV setting and end to end control via the function (on/off), and paired line blinking with variable rate.

When first loaded the decoder is set to short DCC address 24 (or 17 in Decoder_17LED_1Function).  The decoder can be reset to the original parameters by loading CV 120 with 120 (decimal). This will reset everything including the decoder address, when the pushbutton on the Pro Mini is pushed (reset) or by powering the decoder off then on. You will know when the default CV setting are being reset as the decoder will flash Digital Pin 14 (A0) for one second.
The decoder address can be changed to another short DCC address by changing CV 1.

The 7 Servo 10 LED decoder configuration

Arduino Pro Mini Pins are set as follows: 3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
Pro Mini Pin	       Function
3			F0 Servo
4			F1 Servo
5			F2 Servo
6			F3 Servo
7			F4 Servo
8			F5 Servo
9			F6 Servo
10			F7 Single LED Blink
11			F8 Single LED Blink
12			F9 Single LED On/Off
13			F10 Single LED On/Off
14			F11 Single LED Blink
15			F12 Single LED Blink
16			F13 Double LED Blink F13 and F14 LEDs (Pins 16 & 17)
17			F14 Single LED Blink (Ignored because of F13)
18			F15 Double LED Blink F15 and F16 LEDs (Pins 18 & 19)
19			F16 Single LED Blink (Ignored because of F15)
(Blink rates are set differently for demonstration purposes)

Correspondingly by way of example, for the 7 Servo 10 LED decoder configuration, CV’s are initially set to the following:

{CV number, Value}    Description
  {1, 24}  Decoder Initial Address
  {30, 2}, //F0 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {31, 1},    //F0 Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {32, 28},   //F0  Start Position F0=0
  {33, 140},  //F0  End Position   F0=1
  {34, 28},   //F0  Current Position
  {35, 2},  //F1 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {36, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {37, 28},   //  Start Position Fx=0
  {38, 140},  //  End Position   Fx=1
  {39, 28},  //  Current Position
  {40, 2},  //F2 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {41, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {42, 28},   //  Start Position Fx=0
  {43, 140},  //  End Position   Fx=1
  {44, 28},    //  Current Position
  {45, 2}, //F3 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {46, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {47, 28},   //  Start Position Fx=0
  {48, 140},  //  End Position   Fx=1
  {49, 28},    //  Current Position
  {50, 2}, //F4 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {51, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {52, 28},    //  Start Position Fx=0
  {53, 140},    //  End Position   Fx=1
  {54, 28},    //  Current Position
  {55, 2}, //F5 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {56, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {57, 28},    //  Start Position Fx=0
  {58, 140},    //  End Position   Fx=1
  {59, 28},    //  Current Position
  {60, 2}, //F6 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {61, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {62, 28},    //  Start Position Fx=0
  {63, 140},    //  End Position   Fx=1
  {64, 28},    //  Current Position
  {65, 1}, //F7 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {66, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {67, 1},   //  Start Position Fx=0
  {68,35},  //  End Position   Fx=1
  {69, 1},    //  Current Position
  {70, 1}, //F8 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {71, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {72, 1},   //  Start Position Fx=0
  {73, 100},  //  End Position   Fx=1
  {74, 1},    //  Current Position
  {75, 0}, //F9 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {76, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {77, 1},   //  Start Position Fx=0
  {78, 10},  //  End Position   Fx=1
  {79, 1},    //  Current Position
  {80, 0}, //F10 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {81, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {82, 1},   //  Start Position Fx=0
  {83, 5},  //  End Position   Fx=1
  {84, 1},    //  Current Position
  {85, 1}, //F11 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {86, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {87, 1},   //  Start Position Fx=0
  {88, 5},  //  End Position   Fx=1
  {89, 1},    //  Current Position
  {90, 1}, //F12 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {91, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {92, 1},   //  Start Position Fx=0
  {93, 20},  //  End Position   Fx=1
  {94, 1},    //  Current Position
  {95, 3}, //F13 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {96, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {97, 1},   //  Start Position Fx=0
  {98, 35},  //  End Position   Fx=1
  {99, 2},    //  Current Position
  {100, 0}, //F14 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {101, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {102, 1},   //  Start Position Fx=0
  {103, 4},  //  End Position   Fx=1
  {104, 1},    //  Current Position
  {105, 3}, //F15 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {106, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {107, 1},   //  Start Position Fx=0
  {108, 60},  //  End Position   Fx=1
  {109, 20},    //  Current Position
  {110, 0}, //F16 Config  0=On/Off,1=Blink,2=Servo,3=Double LED Blink
  {111, 1},    // Rate  Blink=Eate,PWM=Rate,Servo=Rate
  {112, 1},   //  Start Position Fx=0
  {113, 4},  //  End Position   Fx=1
  {114, 1},    //  Current Position
  {120, 0}   Master Reset CV When set to 120 and Power cycled resets all CV’s

Each Function is controlled by a maximum of 5 CV’s. 
For example F0 is initially set for servo control:
  {30, 2},     // F0  Pin Function Configuration  2=Servo
  {31, 1},     // F0  Rate  Blink=Rate, Servo=Rate
  {32, 28},   // F0  Start Position  F0=0  Initially 26
  {33, 140},  // F0  End Position   F0=1  Initially 140
  {34, 28},    // F0  Current Position or State

F7 is initially set for single LED blinking control:
  {65, 1},    // F7 Pin Function Configuration  1=Blink
  {66, 1},    // Rate  Blink  1= Slowest
  {67, 1},    //  Start Count Set to 1 or 0
  {68,35},   //  End Count 2-255 -- 255 = Slow Blink
  {69, 1},    //  Current State of LED

F13 is initially set for double LED blinking control of F13 and F14 LED Pins:
  {95, 3},    // F13 Pin Function Configuration  3=Double LED Blink
  {96, 1},    // Rate  Blink  1= Slowest
  {97, 1},    //  Start Count Set to 1 or 0
  {98, 35},  //  End Count 2-255 -- 255 = Slow Blink
  {99, 2},    //  Current State of LED

F9 is initially set for single LED On/Off control:
  {75, 0},    //  F9 Pin Function Configuration  0=On/Off
  {76, 1},    //  Ignored
  {77, 1},    //  Ignored
  {78, 10},  //  Ignored
  {79, 1},    //  Ignored

Before changing the CV settings take a look at the initial settings and make small changes first to observe the effects. This should give modelers a starting point, and a better understanding for customizing their decoders.

Please also note there is a new 17 LED (On/Off) decoder configuration (Decoder_17LED_4Function), which while providing the 17 LED on/off control like the very first decoder (Decoder_17LED_1Function) introduced in this project, whichh ONLY has on/off control. However, this new version can be reconfigured via CV control to perform the other functions too.