Hi Forum
I am learning how to program on the ESP32. I would like to implement the NMRA DCC Protocol https://en.wikipedia.org/wiki/Digital_Command_Control using the ESP32. Basically the DCC protocol can be used to control the model train speed and direction by varying the period of the voltage is applied to the railway track. This voltage is a variations is used to encode a data signal that is decoded by a decoder in the model train. To represent a binary one a nominally 58 µs half cycle, while a zero is represented by a nominally at least 100 µs half cycle.
I have used PWM signal to control power to motors previously, however the NRMA signalis very different.
Could someone suggest approaches I should review to implement a NRMA signal generator on ESP32/
Thanks
Densha
Generate NMRA DCC Wave Form Using ESP32
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: Generate NMRA DCC Wave Form Using ESP32
I would use the RMT peripheral; it is very well-suited to generating these types of signals.
Re: Generate NMRA DCC Wave Form Using ESP32
Thanks - I'll have a look at RMT. I have not come across that yet.
Could you suggest any examples generating a PWM or motor control signal I can learn from?
Thanks
Densha
Could you suggest any examples generating a PWM or motor control signal I can learn from?
Thanks
Densha
-
- Posts: 9708
- Joined: Thu Nov 26, 2015 4:08 am
Re: Generate NMRA DCC Wave Form Using ESP32
Not sure - if you haven't done it, please at least have a look in the examples directory of esp-idf, if any it shows you how you can use the peripheral drivers.
Who is online
Users browsing this forum: Google [Bot] and 75 guests