Sharing Serial connection


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695

    Default

    Hi,

    Use the PIC to repeat the data. (Link through the PIC).
    You will need a PIC with hardware UART + interrupt routine.



    Best regards,

    Luciano

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563

    Thumbs up Can we have some more details on the PIC

    Hi,

    Luciano's solution can be best and economical. But it is hard to comment without a little more detail. So ben give us some more info.

    Regards

    Sougata

  3. #3
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382

    Default

    That was one of my thoughts and I'm all for it. Here is where it gets sticky.

    The software on the PC side is locked to com1 but I'm trying to interface with 2 serial devices with it. The original idea was to use a serial switch box and control each individually with the software.

    The devices can be turned on/off remotely via serial. The request was to be able to turn both devices on/off on a day to day bases w/o the PC but they still want the ability to use the more advance PC software on occasion.

    I'm trying to combine the functionality of the switch box with the automated control of the pic.

    Keep in mind the protocol is a send and reply protocol which means the PC can't just send commands blindly to both devices.

    Make sense?

  4. #4
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563

    Default A simple method

    Hi,

    You can share the RXin (TXout of PC) from the PC to the PICs so that both of them listen to what the software is asking to do. So the objective is to prevent clash of TXout (Rxin of PC) line. If you are using two MAX232 on both the device then things get complicated. You already thought of the DTR line. So lets do it in this way.

    1. Do not use individual MAX232

    2. OR both the PICs TX output by a couple of 1N4148 diodes.

    3. Use the ORed output to the TXin of the MAX Chip

    4. Use the same ORed output to form some sort of bus activity signal to both the PICs.

    5. Now in your software just before you transmit check for activity (at least one frame according to your baud rate)

    6. If the line is active go idle for a few secs (or so according to your traffic and protocol).

    So when one PIC is sending the other would just wait for the bus to become free (sort of inverse DTR)

    Regards

    Sougata

  5. #5
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382

    Default

    Doing it this way is more work than its with. I'm going to take another route and eliminate the switcher and PC portion of the design. If they want to you the PC they will have to replug as needed.

Similar Threads

  1. Replies: 33
    Last Post: - 19th March 2010, 03:02
  2. Laptop Serial connection how to
    By Sumobob in forum Serial
    Replies: 2
    Last Post: - 9th October 2008, 04:09
  3. Automatic VB6 to pic serial connection
    By arniepj in forum Code Examples
    Replies: 13
    Last Post: - 10th January 2008, 07:57
  4. Failure Serial Connection with Hyperterminal
    By guanerrr in forum Serial
    Replies: 2
    Last Post: - 5th August 2007, 07:49
  5. serial connection n vb interface
    By gidah in forum Serial
    Replies: 1
    Last Post: - 18th September 2006, 13:54

Members who have read this thread : 1

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