serout2 using Open Inverted


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2006
    Location
    Brasil, Sao Paulo, Campinas
    Posts
    54

    Question serout2 using Open Inverted

    Hi,

    I have an aplication runing ok with a PIC 16F877A conected to PC (N9600 = 16468 using serout2). Now, I want to put a second PIC together e after the last PIC (3 in all) but I don`t now how to do it.
    Need I to use a ON mode (ON9600 = 49236 using serout2) ? Is necessary to put a pull up or pull down resistor? Can I to conect the 2 pins of the PIC together and then to the pin2 of DB9 to send to PC? If the 2 PICs send data to PC in same time, what happen?

    Thanks for your help
    Pimentel

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    No you don't need to use ON mode, you can use N or T modes without much problems.
    Is necessary to put a pull up or pull down resistor?
    not really with T or N mode.
    Can I to conect the 2 pins of the PIC together and then to the pin2 of DB9 to send to PC? If the 2 PICs send data to PC in same time, what happen?
    Some data collision in front I would probably dedicate a PIC to send the data to the PC.

    BUT, there's also another option, which would allow you to connect two serial output pins together. What you need to use is a kind of Busy line. This is a line connected between your PIC. This tells that you're actually sending data to the PC.

    Start with both PIC output pin set to input, with a pull-up/down (depending of your actual setup), when you want to send some data to the PC, you check the level of the Busy line (0 or 1), if ok(not busy), set this line to busy level, set your Serial output to output, send your data, set that pin to input, release the busy line, and you're done.

    Wait a minute... ON mode could be interesting here
    Last edited by mister_e; - 14th November 2008 at 19:03.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default

    If you connect the serial outputs of two PICs together, you should always use the OPEN mode. Use a pull-up to Vcc. 3.3K is a good choice for a value.
    Charles Linquist

  4. #4
    Join Date
    Dec 2006
    Location
    Brasil, Sao Paulo, Campinas
    Posts
    54


    Did you find this post helpful? Yes | No

    Smile

    Thanks Charle and Steve!

    I tested wiring the 2 pins of 2 PICs together with a 4K7 pul up resistor, but it did not function. Then I removed the electrical resistance and I got success!
    I used ON mode (serout2 portb.0,49xxx) <=> ON9600

    Thanks again

    Pimentel
    Last edited by Pimentel; - 16th November 2008 at 13:38.

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


    Did you find this post helpful? Yes | No

    Default

    Something is strange then, because when you are using the device in the OPEN mode (if you truly are), then there is no way it will work without a resistor connected to the wire between the PICs and to Vcc. Note that the OPEN mode only makes sense on the SEND side (SEROUT).

    That is, if you have PICs #1 and #2 both sending data to PIC #3, then Pic #1 and #2 should be in the OPEN mode. PIC #3 does not have to be in the OPEN mode to receive the data (but all devices must be either TRUE or INVERTED), and you must have a pull-up on the wire that connects the output of PIC#1, PIC#2 and the input of PIC#3.
    Charles Linquist

  6. #6
    Join Date
    Dec 2006
    Location
    Brasil, Sao Paulo, Campinas
    Posts
    54


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Explaining better… I have 2 PICs sending data for a radio configured for 9600, N, 8,1. When I insert a 4k7 resistor to VCC the circuit fail.
    Now, as attached figure always functions!
    Attached Images Attached Images  

  7. #7
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    For inverted serial the TX pin should idle low, so a pull-down resistor would be
    required. If you were using true mode then a pull-up resistor would be needed.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  8. #8
    Join Date
    Dec 2006
    Location
    Brasil, Sao Paulo, Campinas
    Posts
    54


    Did you find this post helpful? Yes | No

    Smile

    Hi Bruce,

    Now I understood. I go to insert a pull down resistor then!

    Thanks again

    Pimentel

Similar Threads

  1. Serout and 18F87J50
    By Glenn_Webber in forum Serial
    Replies: 8
    Last Post: - 20th November 2009, 15:26
  2. Serout to serial servo
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 12th August 2009, 17:46
  3. SLOW Serin2 and Serout2
    By dragons_fire in forum General
    Replies: 3
    Last Post: - 26th June 2009, 03:38
  4. Replies: 0
    Last Post: - 15th December 2006, 20:16
  5. Gps with 16f628
    By dragons_fire in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 8th June 2006, 04:38

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