PICAXE based DCC Accessory Decoder
The project combines two PICAXE microcontrollers to download and interpret the Digital Command Control (DCC) data stream from used with many model railway systems. Most DCC accessory decoder both commercial and DIY are designed to operate with typically 8 outputs as 4 pairs to control point motors, semaphore signals and similar requirements.
The first PICAXE is a 20X2 operating at 64 MHz to receive and save the raw data associated with the DCC data stream. The second PICAXE is a 28X2 operated at 80 MHz using an external 20 MHz resonator which reads the raw data and decodes the DCC commands and then acts upon valid DCC command performing the end users control requirements. It may be possible to change the second PICAXE to say a 20X2 also operating at 64 MHz if the end-users control requirements are simple and do not require significant time to perform.
The PICAXE based accessory decoder does not measure the duration of the two halves of each DCC data bit and instead in effect measures the overall duration of each DACC databit. This has been found to be very reliable when used with an NCE DCC control system.
The advantage of this PICAXE based DCC accessory decoder is that the end user can incorporate more flexible logic within the overall decoder using the spare capacity of the second PICAXE chip for control of such aspect of model railway as various lighting sequences (instead of simple on/off) within buildings, on station platforms, town/village streets and goods yards without the need for additional controllers.
In the Author’s thread on the PICAXE forum -Finished Projects area (https://www.picaxeforum.co.uk/showthread.php?27439)
There is a tutorial, schematics and the program code for the two PICAXE chips.
As the Author only required a small number of these DCC accessory decoders a prototyping board based circuit has been assembled with four operating successfully.