- DCC module
This module provides high level APIs. It and associated modules in the package contain the functions and classes for DCC command station.
A command comprises a preamble, one or more instruction/data bytes and an error detection (checksum) byte. Each byte is preceeded by a single '0' bit. The checksum is followed by a single '1' bit which may be the initial bit of the next preamble. The preamble is at least 14 '1' bits. Note that in this implementation the pre-amble is not interrupted by the cutout so the preamble length doesn't need to be lengthened.
This DCC implementation has a limited set of features. E.g. it doesn't include bit stretching for DC vehicles on address 0, 14/28 speed steps, any service mode functions or accessory controller commands. We allow for a maximum command sequnece of 11 bytes including check sum. There is limited support for Programming on Main.
RCN-210 & RCN-211 partly apply as appropriate.
See also NMRA Standards S 9.2 and S 9.2.1. S 9.2.1.1 is not supported.
The module makes full use of a RP2xxx PIO for DCC signal encoding and serialisation. If RailCom is enabled a second PIO is used for this.
The DCC commands are serialised to the track via the DCC generation driver, which also inserts the RailCom cutout if in use.
Three RP2040 PIO state machines are used by driver modules, one for DCC generation and two for RailCom. The two RailCom state machines must be on the same PIO block.
| Author | |
| Paul Redhead |
| Class | |
DCC Command |