Difference between revisions of "Command set"
From wiki-en
m (→Code für DC-Car-Modus) |
m (→Instruction set) |
||
Line 10: | Line 10: | ||
3 bytes are always sent as a block: <br> | 3 bytes are always sent as a block: <br> | ||
<table border = 1> | <table border = 1> | ||
− | < | + | <tr><td> first Byte = Lower address </td> <td> 00AAAAAA </td><td> Address 0-63 </td></tr> |
− | < | + | <tr><td> second Byte = High Address and Switch Group 1 </td><td> 0100AAAA </td><td> Address 64-1023 </td> |
− | </ | + | </tr> |
− | < | + | <tr><td> second Byte = High Address and Switch Group 2 </td><td> 0110AAAA </td><td> Address 64-1023 </td></tr> |
− | < | + | <tr><td> third Byte = Command light with the bit sequence </td><td> 10CCCCCC </td><td> Output 1-5 </td></tr> |
− | < | + | <tr><td> third Byte = Command Motor with the bit sequence </td><td> 11MM1MMM </td><td> Speed step 0-28 </td></tr> |
− | </ | + | </table> |
<br> | <br> | ||
With byte 1 and 2 you can address up to 1023 cars. <br> | With byte 1 and 2 you can address up to 1023 cars. <br> | ||
Line 23: | Line 23: | ||
<table border=1> | <table border=1> | ||
<tr><td>Bits</td><td> Funktionsgruppe 1 </td><td> Funktionsgruppe 2</td></tr> | <tr><td>Bits</td><td> Funktionsgruppe 1 </td><td> Funktionsgruppe 2</td></tr> | ||
− | <tr><td>10CCCCC1 </td><td> | + | <tr><td>10CCCCC1 </td><td> indicator left </td><td> Headlight</td></tr> |
− | <tr><td>10CCCC1C </td><td> | + | <tr><td>10CCCC1C </td><td> indocator right </td><td> Light 2</td></tr> |
− | <tr><td>10CCCC11 </td><td> | + | <tr><td>10CCCC11 </td><td> Hazard lights </td><td> </td></tr> |
− | <tr><td>10CCC1CC </td><td> | + | <tr><td>10CCC1CC </td><td> Distance control </td><td> Licht 3</td></tr> |
<tr><td>10CC1CCC </td><td> Reedschalter </td><td> Licht 4</td></tr> | <tr><td>10CC1CCC </td><td> Reedschalter </td><td> Licht 4</td></tr> | ||
− | <tr><td>10C1CCCC </td><td> | + | <tr><td>10C1CCCC </td><td> Beacon </td><td></td></tr> |
− | <tr><td>101CCCCC </td><td> | + | <tr><td>101CCCCC </td><td> Front flashr</td><td> </td></tr> |
</table> | </table> | ||
Revision as of 20:02, 12 January 2018
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.
Funktionsausgänge 3. Byte
Bits | Funktionsgruppe 1 | Funktionsgruppe 2 |
10CCCCC1 | indicator left | Headlight |
10CCCC1C | indocator right | Light 2 |
10CCCC11 | Hazard lights | |
10CCC1CC | Distance control | Licht 3 |
10CC1CCC | Reedschalter | Licht 4 |
10C1CCCC | Beacon | |
101CCCCC | Front flashr |
Fahrstufe 3. Byte
Byte | Fahrstufe | Byte | Fahrstufe | |
11001000 | Fahrstufe 0 | 11101000 | Fahrstufe 16 | |
11001001 | Fahrstufe 1 | 11101001 | Fahrstufe 17 | |
11001010 | Fahrstufe 2 | 11101010 | Fahrstufe 18 | |
11001011 | Fahrstufe 3 | 11101011 | Fahrstufe 19 | |
11001100 | Fahrstufe 4 | 11101100 | Fahrstufe 20 | |
11001101 | Fahrstufe 5 | 11101101 | Fahrstufe 21 | |
11001110 | Fahrstufe 6 | 11101110 | Fahrstufe 22 | |
11001111 | Fahrstufe 7 | 11101111 | Fahrstufe 23 | |
11011000 | Fahrstufe 8 | 11111000 | Fahrstufe 24 | |
11011001 | Fahrstufe 9 | 11111001 | Fahrstufe 25 | |
11011010 | Fahrstufe 10 | 11111010 | Fahrstufe 26 | |
11011011 | Fahrstufe 11 | 11111011 | Fahrstufe 27 | |
11011100 | Fahrstufe 12 | 11111100 | Fahrstufe 28 | |
11011101 | Fahrstufe 13 | 11111101 | Fahrstufe 28 | |
11011110 | Fahrstufe 14 | 11111110 | Fahrstufe 28 | |
11011111 | Fahrstufe 15 | 11111111 | Fahrstufe 28 |