Giter VIP home page Giter VIP logo

rpi-dcc-decoder's Introduction

rpi-dcc-decoder

Raspberry Pi NMRA DCC Decoder Hardware and Software

A hardware and software design to connect a Raspberry Pi to a NMRA compliant DCC system, decode the DCC signal and display the output on the screen. As-is it is a "DCC Sniffer", but with minor modification could be used to turn the Raspberry Pi into a stationary decoder.

See HARDWARE.md for the circuit design to connect a Raspberry Pi to the tracks of an NMRA compliant DCC system.

The software uses the pigpio library. Inspired by Frequency Counter 1.

This software is under the BSD 2-clause license, see LICENSE.

Building

make

Running

./dcc_decode 5 -s1

Runs on GPIO 5, with a 1us poller. Use 1us for the best performance.

DCC Reference Documents

rpi-dcc-decoder's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rpi-dcc-decoder's Issues

Wrong DCC min and max timing?

Hi
I tried to use your code to decode DCC on my model railroad. Your code is well documented, but what I don't understand is the timing for the DCC min and max

#define TICKS_MIN_DCC_ONE   12
#define TICKS_MAX_DCC_ONE   38
#define TICKS_MIN_DCC_ZERO  68
#define TICKS_MAX_DCC_ZERO 150

Has NMRA DCC other timings than OpenDCC? As defined in OpenDCC, a one has 58microseconds and a zero 116 microseconds.
OpenDCC Protocol

Thanks

Kind regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.