LightDecoder: a software for OpenDecoder 1 (general illumination)

    This firmware feature special features to do a illumination on a model railway layout. It is intended to lighten individual buildings or complete streets (including the flickering of fluorescent lights). A random generator provides different sequences every transition day-night. You can combine this with a realistic background light processing .

    Again, this software works as a simple accessory decoder, and only basic DCC packets are evaluated, neither the DCC reset packet or the broadcast packets are implemented. The setting of the operating modes, and the setting the address, is accomplished by simply by pressing the programming-button and sending a command. There are the following modes:
      ModeOperation
      0 Combined switching of all 8 outputs, very short time interval
      1 Combined switching of all 8 outputs, mean time interval
      2 Combined switching of all 8 outputs, long time interval
      3 Combined switching of all 8 outputs, very long time interval
      4 reserviert
      5 reserviert
      6 Each output can be turned on flashing.
      7 Each output can be turned individually.

The Programming

    The setting of the operating modes, and the address, is done by pressing the programming-button, and sending a DCC-command. The contents of the first DCC-packet received will determine the decoder's mode and address.
    1. Press the programming-button for at least 100ms, the LED will begin to glow and this indicates that the decoder is ready to receive a programming command.
    2. Send a DCC-packet, The decoder takes its base address from this command according to the following rule:

          Base Address = (broadcast address - 1) / 4. (the rest of the packet will be ignored)

      The decoder is programmed to the following addresses: Base Address * 4 + 1 to Base Address * 4 + 4

      The above "the rest", together with the "coil" (red or green) used to set the mode:
        Operation
        0 2 4 6
               
        Switch 1 Switch 2 Switch 3 Switch 4
               
        1 3 5 7
    Example: Send DCC-packet with an address of 18, which represents a base address of 4 -- the decoder will "listen" on addresses 17-20, and will run in Mode 2. .

The modes

    xxxxxxxxxxxxxxxxxxx copy xxxxxxxxxxxxxxxxxxxxxxx

    In the modes 0, 1, 2 or 3, all eight outputs are controlled by one DCC command and are switching combined. However, the processing speed of the animated sequence is totally different.
  • Mode 0
    All 8 outputs are controlled with one command.

      Mode 0: Combined switching, fast
      Address Action
      0 All outputs off
      1 All outputs turned on
      2 Each output is shut down after a randomly selected time.
      3 Each output is turned on after a randomly selected time.
      4 All outputs off
      5 Each output is turned on with a random delay and with a random flickering pattern. (fluorescent tube)
      6 reserved
      7 reserved
    For commands 2 and 3, the processing time for each output ranges from 10 msec to 2.5 sec.
    For command 5 (fluorescent tube), the initial delay ranges from 10ms to 80ms, then the lamp may flicker up to two times until it burns continuously. The flickering may take up to 400ms.
  • Mode 1
    This mode is identical to the above, only here the times are extended as follows:

    For the commands 2 and 3 the time range is between 250ms and 63s.
    It makes no sense to call command 5, the initial delay would be 250ms and 20s, the 'flickering' would last for 100s.
  • Modes 2 und 3
    This mode is identical to the above, only here the times are doubled:
    For commands 2 and 3 this results in a processing time from 500ms und 2min.
  • Mode 4
    reserved
  • Mode 5
    reserved
  • Mode 6, flashing light (individually controlled)
    In this mode, the eight outputs can be controlled individually. However, to access these outputs, more than the usual four addresses for a decoder are required, the decoder simply uses the next four addresses.
      Taste Wirkung
      1 Switching off the output 1
      2 Switching on output 1; this output starts flashing.
      3 Switching off the output 2
      4 Switching on output 2; this output starts flashing.
      5 Switching off the output 3
      6 Switching on output 3; this output starts flashing.
      7 Switching off the output 4
      8 Switching on output 4; this output starts flashing.
      9 Switching off the output 5
      10 Switching on output 5; this output starts flashing.
      11 Switching off the output 6
      12 Switching on output 6; this output starts flashing.
      13 Switching off the output 7
      14 Switching on output 7; this output starts flashing.
      15 Switching off the output 8
      16 Switching on output 8; this output starts flashing.
  • Mode 7, individually controlled outputs
    In this mode, the eight outputs can be controlled individually (permanent on). However, to access these outputs, more than the usual four addresses for a decoder are required, the decoder simply uses the next four addresses. (see mode 6)


  • If a jumper is fitted in modes xxx..xx, the last state will be stored to EEPROM.