SEROUT being unreliable


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kamikaze47 View Post
    Ok, i'm looking at the best way of multiplexing the hardware USART's output and this is what I have come up with.
    - Use IC with 4 OR gates (only using 2, but they come with 4).
    - Gate 1: Input1=USART, Input2=A PIC I/O Pin, Output=One of the serial outputs
    - Gate 2: Input1=USART, Input2=Another PIC I/O Pin, Output=Another serial output
    - Use software so that only 1 of the I/O pins is ever high at a time
    I know I could use a NOT gate which would allow me to use only 1 I/O Pin, but i'd rather use another I/O pin than add another IC.
    If anyone can see how this can be done better (and still only using the PIC + 1 IC), feel free to share.
    That's exactly what I was talking about. If you wanted to get rid of the 7402 (?), you could easily do the same thing with a couple of 2N2222's.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    That's exactly what I was talking about. If you wanted to get rid of the 7402 (?), you could easily do the same thing with a couple of 2N2222's.
    I know how to use a transistor as an AND gate, but not sure how to do an OR. I need it to be OR because the output should be high when that output is not selected.

    I've been trying to work out if I want TTL or CMOS for my OR gates. Ive been looking at the data sheets, but cant really see which would be better for this application.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kamikaze47 View Post
    I know how to use a transistor as an AND gate, but not sure how to do an OR. I need it to be OR because the output should be high when that output is not selected.
    Then use the transistor it 'backwards'...(not backwards like C and E are reversed, just use inverted logic on it)
    The output that is 'selected' isn't really 'selected'...it's 'unselected'...that way it idles high.
    The other output that is actually 'selected' is really 'unselected'...passing the data thru.

    If you use TTL, you'll be 'limited' to TTL voltages and switching levels (.8v low - 2.4v high roughly)
    If you use CMOS, you'll be 'unlimited' to roughly 1/3 and 2/3 Vcc for your logic levels.
    Depends on what you're driving at the outputs and what you're driving it with at the inputs.

    But....your run of the mill 2N2222 will open up all sorts of options as far as voltage levels go. I suppose one of the problems with a transistor MIGHT be switching speeds. Go to fast, and the transistor won't switch fast enough (Early effect, Miller effect, etc). Sometimes it can be 'fixed' with a 'speedup' cap across base and emitter, sometimes not.

    Again, depends on the final application.

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. Serout to serial servo
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 12th August 2009, 16:46
  3. Advice-scrutiny for my serial controller
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th December 2008, 17:11
  4. Keypad unlock (as in garage door possibly)
    By Fred in forum Code Examples
    Replies: 5
    Last Post: - 2nd April 2006, 04:26
  5. Replies: 11
    Last Post: - 13th July 2005, 19:26

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