Atlas 520099 manual Bit Decimal, Number Equivalent Values for, Calculation

Page 13

Decoder for Atlas N Scale H15/16-44 Locomotives

13

Converting Binary Values of Individual Bits within a Configuration Variable into the Equivalent Decimal Value of the Entire CV

Reasons for Setting and Clearing the Individual Bits of a Configuration Variable

To make a DCC decoder perform in the manner that you wish, you sometimes need to set or clear individual bits of a CV. To program a DCC decoder using a DCC system that allows only the writing of decimal values into CVs (such as the Atlas Master Commander), it is first necessary to convert the values of all the individual bits of that CV that are to be set to the binary value 1 into their equivalent decimal values. It is then necessary to add together all of these equivalent decimal values.

Procedure for Converting Individual CV Bit Values into a Decimal Equivalent Value for the CV

The following table illustrates how to calculate the decimal value that must be written into a CV to set and/or clear a specified set of individual bits within that CV.

Each bit of a CV that is to be set to the

Bit

Decimal

Decimal

binary value “1” can be represented by the

Number

Equivalent

Values for

equivalent decimal number shown in the

 

 

CV

second column of this table. To determine

 

 

Calculation

0

1

 

the equivalent decimal value to be written

 

into the CV, first write in column 3 of this

1

2

 

table the decimal equivalent values of all

2

4

 

the bits of the CV that are to be set to a

3

8

 

binary 1. Write nothing in column 3 for

 

 

 

4

16

 

each bit of the CV that is to be cleared,

 

5

32

 

i.e., set to a binary 0. Then add up all the

 

6

64

 

numbers that you have written in column

 

3. The sum that you get is the equivalent

7

128

 

decimal value you need to write into the

 

 

 

CV.

 

 

 

 

 

SUM:

 

Atlas Model Railroad Co., Inc.

Image 13
Contents DCC Decoder for Atlas N Scale H15/16-44 Locomotives Scale H15/16-44 DCC Decoder Lighting Options for the H15/16-44 Decoder Silent Drive or Precision Glide Control Preparing to Install the H15/16-44 DecoderStep by Step Installation Programming the H15/16-44 Decoder Start voltage Reg Description Range Default Value Short addressAcceleration Momentum Brake MomentumLong Address, High Byte Decoder Configuration, ByteLong Address, Low Byte Advanced Consist AddressHeadlight mode Description Range Default ValueUsage on conventional DC layouts Speed curveLighting Effects for Output a front headlight Brake momentum on DC operationDirectional or Independent Headlights Front Headlight Dimming ControlRear marker lights Dimming for Output a front headlightLighting Effects for Output B rear headlight Rear Headlight Dimming ControlFactory Dimming for Output B rear headlightSpeed StepNumber Equivalent Values for Bit DecimalCalculation Example Calculating the Default Value for CV29 Creating a Customized Speed Curve 100 110 120 130 140 152 164 174 186 200 216 234 254 Troubleshooting Decoder Programming Problems For Technical Assistance Dcc@atlasrr.com Atlas Limited One-Year DCC Decoder Warranty