1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

UART handshaking + control over 2 wire link

Discussion in 'Embedded' started by g18c, May 4, 2005.

  1. g18c

    g18c Guest

    Hi, i am looking at running serial comms over a bidirectional fibre
    link. What i would like is to run full handshaking and control lines
    over this link. Are there any chips which will do this for me?

    If not, i am considering using a microcontroller to sample all the line
    states, then send the bit states over the link to be reconstructed the
    other end.

    Any ideas or suggestions much appreciated.

    Cheers,

    Chris
     
    g18c, May 4, 2005
    #1
    1. Advertisements

  2. Can you use software flow control like Xon/Xoff?

    You might look up how PPP sends TCP/IP over modems to get some idea's.

    You might also consider having a packet transfer system where each
    packet must be acknowledged before the next packet is sent.
     
    Gerald Bonnstetter, May 4, 2005
    #2
    1. Advertisements

  3. I think you misunderstood. He doesn't want to do serial flow
    control.

    He wants to multiplex multiple signals over a single "wire". In
    this case the wire is optical, but that's mostly irrelevent.

    I do know of people who do this. They run 16 high-speed serial
    ports over a single wire. The modem control/status/handshake
    lines are multiplexed at a much lower rate than the data lines
    (KHz for the handshake lines vs. MHz for the data lines). The
    people I know that do this designed a full-custom ASIC to do
    it, but I think you could probably do the same thing in an
    FPGA.
     
    Grant Edwards, May 4, 2005
    #3
  4. g18c

    g18c Guest

    Thanks for the replies. I will be controling a modem on the other end
    of the fibre. I need all the serial lines so that the software sees
    what it expects to see and can control the modem with DTR etc lines as
    needed. Whilst i could use XON/XOFF i do also need the other lines...
    hoping there was a off the shelf chip i could by to do this for me!

    Cheers,

    Chris
     
    g18c, May 4, 2005
    #4
  5. g18c

    Lanarcam Guest

    I guess you need chips not modules such as

    http://www.robustdc.com/index.shtml?model=rdc232fo#rdc232fo
     
    Lanarcam, May 4, 2005
    #5
  6. g18c

    CBFalconer Guest

    A cheap 8:1 multiplex/demultiplex that I built 30 years ago did the
    transmission over several miles of twisted pair, carrying a current
    loop. The multiplexor was a UART, set to transmit with 2 stop
    bits, and receive with 1. (This allowed for rate mismatches at the
    ends). Each input went to one input bit of 8, and was received on
    the corresponding 1 of 8 at the other end. What it really needed
    for long term reliability was 8 stop bits on send, which
    unfortunately needed added hardware. Today I would suggest
    building it all out of a single bit-banging PIC, and to turn the
    bit rates up by about a factor of 4 or more.

    The result was used to move 8 110 to 300 baud lines over a 9600
    baud link. Note that things are transparent, so you can use a
    multiplexed line as a transparent handshaking signal if you wish.
    Effectively you have:

    +-------+ +------+
    8 lines --->---| MX | | deMX |-->-- 8 lines
    | |-<- 2 lines ->-| |
    8 lines ---<---| deMX | | MX |--<-- 8 lines
    +-------+ +------+

    where the '2 lines' can be one bidirectional link.
     
    CBFalconer, May 4, 2005
    #6
  7. I guess I did misunderstand. He did add that he's controlling a modem
    on the other end so that's clear now even to me.

    I just didn't want him doing all the extra work if he really didn't need to.
    Another similar way to do it might be to have your two PICs (or other
    micro) sending the data between themselves 4 bits at a time and using
    the other bits for control signals. That might work for him and only
    run at two times the bit rate.

    It seems like some micros can do a 9 bit transfer. Would that be a way
    to pass an occasional control byte now and then?

    If bit 9 is 0, then its data. Otherwise it's a flow control byte thats
    only sent when the hardware lines have changed state.
     
    Gerald Bonnstetter, May 5, 2005
    #7
  8. g18c

    Cecil Hill Guest

    This may be a little over the top for your particular app, but there is an
    internet protocol
    defined in http://rfc.net/rfc2217.html to address this kind of thing.
     
    Cecil Hill, May 6, 2005
    #8
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.