DCC in PBP


Closed Thread
Results 1 to 16 of 16

Thread: DCC in PBP

Hybrid View

  1. #1
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default

    Thanks Skimask,
    did the search and the only results were like mine: questions.
    It seems that no one is interested.
    I'll work on it and see if I can put it up. Seems like a powerful way to solve comm over two wires.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Well, what do you actually mean by sending data over 2 wires?
    Do you mean just 2 wires or 2 wires that are already carrying power to another device?
    I assume the 2nd...

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I don't exactly know what you are trying to do, but a PIC with a USART can easily do comms and software PWM at the same time.
    Charles Linquist

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi,

    Here are some nice info ...

    http://www.merg.org.uk/resources/dcc.htm

    Assembler ... yess, but pretty well commented ! ... so you understand what's going on.

    The "miniDCC" project also could be useful ...

    Alain
    Last edited by Acetronics2; - 12th September 2008 at 17:29.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  5. #5
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default

    Correct, send data over the only two connections available, that are also providing power.

    To give this a bit of flesh, imagine addressing your Low Voltage Yard lighting. Two wires existing all over the yard. They normally are supplied with 12 vac. Insert a control box between the transformer and the yard wire that has a rectifier and H-bridge that reverse the lines at intervals of either 5 kHz or 8.5kHz. The receiver has a bridge rectifier and cap for storage of power and taps the raw lines to collect intelligence. On model trains, address, speed, accessory control, etc, are communicated. The commercial systems and the spec have a method for limited feedback by current (load) pulsing the line for simple acknowledgment.

    Since my use is not for controlling trains, but instead, yard lighting and such, I need to be able to get into the code and tweak. The only examples of code that I have found are asm and as you can imagine, very dependent on cycle counts for correct timing. I'm not sure that I can handle that reliably. If someone had already done it in PBP, I could look at and get some ideas. I'm pulling apart the .asm code now and trying to get my arms around it so that I can do it a bit easier. I may be able to leave the message collection in .asm, and just write around it, but first I have to get the interspersed (and carefully timed) "train" stuff out of it and get the pulse measurement and word collection back working.

    My app uses Darrel's DT-ints to generate 8 channels of PWM. To mix that with watching for, and decoding 100us and 200us pulses is a lot. My path is to separate them on different PICS until I can get it working. Once that is running, I will look at a faster PIC or moving up the food chain.


    Hope that gives everyone a better idea of what I'm trying to do. Looks like my chance to figure this out and have something to contribute.

    Thanks
    Bo

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Sounds like a low voltage X10?

    Here is some info.
    http://davehouston.net/
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default

    Like X-10 in as far as power line comm, but instead of imposing a signal on a carrier, the supply is kind of FSK (freq shift key) of the supply power. Seems very robust. on model trains, remember that the contact is by wheels, often on dirty track. Difficult at best.
    Bo

  8. #8
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default

    BTW,

    Alain:
    MERG is an excellent resource for such things. I'm building a MiniDCC as a base to start testing. (I will have to get back into Model Railroad, so it will have a use after testing). The problem is that it is so well done, no one had needed to write in PBP, they just use it.

    Dave:
    Thanks for the link to your site. Very nice info, I will mine it further. Maybe tune up my X-10 system.

    bo

  9. #9
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by boroko View Post
    Dave:
    Thanks for the link to your site. Very nice info, I will mine it further. Maybe tune up my X-10 system.
    I was meaning your yard light system would be like X10. Modulating a signal over DC like the trains should be pretty easy. But that was only an example... right?

    And the site I linked to is a different Dave.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. Extensions to PBP variables
    By John_Mac in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd October 2009, 05:21
  3. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  4. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30
  5. PBP / XP Crash
    By pondindustrial in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th November 2005, 03:16

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts