reprogram DCC decoder v2

Use this forum to discuss our various DCC decoders.
Post Reply
colin.christian
Posts: 2
Joined: Fri Nov 29, 2024 2:34 am

reprogram DCC decoder v2

Post by colin.christian »

I am awaiting delivery of 2 decoder and an iProbe
My question really is what is the best way to reprogram the decoder to change loco number and other CVs , thinking of lights and possible other functions.
I am guessing some additional code would be required for the functions to work.
I have put together a decoder based on the original circuit with a Raspi Pico board as the processor. Obviously this is easy to reprogram via the USB , I did manage to change the loco number (CV1) using JMRI. although this did produce an error as there is no provision on the hardware to acknowledge the programmer.
So back to the main question:
to change CVs do I change the CV.h file and recompile and download the new soft/firmware to the decoder or is there a cleverer way to do it?

any comments or recommendations welcomed

Colin
Pontus
Site Admin
Posts: 37
Joined: Wed May 22, 2024 10:06 pm
Location: Östra Ingelstad
Contact:

Re: reprogram DCC decoder v2

Post by Pontus »

Hi Colin,

Changing CV's can easily be done through JMRI. You need to have a motor connected to the decoder though as this is used in the circuitry generating feedback from the decoder. If no motor is connected you will get the error that you see.

You do not need to reflash the unit just for programming CV's.

But if you want to change the default setting for a particular CV you need to change the value in CV.h and recompile the firmware. This will ensure that the new value is loaded into the CV file when a DCC reset is performed by writing 8 to CV 8.
colin.christian
Posts: 2
Joined: Fri Nov 29, 2024 2:34 am

Re: reprogram DCC decoder v2

Post by colin.christian »

Hi
thanks for the info.
decoders just arrived so will start to experiment soon
regards
Colin
Ps
Just got it hooked up to a little can motor - works a treat, managed to change loco address so far
have now read all CVs and can write back new ones
really impressed with this nice little machine
I hadn't released how the decoder responded to requests etc - i was confused with Xpressnet which I have been playing with
my aim is to set up a bluetooth control something like hornby that is why I have been playing with raspy pico-w with the ble addition
Anyway all good fun and much intriguing
Post Reply