1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

What is multiplexing?

Discussion in 'General Electronics Chat' started by Marks256, Aug 7, 2006.

  1. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    Just as the title asks; what is multiplexing? I have the slightest idea, but i don't understand. Thanks.
     
  2. jrz126

    jrz126 Active Member

    Joined:
    Sep 17, 2004
    Messages:
    1,189
    Likes:
    5
    Location:
    Erie, PA - USA
    Multiplexing for an LED display?

    http://www.myplace.nu/avr/countermeasures/cm_sch.gif

    The way it works is, there is a common connection for each segment in the display, each segment in 1 digit is referred to as a,b,c,d,e,f,g and dp for the decimal. (driven by pins D0-D7 in the schematic).

    There is an enable signal (at the top of the LED displays) for each digit. By enabling each digit one at a time, and changing the 'D' pins at the same time, you can display a different number on each display. So if you wanted to display 123456 on the display, you would enable LED1 and set the 'D' pins to display a 1, then disable LED1 and enable LED2 and set the D pins to display a 2.

    So each digit is only turned on for 1/6th of the time. By switching between the LEDs fast enough you cant even tell that they are being turned on and off. (about 20-30 times a second for the human eye). Also, the LEDs should be driven with alittle more current than the normal rating, since they will only be turned on 1/6th of the time, they will be dimmer than normal.

    Hope this helps...
     
  3. _nox_

    _nox_ New Member

    Joined:
    Jul 28, 2006
    Messages:
    158
    Likes:
    0
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. lord loh.

    lord loh. Member

    Joined:
    Jan 7, 2005
    Messages:
    634
    Likes:
    0
    Location:
    Lubbock, TX

    in general sense, it is making use an object for multiple tasks...

    1. Multiplexing a 7 segment display.
    2. Multiplexing od the Data bus for address in 8085
    3. multiplexing the T1 line for 24 telephone channels.
     
  6. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,668
    Likes:
    64
    Multiplexing is a circuit that lets you use one input pin and lets you switch it between the outputs of several devices. So you can use one pin on a uC to monitor several different things one at a time.

    THat circuit, however, can be used for other more novel things because of the way it works (like truth tables and stuff).
     
  7. StopGo

    StopGo New Member

    Joined:
    May 21, 2006
    Messages:
    75
    Likes:
    0
    Location:
    UK
    Could also be like a multiplexed bus where "address" and "data" flow along the same wires but at different times.
     
  8. JimB

    JimB Super Moderator Most Helpful Member

    Joined:
    Sep 11, 2004
    Messages:
    6,329
    Likes:
    585
    Location:
    Peterhead, Scotland
    ONLINE
    My definition:

    Passing many signals along one communication channel, all at the same time, or, one after the other.

    Multiplexing takes many forms depending on where and how it is implemented.

    JimB
     
  9. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    No, i meant for CPU's and RAM and what not. It did, however, explain to me how i have to use my multiplexing LED display! Thanks! Now i can finally use the bugger. :)


    I did search google. All it told me was the fact that it takes multiple lines of data, and then transmits it over one line. No explanation, no help at all. So i asked here. But there was a link at the bottom that helped a little, so thanks anyways.


    Yes, this is what i am referring to, with the addition of CPUs. So, if a CPU has one pin designated for two functions, then does it already have a built in multiplexer? Then how does it use them? Like on the 8088 processor, how does it know when to use the one or the other pin function? Or do they switch between them every clock cycle? I am so confused.
    If the MUX outputs one of the data lines, how does the destination of the data know what bit of data it is receiving?
     
  10. ThermalRunaway

    ThermalRunaway New Member

    Joined:
    Apr 9, 2005
    Messages:
    895
    Likes:
    4
    Location:
    South Wales, UK
    You can use most multiplexer ICs backwards as well. So, rather than one input pin being switched between several devices, you can have the outputs of several devices switched to one output pin. To use a multiplexer IC you normally have an address bus which selects which pin will be connected to the common line. So, for example, if you had a 3-bit Multiplexer IC you could switch the common line between 8 possible outputs (or inputs depending on which way around you use it). To select any of the 8 possible outputs you simply put a binary number on the chip's address bus which corresponds to the pin number you want to select.

    Brian
     
  11. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    Ok, now this brings me to another question. How does addressing work? I know it is sort of like using a mailing address to someones home, but how is the address assigned to certain chip? It is built in? Like, let's say that i have some DRAM, and a few other IC's that have address buses, how do i assign the addresses to the chips? I have about 30 DIP style DRAM chips, that i am just itching to use, but i don't quite know how to address yet.
     
  12. AllanBertelsen

    AllanBertelsen New Member

    Joined:
    Apr 5, 2006
    Messages:
    89
    Likes:
    0
    Location:
    Denmark
    Get the datasheets

    Find the datasheets for the chips. Use http://www.datasheetcatalog.com for example. The data sheets are usually very specific about these matters. There can be differences from chip to chip, and you will only find these differences by reading the datasheets.
     
  13. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    I have already got the datasheets for them. I was wondering if someone could leave a quick briefe/generic description on how this works?

     
  14. kchriste

    kchriste New Member Forum Supporter

    Joined:
    Jul 23, 2006
    Messages:
    3,677
    Likes:
    47
    Location:
    Victoria BC, Canada
    No, lets say you have some SRAM instead. Way easier to explain with going into refresh cicuitry etc....
    So, you have 8 (Not 30 to keep it simple) SRAM chips. You would parallel the address and data lines on all 8 chips and connect them to the CPU. Lets say the CPU has a 16bit address bus but your SRAM chips only have 13 address lines. You would take a 74HC138 demultiplexer and feed the unused CPU upper address lines into it. The 8 outputs would select each SRAM chips "chip enable line" so that only one SRAM would be accessed for each 0x1FFF block of memory from 0x0000 to 0xFFFF.
    SRAM1 = 0x0000 - 0x1FFF
    SRAM2 = 0x2000 - 0x3FFF
    SRAM3 = 0x4000 - 0x5FFF
    .
    ..
    ...
    SRAM8= 0xE000 - 0xFFFF
     
  15. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    Ok, i know this is a lot to ask of you, kchriste, but i was wondering if you would draw a diagram of that. I can see what you are talking about, but i cant quit visualise it. I have a Z80 CPU, i have the pinouts attached. I can visualise the RAM setup, but not with the multiplexer. Also, what if there were more things connected to the address bus? Such as I/O things. Would i use a multiplexer? I think this is starting to make sense! Could you please give me a little more information(and maybe a few diagrams)?

    Also, i thought that DRAM had a built in refreshing circuits? Here is the part number for the DRAM i have; KM4164B.
     

    Attached Files:

    • z80.PNG
      z80.PNG
      File size:
      25 KB
      Views:
      229
    Last edited: Aug 9, 2006
  16. AllanBertelsen

    AllanBertelsen New Member

    Joined:
    Apr 5, 2006
    Messages:
    89
    Likes:
    0
    Location:
    Denmark
    Last edited: Aug 10, 2006
  17. StopGo

    StopGo New Member

    Joined:
    May 21, 2006
    Messages:
    75
    Likes:
    0
    Location:
    UK
    Are you sure you are not getting badly mixed up here ?

    DRAM chips connected directly to a Z80 ? Sounds unlikley !

    You should be using SRAM chips ? No ?

    Wow.. maybe I should read that link !!
     
  18. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    Thanks AllanBertelsen, but i am just getting lost more and more. I get how to hook up the RAM, but i don't get the other things. What do you mean "You can only address one bit at a time"? Do you mean that the RAM is serial, instead of parallel? I am SO lost! Please don't give up on me yet!
    I don't understand why i need 1 data line to each of the RAMs? Here is a list of things i don't get;
    1. How does the initial command get set in the CPU? (from the ROM to the CPU), there is no commands in the cpu to do this, so what happens? I think it is called bootstrap?
    2. If all the address lines are used on the RAM, then how do you get more devices on the CPU?

    These are all the questions i can think up right now. I am going to apply power to the CPU, and see what happens. I will put a few LED's on the address lines, and then see what they display. PLEASE HELP! I just can't completely visualize the "Big picture".
     
  19. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,235
    Likes:
    641
    Location:
    Derbyshire, UK
    Some RAN chips were only one bit wide, so you needed eight of them (one for each bit) in order to use them.

    No, it's called programming a ROM (or EPROM) using an external programmer, then plugging it in to the Z80.

    By 'chip select' lines - each set of devices is mapped to a different area of memory.

    If you're playing with a Z80?, you're so wasting your time!.
     
  20. StopGo

    StopGo New Member

    Joined:
    May 21, 2006
    Messages:
    75
    Likes:
    0
    Location:
    UK
    1. CPU will fetch it's first instruction from a fixed known address. Its your job as the hardware designer to make sure that there is ROM in that place and that the program stored in it makes sense.

    2. by using I/O address space, or by using banking / paging or other methods (for example serial ram).

    Those KM4164B chips you have are really totally the wrong thing to try and glue onto your Z80.

    The link posted by Allan is a really ingenious use of standard off the shelf logic, thrown together to make what amounts to a DRAM controller circuit.

    But really its going out of your way to make things hard. The Z80 can plug straight into a nice simple SRAM chip. Just connect A0-15 and D0-D7, RD WR etc...

    Job's done.
     
  21. AllanBertelsen

    AllanBertelsen New Member

    Joined:
    Apr 5, 2006
    Messages:
    89
    Likes:
    0
    Location:
    Denmark
    Z80 is not an easy thing. You might have to use latches not to draw to much current. This guy did a project:
    http://www.hanssummers.com/computers/z80/index.htm
    The old sinclair ZX80 was a Z80 computer. You will be able to google circuits of this. An exaxple could be http://home.micros.users.btopenworld.com/zx80/zx80.html
    You really got to study and understand the datasheets.
    If you never have worked with cpu's then do not start with Z80. Some of the newer mcu's are much easier to understand and use. A really easy start would be PICAXE.
     

Share This Page