Decoder Programming Lock
Summary: An optional feature that permits a decoder to be locked, preventing programming.
Configuration Variables 15 and 16.
Digital Command Control users may install more than one decoder in a single locomotive. These decoders share a single address. Any commands sent to that address will be acted on by all the decoders.
Common uses are for programming separate decoders for motor control and sound, and/or additional function only decoders. This process is also used with a RailCom transmitter installed in the vehicle. Decoder Lock can also be used to prevent accidental programming or reset of a decoder.
Since decoders sharing the same address will need to have their CVs adjusted separately, a method to communicate with only one of multiple decoders installed in a vehicle 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, despite multiple decoders being present.
- Work with existing Digital Command Control systems
How Does the Programming Lock Work?
The keys to decoder locking are CVs 15 and 16.
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 for CV 16:
- Motor decoder
- Sound decoder
- Function only decoder
- or Higher: Other applications as chosen by the user.
- If CV15 equals CV16, all configuration values can be written.
- If CV15 does not equal CV16, only CV15 may be written to.
- If CV15 ≠ CV16, the decoder is locked and no CVs (except CV15) can be changed or read.
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.
A proposed method of configuring the decoders is as follows:
- Connect the decoder to the programming track before installation.
- 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.
- If you wish, check the value of CV15 to ensure it is zero.
- Write the desired identification number to CV16, such as those suggested above. Be consistent!
- Write the identification number to CV15 to enable writing to the decoder. CV15 must match CV16.
- Configure the decoder's functions.
- 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 identification number defined earlier (in CV16) to CV15
- Write the other CVs. This will work when CV15 equals CV16.
- When programming is complete, set CV15 to 0 (zero) to lock the decoder.
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 CV16 equalling zero exists. The second step is to change the value in CV15, from 1 through 7, 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.