Command set
From wiki-en
Contents
Code for DC-Car-Mode
To be able to control a DC-Car with a PC you need a PC-Transmitter and this code.
WDP_DC-Car_Steuerung2.pdf
Requirement vehicle setting
The value 24 is set in the CV21 of the DC-Car decoder.
(The default value is 4 for DC-Car Boosters.)
Requirement Interface speed
Serial port setting 9600 bps, 8 bit, ODD parity, 2 stop bits
Instruction set
3 bytes are always sent as a block:
first Byte = Lower address | 00AAAAAA | Address 0-63 |
second Byte = High Address and Switch Group 1 | 0100AAAA | Address 64-1023 |
second Byte = High Address and Switch Group 2 | 0110AAAA | Address 64-1023 |
third Byte = Command light with the bit sequence | 10CCCCCC | Output 1-5 |
third Byte = Command Motor with the bit sequence | 11MM1MMM | Speed step 0-28 |
With byte 1 and 2 you can address up to 1023 cars.
In addition, the function group is switched over with it.
Function output 3. Byte
Bits | Function group 1 | Function group 2 |
10CCCCC1 | Indicator left | Headlight |
10CCCC1C | Indicator right | Light 2 |
10CCCC11 | Hazard lights | |
10CCC1CC | Distance control | Light 3 |
10CC1CCC | Reed switch | Light 4 |
10C1CCCC | Beacon | |
101CCCCC | Front flasher |
Speed steps 3. Byte
Byte | Speed step | Byte | Speed step | |
11001000 | Speed step 0 | 11101000 | Speed step 16 | |
11001001 | Speed step 1 | 11101001 | Speed step 17 | |
11001010 | Speed step 2 | 11101010 | Speed step 18 | |
11001011 | Speed step 3 | 11101011 | Speed step 19 | |
11001100 | Speed step 4 | 11101100 | Speed step 20 | |
11001101 | Speed step 5 | 11101101 | Speed step 21 | |
11001110 | Speed step 6 | 11101110 | Speed step 22 | |
11001111 | Speed step 7 | 11101111 | Speed step 23 | |
11011000 | Speed step 8 | 11111000 | Speed step 24 | |
11011001 | Speed step 9 | 11111001 | Speed step 25 | |
11011010 | Speed step 10 | 11111010 | Speed step 26 | |
11011011 | Speed step 11 | 11111011 | Speed step 27 | |
11011100 | Speed step 12 | 11111100 | Speed step 28 | |
11011101 | Speed step 13 | 11111101 | Speed step 28 | |
11011110 | Speed step 14 | 11111110 | Speed step 28 | |
11011111 | Speed step 15 | 11111111 | Speed step 28 |