Need help multiplexing EUSART output


Closed Thread
Results 1 to 35 of 35

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429

    Default Need help multiplexing EUSART output

    Hi, The PIC i'm using has only 1 EUSART and I need to send data to 2 different devices without using software serial like SEROUT or SEROUT2.

    This is what I want to do:

    <img src="http://ii.net/~steven/files/pic1.jpg">

    And thus PORTB.6 would control which of the 2 outputs receive the data, and the other output would just be +5v which is the idle voltage anyway.

    However i'm having trouble getting it to work. I tried this as a first step:

    <img src="http://ii.net/~steven/files/pic2.jpg">

    But the data is not getting through. I'm using a Phillips HEF4071PB IC for the OR gates.

    Does anyone have any idea why this would not work?
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  2. #2
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Hmmm

    Those look like AND gates to me and I guess that is what you need to have if you want to use PORTB.6 as enable.

    Since you have GND to one side of the AND gate in your pricture.... GND AND anyvalue is still ZERO.

    Try to connect one side to 5V or use the PIC connection and set the pin accordingly.

    But if you use AND gates the output that is NOT enabled will be low. but if you want the opposite use a NAND.

    /me

  3. #3
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    They are OR gates.

    AND gates would be idle low so they wont work.
    NAND gates would be idle high, but the 1s and 0s of the serial transmission would be inverted, so that wont help.

    That is why I went with OR gates - idle high, non-inverted signal, logic 0 to enable, logic 1 to disable.

    It seemed like a perfect plan, so i don't know whats going wrong.
    Last edited by Kamikaze47; - 6th April 2008 at 13:31.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

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


    Did you find this post helpful? Yes | No

    Wink Kiss ...

    The obvious number is ...

    4081 AND Gates ...
    or
    4052 Triple 2 Input multiplexer

    or two series resistors, one to each addressed device ... and grounding ( or VCCing ) the signal ( past the resistor ! ) with another PIC pin , if NO transmission, and use the PIC pin as an input for transmission.

    may be too simple ?

    Alain
    Last edited by Acetronics2; - 6th April 2008 at 13:50.
    ************************************************** ***********************
    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
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    or two series resistors, one to each addressed device ... and grounding ( or VCCing ) the signal ( past the resistor ! ) with another PIC pin , if NO transmission, and use the PIC pin as an input for transmission.

    may be too simple ?
    I just did a few tests. This idea seems to be working. The signal would not get through the series resistor until i reduced the value to about 200 ohms. That means a 25mA draw whenever the signal is low. I guess that's not too bad.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  6. #6
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    The only thing that worries me is the possibility of reduced reliability due to the series resistors.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

Similar Threads

  1. Help changing CCP3 output pin
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th July 2008, 02:30
  2. Bit Banging input to output on PIC16F876A
    By Bronurstomp in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 26th June 2008, 19:50
  3. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46
  4. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 22:19
  5. HSEROUT Newbie question/problem
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 11th July 2006, 14:44

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