DCC
CV - Configuration Variables
 

Every DCC decoder can be programmed to respond to a specific direction. Loco decoders also can be programmed to use 14, 28 or 128 speed steps, acceleration delay, braking delay, etc. Accesory decoders can change the time of output activation. The features are stored in special locations of internal decoder memory. These locations are called Configuration Variables or simply CV.

CV programming is done from Command Station in diferent modes of programming (direct, register, paged, PoM) not all decoders accept all programming modes so you have to check it in the decoder manual.

The main accepted CV for most loco and function decoders are:

CV1 Decoder address (1 .. 127)
CV2 Starting Voltage
CV3 Acceleration delay
CV4 Deceleration delay
CV5 Maximum speed
CV7 Decoder Version (only read)
CV8 Manufacturer ID (only read)
CV17-CV18 Extended address (1 .. 16383). Have to be programmed in a special way: 
Address
CV17
CV18
CV19 Multi unit (consist) address
CV29 Decoder Configuration 
This is calculated from its bits 
Bit 0 -> 0: Direction normal, 1: Direction inverted 
Bit 1 -> 0: 14 speed steps, 1: 28 / 128 speed steps 
Bit 2 -> 0: Only DCC, 1: DCC and DC 
Bit 3 -> 0: RailCom off, 1: RailCom on 
Bit 4 -> 0: Factory preset speed curve, 1: User speed curve 
Bit 5 -> 0: Address in CV1, 1: Address in CV17-CV18 
CV29 7 6 5 4 3 2 1 0
 
 

For Accesory decoders the main CV used are:
 
CV513 Decoder Address (low byte) 
Address is between 1 .. 512 and controls four outputs (2048 in total) 
Address
CV513
CV521
Outputs
CV514 Auxiliary Activation (a 1 in a bit actives corresponding output)
CV515-CV518 Output activation time
CV519 Decoder Version (only read)
CV520 Manufactured ID (only read)
CV521 Decoder address (high byte)