Not sure if this is any help
http://www.trainelectronics.com/miniDCC/index.htm
It has some code and the site is about DCC
Not sure if this is any help
http://www.trainelectronics.com/miniDCC/index.htm
It has some code and the site is about DCC
Hi, Boroko
I found this tutorial ...
In French, ... yes, FreeBasic, yes ... but everything needed explained .
http://www.train35.com/dcc1.html
And easy to port to pbP !
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Thanks Alain for the suggestion. I will look and see what I can learn from there.
Current plan is to use DT-Ints to capture and measure the width of the incoming pulses to determine weather they are short (58uS :"1") or long (100uS: "0") or standard AC power (16.7mS) and generate a level of 1 or 0 if it is data. If Std. AC I can jump to a fall-back and pick one of a few basic modes by cycling the power. The data pulses, once decoded, could be simply fed into the USART.
Bo, have a look at JMRI. Currently "decoders" which is the standard moniker for DCC assemblies that go into engines are run by pics. The latest crop have some interesting features, including "programmable" PWM. You can move the frequency range around to quiet noisy motors. It looks, programs and acts like NVRam. Quite cool, actually.
Hope it helps
Gary
Thanks Gary,
From what I can tell, PICS have been used extensively in decoders. The specific issue that I'm trying to nail down is all of the code that I have seen is in assembly. I can muddle through assembly, but in this app, the timing is very tight, and I haven't mastered the skill to mimic the code in PBP. I have been refining the attack and will whittle away at it. I DON'T want to specifically duplicate the existing function, if so I could just burn the available .hex. I'm trying to accomplish comm over 2 wire in a similar way that is done in DCC. That's why I need to have control of the code.
I appreciate all of the feedback that everyone has offered. It looks like I'll just have to upgrade my skill set a bit.
Thanks
Bo
Bookmarks