dccpp:dccpp-en
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dccpp:dccpp-en [2019/08/07 09:37] – [Options] vt601 | dccpp:dccpp-en [2023/09/05 18:13] (current) – [Options] rjversluis | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== DCC++ (EX)====== |
[[: | [[: | ||
- | [[: | + | [[: |
- | | + | * [[[: |
- | | + | |
- | \\ | + | |
- | [[https:// | + | |
- | [[https:// | + | |
\\ | \\ | ||
Line 18: | Line 13: | ||
* DCC stationary decoder support. | * DCC stationary decoder support. | ||
* 2A Booster power. | * 2A Booster power. | ||
- | \\ | ||
- | ====DCC++ Setup==== | ||
- | | {{: | ||
- | \\ | ||
- | - Install the **[[# | ||
- | - Wiring the motor shield: {{: | ||
- | |||
\\ | \\ | ||
Line 33: | Line 21: | ||
\\ | \\ | ||
+ | ===== **Support announcement** ===== | ||
+ | Please consider that this is a real DIY project.\\ | ||
+ | It is not supported by Rocrail nor GCA.\\ | ||
+ | Just start with this modules if you are able to do some Arduino\\ | ||
+ | programming yourself.\\ | ||
+ | |||
Line 38: | Line 32: | ||
=====General Setup===== | =====General Setup===== | ||
The DCC++ library in Rocrail is **dccpp**.\\ | The DCC++ library in Rocrail is **dccpp**.\\ | ||
- | {{: | + | {{: |
====Sub-Library==== | ====Sub-Library==== | ||
===Serial-USB=== | ===Serial-USB=== | ||
- | The baud rate is fixed at **115200**.\\ | + | The baud rate is set default to **115200**.\\ |
- | The only thing to setup is to choose the right virtual | + | :!: Some serial |
+ | |||
===TCP/ | ===TCP/ | ||
A TCP/IP connection can be used if the Arduino features an Ethernet Shield.\\ | A TCP/IP connection can be used if the Arduino features an Ethernet Shield.\\ | ||
The TCP/IP Port is fixed at **2560**.\\ | The TCP/IP Port is fixed at **2560**.\\ | ||
- | The **Config.h** source must be modified and recompile for using the Ethernet Shield: | ||
- | <code C> | ||
- | ///////////////////////////////////////////////////////////////////////////////////// | ||
- | // | ||
- | // DEFINE COMMUNICATIONS INTERFACE TYPE | ||
- | // | ||
- | // 0 = Built-in Serial Port | ||
- | // 1 = Arduino Ethernet/SD Card Shield | ||
- | |||
- | #define COMM_TYPE | ||
- | </ | ||
- | Example of a connection response with ethernet: | ||
- | < | ||
- | 20160315.083459.796 r9999I dccpprea ODCCPP | ||
- | 20160315.083459.806 r9999I dccpprea ODCCPP | ||
- | </ | ||
Line 72: | Line 52: | ||
The number of slots is default 12. If using the MEGA it can be increased in the DCC++ sources.\\ | The number of slots is default 12. If using the MEGA it can be increased in the DCC++ sources.\\ | ||
__The number of slots must be less or equal to the number of registers set in the DCC++ sources.__\\ | __The number of slots must be less or equal to the number of registers set in the DCC++ sources.__\\ | ||
- | | [[https:// | ||
- | The number of slots, registers, can be changed in the **Config.h line 24**: | ||
- | <code C> | ||
- | // DEFINE NUMBER OF MAIN TRACK REGISTER | ||
- | |||
- | #define MAX_MAIN_REGISTERS 12 | ||
- | </ | ||
===Slot Purge Time=== | ===Slot Purge Time=== | ||
The minimal idle time in seconds before a slot ist purged.\\ | The minimal idle time in seconds before a slot ist purged.\\ | ||
+ | Purging is disabled if set to zero.\\ | ||
===Sensor off delay=== | ===Sensor off delay=== | ||
Line 96: | Line 70: | ||
Swap the turnout and straight commands.\\ | Swap the turnout and straight commands.\\ | ||
- | ===Reduce IDs=== | + | ===Join=== |
- | Reduce | + | Use the JOIN command instead of MAIN in case of power ON.\\ |
- | This option allows usage of an Arduino Uno with more than 45 devices addressed on DCC.\\ | + | See the DCC++ documentation for more details.\\ |
- | ====Serial device check==== | + | ===4 byte accessory commands=== |
- | Some Windows configurations will crash at Rocrail server startup if the following option | + | Uses 4 bytes in case of the ''< |
- | * __**[[: | + | Without this option: ''< |
+ | See the DCC++ documentation for more details.\\ | ||
+ | |||
+ | ===DTR=== | ||
+ | Determine | ||
+ | Only used for incompatible DCC++ boards.\\ | ||
+ | ===RTS=== | ||
+ | Determine the serial RTS level on startup. None is default.\\ | ||
+ | Only used for incompatible DCC++ boards.\\ | ||
\\ | \\ | ||
+ | |||
+ | |||
+ | |||
+ | |||
=====I/O Setup===== | =====I/O Setup===== | ||
Line 132: | Line 118: | ||
A new query is automatically issued.\\ | A new query is automatically issued.\\ | ||
- | ====Opties==== | + | ====Options==== |
===Output=== | ===Output=== | ||
^ Option ^ Bit ^ Value ^ | ^ Option ^ Bit ^ Value ^ | ||
Line 139: | Line 125: | ||
| Initial | 2 | 0 = state of pin set to INACTIVE upon power-up or when first created \\ 1 = state of pin set to ACTIVE upon power-up or when first created | \\ | | Initial | 2 | 0 = state of pin set to INACTIVE upon power-up or when first created \\ 1 = state of pin set to ACTIVE upon power-up or when first created | \\ | ||
- | ===Sensor=== | + | ===Input (Sensor)=== |
^ Option ^ Bit ^ Value ^ | ^ Option ^ Bit ^ Value ^ | ||
| Pull-up | 0 | 1 = use internal pull-up resistor for the pin \\ 0 = don't use internal pull-up resistor for the pin | | | Pull-up | 0 | 1 = use internal pull-up resistor for the pin \\ 0 = don't use internal pull-up resistor for the pin | | ||
- | \\ | + | Usually no manual settings are required here. Rocrail automatically defines Arduino pins as input or output pins as soon as the pins of such a DCC++ CS are used for triggering sensors, turnouts or signals. For input pins, the option " |
+ | |||
+ | Manual intervention is required, only in the case that other options than the default ones are to be used at startup. It is generally recommended that you first create all objects in the plan with the desired pins. Then Rocrail should be restarted and all commands of objects that use output pins should be executed once; because at startup all used input pins and, when executing a command, all output pins are created from Rocrail in the DCC++ CS temporarily. After that, all used pins are listed at " | ||
+ | |||
+ | When changing the option " | ||
=====Addressing===== | =====Addressing===== | ||
Line 221: | Line 211: | ||
=====Programming Track===== | =====Programming Track===== | ||
- | The rail power must be set to on before using the **P**rogramming **T**rack.\\ | + | The rail power must be set to off before using the **P**rogramming **T**rack.\\ |
- | Do not forget to add the required jumper wire on the Motor Shield.\\ | + | |
\\ | \\ | ||
- | =====Install the Firmware===== | ||
- | {{ : | ||
- | - Install the Arduino Software (IDE) | ||
- | * https:// | ||
- | - Download the latest **DCC++ Base Station** release and unzip the sources: | ||
- | * https:// | ||
- | - Open with the Arduino IDE the following file, found in the DCCpp_Uno directory: | ||
- | * **DCCpp_Uno.ino** | ||
- | - Select the Arduino target, the one used, in the Arduino IDE: | ||
- | * Tools -> Board -> Arduino/ | ||
- | - Select the USB Port: | ||
- | * Tools -> Port -> COMx or /dev/tty* or /dev/cu* | ||
- | - Write the DCC++ Firmware in the Arduino: | ||
- | * Sketch -> Upload | ||
- | |||
- | ====HEX File==== | ||
- | * {{: | ||
- | |||
- | \\ | ||
- | |||
=====Trouble Shooting===== | =====Trouble Shooting===== | ||
====Loco stops at max.speed==== | ====Loco stops at max.speed==== | ||
Set the number of __**[[: | Set the number of __**[[: | ||
- | |||
- | ====Ethernet Compile Error==== | ||
- | If the following compile error occurs: | ||
- | < | ||
- | In file included from / | ||
- | sketch/ | ||
- | # | ||
- | ^ | ||
- | compilation terminated. | ||
- | exit status 1 | ||
- | Error compiling. | ||
- | </ | ||
- | Change line 11 in Comm.h: | ||
- | from | ||
- | <code C> | ||
- | #include ETHERNET_LIBRARY | ||
- | </ | ||
- | to | ||
- | <code C> | ||
- | #include < | ||
- | </ | ||
\\ | \\ | ||
- | ====Windows crash after Rocrail start==== | ||
- | Some Windows configurations will crash at Rocrail server startup if the Arduino is connected by USB and the following option is not set:\\ | ||
- | * __**[[: | ||
- | |||
- | |||
- | |||
- | \\ | ||
- | |||
- | =====Max. Current===== | ||
- | In file '' | ||
- | # | ||
- | |||
- | ^ according to \\ Trainboard.com ^^ math. \\ correct ^ | ||
- | ^ Value ^ Max. current ^ Value ^ | ||
- | | 300 | 800 mA | 270 | | ||
- | | 600 | 1600 mA | 540 | | ||
- | | 750 | 2000 mA | 675 | | ||
- | These values apply to the __**[[https:// | ||
- | The Current sensing of other Motor shield types may vary, especially if its max. current is > 2 A.\\ | ||
- | See for more information: | ||
- | {{ http:// | ||
- | | :!: **Important Note:** There are Motor shields with Driver chips LM298 which are so mounted that the heat __can' | ||
- | |||
- | \\ | ||
- | |||
=====Links===== | =====Links===== | ||
- | * **[[https://sites.google.com/site/dccppsite/home|Project Home Page]]** | + | * https://dcc-ex.com/reference/software/command-reference.html# |
- | * **[[https:// | + | |
- | * **[[https:// | + | |
- | * **[[https:// | + | |
- | * **[[https:// | + |
dccpp/dccpp-en.1565163448.txt.gz · Last modified: 2019/08/07 09:37 by vt601