Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

8 bit switch? does it exist?

  1. Jul 5, 2005 #1
    i have 7 data lines coming out from a microcontroller... i need the 8th one to control where its going to, either to a 7 input on a RAM chip, or a 7 input on an LCD display.
    basically i think i'm looking for a 7/8 bit switch... does one exist? can anyone supply me with the name of such a switch? or the part number? or the datasheet?
    thanks in advance
     
  2. jcsd
  3. Jul 5, 2005 #2

    dlgoff

    User Avatar
    Science Advisor
    Gold Member

    You could use a couple of CD4016 (or CD4066) quad bilateral switches.

    Regards
     
  4. Jul 5, 2005 #3

    berkeman

    User Avatar

    Staff: Mentor

    Since they are digital lines, you should solve this digitally. You can use a couple '245 Octal Bus Transceivers and control which direction(s) get selected with your 8th bit, for example.

    Are these lines bidirectional? You need to define the path selection options and the direction selection options, and then just work out the logic to do the routing. You could use discrete NAND gates for that matter, or a PAL to do this function.
     
  5. Jul 5, 2005 #4

    dlgoff

    User Avatar
    Science Advisor
    Gold Member

    He said he wanted a switch. 4016s are switches for digital lines.
    Sounds a bit complicated for what he wants to do.

    Regards
     
  6. Jul 5, 2005 #5

    berkeman

    User Avatar

    Staff: Mentor

    Actually, my databook calls them digitally controlled analog switches, which is what they are architecturally. I just wanted him to think more in the context of the task that he was talking about. If I gave him an interview question to mux his uC's lines between a RAM and an LCD controller, and he used analog switches to do it, he'd fail the interview. The way you route digital lines around is with digital logic and muxes, not with analog switches. And I mentioned PALs to maybe get him to poke around the net some to learn what PALs are used for, and why that would be how he would do it in the real world. Even at a highschool level, PALs are very handy, and PAL programmers are cheap.
     
  7. Jul 5, 2005 #6
    Most IC's come with enable pins. Why not just connect the lines up to both devices and use the 8th bit as an address line???

    What LCD and RAM are you using? What's the function of the circuit? What other devices have spare cells in them?
     
  8. Jul 5, 2005 #7
    ok, well i'm about to check up on the 4016, but i've checked out the 4066, and that's just a straight on/off switch. i want a switch that will just change the data path from the uC to the SRAM or to the LCD. kinda like the track change for a railway i would imagine. and the 4066 is unsuitable for that
    i'v found something called a "16to8 bit multiplexing/demultiplexing bus switch" which looks perfect... but i was wondering if there was another way, because that chip only seems to be made by one manufacturer... and i cannot get hold of that exact one. maybe other companies make it? i dont know, i havent been able to find any though :(
     
  9. Jul 5, 2005 #8
    in reply to delta, the enable pins are being used for a completely different operation. i cant touch them. i have 7 input pins on both the LCD and the SRAM... and 8 output of the port of the uC. therefore i have an extra line that i can use from the uC to control the 'switch' i'm looking for :/
     
  10. Jul 5, 2005 #9
    Use the 8th output to switch between the LCD and the RAM. Ram and LCDs have an enable. Split the 8th bit into two lines. Invert one of the lines. Use the inverted line to enable one of the devices and the noninverted line to enable the other---this is assuming both devices use the same logic level to enable them which is not always the case. A single 7404(or cmos equiv if you wnat) IC should do the trick. You are multiplexing a bus by doing this and would be well served to learn what MUX'ing is and how best to accomplish it.

    Good luck.
     
  11. Jul 5, 2005 #10
    basically.. this is EXACTLY what i'm looking for...
    http://www.pericom.com/pdf/datasheets/PI5C3390.pdf
    but, is there anything similar to that, because i cannot get my hands on one of those :( it explains what i'm after. look at the block diagram it gives. i just need to connect the /BEN & /AEN lines together with a not on the one and connect that to my 8th bit.
    anyone know of anything similar to this? like a simple IC? or if there's another manufacturer that makes this chip ?
     
  12. Jul 5, 2005 #11
    Read my post above.
     
  13. Jul 5, 2005 #12
    do you have any website/info on how to implement an 8:16 multiplexer then? and what parts to use?
     
  14. Jul 5, 2005 #13
    my problem here, faust9, is that i do not have an enable pin on the LCD. it is one of the 7 that need to pass through the MUX. and it cannot be linked directly otherwise a signal passing to the SRAM that includes that bit could accidentally intefere with the LCD and sink current or interfere with my address that is to be written to the SRAM.

    i'v found the PI5C3390 and the IDTQS3390, however it seems the suppliers in this country do not have those chips. also, those are both 16-8 MUX bus switches... but i need an 8-16 MUX bus switch. any ideas on how to create one from lesser components?
     
  15. Jul 5, 2005 #14
    I explained it above. You don't need an 8:16 MUX to do what you've asked about.

    You only need an inverter on the 8th bit (the free bit you mentioned a few posts back that you wanted to use as a switch). Send the 8th bit to one device directly and send the 8th bit through an inverter (74hc04) to the other device. When the 8th bit goes high one device will be enabled and the other disabled. When the 8th bit goes low the exact opposite will occure. If you only need 7 data lines from an 8 bit bus and want to access two device then just use an inverter. A PAL would be the best solution because LCD's usually have a limited instruction set so the full 7bit bus uses addres space not needed by the LCD which could be used for additional ram/rom but the easy solution is an inverter on the 8th bit. Google is your friend. Google MUX or multiplexor.

    Good luck.

    [edit] just saw the post above. Use a latch between the LCD and the data bus and the 8th bit to 'latch' the lcd data in. This is how old addr:data buses used to be MUX'ed.
     
    Last edited: Jul 5, 2005
  16. Jul 5, 2005 #15
    How do you not have an enable available for your RAm or LCD? Your system will not work unless you have some way of telling the RAM/LCD when to read data and when to write data.
     
  17. Jul 5, 2005 #16

    berkeman

    User Avatar

    Staff: Mentor

    It's a write-only RAM?
     
  18. Jul 5, 2005 #17
    I can only recommend you continue searching for an 16-8 mux supplier.

    Failing that you're left with getting a couple of buffer chips. One for the LCD and one for RAM, both connecting to the data bus from the microcontroller. The 8th bit would enable either one buffer or the other.
     
  19. Jul 5, 2005 #18

    dlgoff

    User Avatar
    Science Advisor
    Gold Member

    From the National Semiconductor data book: "The CD4016BM/CD4014BC is a quad bilateral switch intended for the transmission or multiplexing of analog or digital signals."

    Try it. You'll like it. It's cheap too.

    With four you can do exactly what you're wanting.

    Regards

    edit: spelling
     
    Last edited: Jul 5, 2005
  20. Jul 5, 2005 #19

    dlgoff

    User Avatar
    Science Advisor
    Gold Member

    Maybe but he would be switching data by now.

    Regards
     
  21. Jul 6, 2005 #20
    mmkay.
    firstly, the RAM enable pin is using a different port, and the LCD is configured in a 4-bit manner such that there is no set 'enable' pin, the 'enable' pin is to be high in the wait state where it transfers info on the input pins to the internal buffer register, then on the low, it outputs that internal buffer register to the display. therefore even if the LCD is in the 'off' mode, the pins are still connected and still receiving data, and might still sink current which would interfere with the address that is to be written to the SRAM. that is why the so-called 'simple' solution is not applicable :( (in this case)

    yes, i'm still a student, but no, this is not part of any project or anything! i'm helping my lecturer to build expansion boards to be used in 3rd year practical lab work on microcontrollers... lecturer is too busy with adminish stuff like marking exams and such.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: 8 bit switch? does it exist?
Loading...