Continue to Site

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.

  • 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.

What is multiplexing?

Status
Not open for further replies.

Marks256

New Member
Just as the title asks; what is multiplexing? I have the slightest idea, but i don't understand. Thanks.
 
Multiplexing for an LED display?

**broken link removed**

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...
 
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.
 
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).
 
Could also be like a multiplexed bus where "address" and "data" flow along the same wires but at different times.
 
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
 
Multiplexing for an LED display?

**broken link removed**

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...

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.


Could also be like a multiplexed bus where "address" and "data" flow along the same wires but at different times.

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?
 
dknguyen said:
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).

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
 
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.
 
I have already got the datasheets for them. I was wondering if someone could leave a quick briefe/generic description on how this works?

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.
 
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.
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
 
No, lets say you have some SRAM instead. Way easier to explain with going into refresh circuitry 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

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.
 

Attachments

  • z80.PNG
    z80.PNG
    25 KB · Views: 317
Last edited:
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 !!
 
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".
 
Marks256 said:
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;

Some RAN chips were only one bit wide, so you needed eight of them (one for each bit) in order to use them.

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?

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

2. If all the address lines are used on the RAM, then how do you get more devices on the CPU?

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

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".

If you're playing with a Z80?, you're so wasting your time!.
 
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.
 
Z80 is not an easy thing. You might have to use latches not to draw to much current. This guy did a project:
**broken link removed**
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.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top