Model rail: DCC timing/20x2 speed

brianpr1

New Member
Hi all,
This is my first post here. I have been playing with electronics for only about 12 months to control a model railway. It would be useful to make a picaxe decode the data to operate points and signals.

After a search here the consensus seems to be that a picaxe is too slow to decode DCC data. Is this likely to be the same with a 20x2 at 64MHz?

The minimum time between successive data bits of the DCC signal is about 100uS and reading the data using David Lincoln's method for input expansion seems to need 6 to 10 lines of Basic in that time interval. Is there a more appropriate and faster way to read data in? I cannot see any way to use the standard serial input with the DCC pattern and the system uses standard DCC equipment, so there is no option to modify the incoming data packets.

Is it worth going any further?

Thanks in advance.
 

hippy

Technical Support
Staff member
Welcome to the PICAXE forum.

Even at 64MHz it would appear to be difficult to read DCC packets unless external hardware were used to convert the incoming data to RS232-style serial and would probably be beyond the capabilities of a PICAXE otherwise.

At high speed, PULSIN could potentially measure each incoming pulse but a whole packet's worth of consecutive data bits would need to be read, and the ability to detect start of packets is questionable.

DCC through its protocol looks to be a task best performed by a dedicated microcontroller device than a general purpose PICAXE.
 
Top