PICAXE based DCC ACCESSORY CONTROLLER for model railways using NCE DCC control system

For those Model Railway operators using the NCE DCC control systems, this project using a PICAXE 20X2 as the basis for a DCC Accessory Controller connected via the NCE Cab-Bus may be of interest.

Due to the size limitations for pdf file attachments, this post has two separate files attached.
  1. The background, design, construction and basics of the programming requirements
  2. The User Manual for operating the DCC Accessory Controller

The next post includes the PICAXE BASIC program as a .bas file for download.

The features of this DCC Accessory Controller for NCE based DCC control systems as presented herein include:
  • Separate control of all Accessories ( addresses 1 to 2043 devices – address 2044 is a broadcast address and thus excluded here)
  • PICAXE 20X2 microcontroller based.
  • Programmed in PICAXE BASIC – making end-user changes relatively easy to suit the layout.
  • Controls via and powered from the NCE Cab-Bus (approx. 25 mA draw with backlight on).
  • LCD display:
  1. Entirely driven by the PICAXE microcontroller to reduce data on the NCE Cab-Bus.
  2. Provides clearer text based options for the control of devices (e.g. for Signals displays as “1=Danger or 2=Clear” ) instead of NCE’s “1=N 2=R” for all devices types.
  • 4x4 keypad – allows :
  1. direct entry of each accessory address number (1 to 2043).
  2. ‘Escape’ to cancel the current entry at any point prior to last key-press.
  3. ‘Delete’/Backspace to back up on an Accessory address.
  4. Selection of Device types (i.e. signals, points, routes, uncouplers, lights, etc) which allows clearer LCD display of the available actions.
  5. User selectable CAB address (2 to 63) through the software – by holding down the ‘Delete’ key at power-up.
  6. Last Accessory device address (since last power-up of the CAB) is displayed again for quick acceptance if the next action is for the same accessory device. (e.g. ‘Uncoupler Up’, then same ‘Uncoupler Down’).
  7. Ability to undertake most of the key-presses to set up a route/point/signal while still controlling locomotives from the normal NCE Cab/Throttle. Allows a quick route change with 1 key-press for say a passing loop as trains pass.


Last edited:
PICAXE based DCC ACCESSORY CONTROLLER for model railways using NCE DCC control syste

Attached is the PICAXE 20X2 BASIC program listing for Users to download (then if necessary modify to suit their own layout) and download into the PICAXE microcontroller.

The BASIC program for the PICAXE 20X2 microcontroller utilises the following IO and memory capabilities:
  • All eight of the PortB pins.
  • Six of the eight PortC pins – two are spare for future use along with pin A.0 if required.
  • 2160 bytes from the available 4096 bytes of program space.
  • All of the 256 bytes of EEPROM memory – for the LCD initialisation data and screen messages.
  • 112 Bytes of Table memory space for additional screen messages.
  • 25 out of the 56 pre-defined byte variables.
  • 87 of the available 128 bytes of ScratchPad memory are used as a buffer for data transmission to the NCE command station via the RS485 Cab-Bus.

Thus there is ample remaining Program memory space (almost 2 KBytes) for further enhancements and operational changes.


A further caution to that made in section 2.1 of my Background document with respect to conflicts in NCE documentation.

Today I have just come across 2 more NCE documents through the NCE DCC Yahoo group files:
1. A basic public domain Cab design - for controlling a loco only with DIP switch set Cab address
2. A Technical Manual.

In summary, I find across documents as follows:
[b]Document                               Connector Type           RJ12 Pin for 12Vdc      RS485 Chip Connections[/b]
CAB-BUS Protocol (6page doc)               RJ11                        [COLOR="#FF0000"]Pin2[/COLOR]             RJ pin 3 to "A" (pin6)
PowerPro Manual                            RJ12                        Pin5             RJ pin 3 to [B]-[/B]RS485 (RJ pin4 to [B]+[/B]RS485)
UTP Schematic                              RJ12                        Pin5             RJ pin3 for Data "A"  
Packet Analyzer Schematic                   ns                   via bridge rect.       RJ pin 3 to [COLOR="#FF0000"]"B" (pin7)[/COLOR]           
Technical Manual (29pages)                 RJ12                        Pin5             RJ pin 3 to [COLOR="#FF0000"]"B" (pin7)[/COLOR]
Public Domain Cab design(1996)              ns                         [COLOR="#FF0000"]Pin2[/COLOR]             RJ pin 3 to "A" (pin6)
1. an RJ11 connector does have 6 ways but only 4 contacts and thus will in fact work.
2. an -RS485 is typically but not always taken to be the "A" line

In conclusion, be wary when reading the NCE documents and check if unsure.

One might ask why I do not just past this information on to NCE to correct their documents.
Answer - they do not respond and may not act.
While NCE's DCC control system is great, I had problems with NCE loco decoders.
when I posted information and DSO waveforms on the NCE DCC group I was told to stop 'knocking' NCE.
when I sent the technical details and DSO waveforms to NCE (twice) I received no response - if it meets the NMRA guidelines this is seemingly sufficient albeit there may be issues.

Now do not get me wrong, NCE are not alone in this respect.
I have also sent information to Team Digital, TCS, Heljan and Hornby about their respective model railway DCC products.
These companies acknowledged by information and:
TD did in part incorporate my information into the SCR-162 manual,
TCS did in part add my information but still left corrections out for settings,
Heljan appeared to update their turntable manual and sent me a revised copy (good) but have never (after several months) put the updated version on their website for use by others,
Hornby was going to pass to their Technical People for consideration.
Last edited: