Decoder Programming Lock

DCCWiki, a community DCC encyclopedia.
(Redirected from Decoder Lock)


Decoder Lock is an optional feature which allows you to lock the decoder so it cannot be programmed.

The concept was proposed to the NMRA DCC Working Group in 2003 by A J Ireland of Digitrax.

Purpose

DCC users may install more than one decoder in a single locomotive.

Common uses are: separate decoders for motor control and sound, and additional function only decoders.

Since these decoders may, and will need to have their CVs adjusted separately, a method to communicate with only one of multiple decoders installed in a locomotive shell, one at a time, was needed. One method was to give the decoders differing addresses, but that can be difficult in service mode programming.

You should be able to:

  • Do service mode read and write from a specific decoder, with no need to disconnect other decoders electrically.
  • Discover the type of decoder(s) present inside a locomotive without disassembly, and despite multiple decoders being present.
  • Work with existing DCC systems

How Does it Work?

The key to decoder locking are CVs 15 and 16.

CV15

CV 15 is the unlock number, set to a value from zero to seven. It is used to select the decoder that will respond to NMRA standard programming commands.

CV16

CV 16 carries the value that defines the decoder as suggested below. It is referred to as the locking number. It must have a unique ID, as it identifies a specific decoder in a multiple decoder installation.

As is, the decoder should have a value of 0 (zero) in CV16, as that is the as-shipped reset value, or 255, Broadcast ID, so all decoders can be programmed at the same time.


Recommended values:

1: Motor decoder

2: Sound decoder

3: Function only decoder

4-7: Other applications chosen by the user.


Lock Rule

  • If CV15 does not equal CV16, only CV15 may be written to.

It was proposed that some manufacturers may wish to include an extra read only bit in certain CVs to protect their contents. This would be manufacturer specific. The NMRA may include this feature by defining a CV bit for this purpose at a later time.

The reset command will be ignored unless the rules are met, to prevent an accidental reset of all the decoders in an install.

Decoder Configuration

A proposed method of configuring the decoders is as follows:

  • 1. Connect the decoder to the programming track before installation.
  • 2. Write a value of 8 to CV8 to reset the decoder and insure CV 15 and 16 are set to zero. Decoder reset varies by manufacturer, so read the documentation, as CV8 is the standard.
  • 3. If you wish, check the value of CV15 to ensure it is zero.
  • 4. Write the desired ID number to CV16.
  • 5. Write the ID number to CV15 to enable writing to the decoder.
  • 6. Configure the decoder's functions.
  • 7. Install the decoder.

Repeat as necessary. If you are only installing a single decoder in a locomotive, setting up CV15 and 16 is not required.

Accessing the Decoder

  • Write the ID number defined earlier to CV15
  • Write other CVs. This will work when CV15 equals CV16.

Identification of the Decoders Installed

To identify a decoder, write 0 to CV15. Then attempt to read a 0 in CV16. If no acknowledgement is received, no decoder with ID zero exists.

The second step is to change the ID in CV15, from 1 through 7, and then read CV16 until an acknowledgement is received from the decoder.

Lockable and Non-Lockable Decoders

An older non-locking decoder can be programmed in an install with a lockable decoder by simply locking the decoder, then writing the values to the older, non-lockable decoder.


See Also

Decoders

Additional Reading

See the proposal made to the NMRA here: Topic 0305051 - Decoder Lock Proposal