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.
I am of course over simplifying it...
You do need to have some ROM also.

If you have a 16bit address bus.. you need to make a decision about how much ROM you need and how much RAM you need.

Normally you want lots of ROM for running programs and storing fixed data, and a small amount of RAM for variables. Maybe you need a 50/50 split though since that is simpler to understand.

You get an SRAM chip 32k x 8bit
You get a ROM chip of the same size configuration.

The address lines get connected 1:1 so.. Connect A0 - A14 on the CPU to the same pins on both the ROM and the RAM.

Now you need to resolve a possible conflict here.. you can't have the two chips using the shared wires at the same time.. so your A15 line decides which of the ROM or RAM is active at any one time.

If A15 = HIGH means the address is in the range 0x8000 to 0xFFFF
otherwise it's LOW.

So the memory chips have a /CE or "active low" chip enable. If this is LOW the chip is enabled, otherwise it switches itself off (might aswell be not there).

Connect A15 to the RAM chip CE pin.
Then take the same A15 pin on the CPU and feed it into a NOT gate (inverter) this is fed into the ROM's CE pin so the rom is active when the ram is not. This makes the ROM active in the address range where the CPU starts executing. (i think this is 0xFFF0, remeber the CE pin is "active low")

You now just need to connect up the RD / WR lines and you almost there.
 
Last edited:
Ok, if you think the Z80 is useless, then what about the 8088? I have one of those. I got it out of a PC XT, along with that DRAM. How about his CPU? I like the sounds of that, but some of the pins are multipurpose. I think they are mulitplexed? I don't know, but a few of the address lines are for addressinga AND data? How does that work? I have the pinouts of the 8088 included.
 

Attachments

  • 8088.PNG
    8088.PNG
    15.1 KB · Views: 334
Ok, i know this is a lot to ask of you, kchriste, but i was wondering if you would draw a diagram of that.
What I've attached below is a drawing of a Z80 project that I did, you guessed it, way back in the 80's. The data and address lines on the left goto the Z80. The RD and WR lines on the left are the read and write lines from the Z80. The MREQ is a line from the Z80 that tells us that the address/data busses are being used for memory operations. It enables the 74LS138 when high and thus allows the memory chips to be addressed.
The Z80 also has a IORQ line that tells us that the address/data busses are being used IO. It is not shown on this diagram.

The memory map of this circuit is as follows:
ROM 0x0000 - 0x07FF
RAM1 0X0800 - 0X0FFF
RAM2 0X1000 - 0X17FF

When the Z80 is first powered up and reset, it will look for the first instruction at address 0x0000 which is in the ROM chip. What happens after that is up to what is programmed into the ROM.
Ok, if you think the Z80 is useless, then what about the 8088? I have one of those. I got it out of a PC XT, along with that DRAM. How about his CPU?
To use the Z80 or the 8088 both require you to have a method of burning an EEPROM. Back in the 80's I built my own using the Z80. I had to build a discrete logic data entry system to key the Hex codes into battery backed RAM (I didn't own a computer!). All opcodes where hand assembled and entered via hexkeypad. Boy did I have time on my hands or what? :) Then I wrote code and tested it. Finally I wrote the code to burn the EEPROM and crossed my fingers... Much easier today with a computer, compiler and burner! :D But if you don't have a burner you'll have to do what I did :eek: I don't recommend it. :rolleyes:
Much easier to start with a PIC or AVR type chip. They have everything on a single chip, cost less than $5, and just need 5V. A good place to start. Then if you want tackle the Z80, 8085, 8088, 8086, etc you will be ready.
 

Attachments

  • Z80-Mem.JPG
    Z80-Mem.JPG
    296.9 KB · Views: 327
Last edited:
What I've attached below is a drawing of a Z80 project that I did, you guessed it, way back in the 80's. The data and address lines on the left goto the Z80. The RD and WR lines on the left are the read and write lines from the Z80. The MREQ is a line from the Z80 that tells us that the address/data busses are being used for memory operations. It enables the 74LS138 when high and thus allows the memory chips to be addressed.
The Z80 also has a IORQ line that tells us that the address/data busses are being used IO. It is not shown on this diagram.

The memory map of this circuit is as follows:
ROM 0x0000 - 0x07FF
RAM1 0X0800 - 0X0FFF
RAM2 0X1000 - 0X17FF

When the Z80 is first powered up and reset, it will look for the first instruction at address 0x0000 which is in the ROM chip. What happens after that is up to what is programmed into the ROM.

Oh, man, that project looks awesome! I have a question; What is the syntax of the address "*x****"? What i mean, is, what do each one of the digits mean? Like the number before the the "x", and the 4 numbers that ar after. They are in HEX, right? And why is there 3 CE lines coming off of the circuit? Shouldn't all be connected? What is the purpose of the multiplexer?

To use the Z80 or the 8088 both require you to have a method of burning an EEPROM. Back in the 80's I built my own using the Z80. I had to build a discrete logic data entry system to key the Hex codes into battery backed RAM (I didn't own a computer!). All opcodes where hand assembled and entered via hexkeypad. Boy did I have time on my hands or what? Then I wrote code and tested it. Finally I wrote the code to burn the EEPROM and crossed my fingers... Much easier today with a computer, compiler and burner! But if you don't have a burner you'll have to do what I did I don't recommend it.
Much easier to start with a PIC or AVR type chip. They have everything on a single chip, cost less than $5, and just need 5V. A good place to start. Then if you want tackle the Z80, 8085, 8088, 8086, etc you will be ready.

Yes, i know i should start out with a PIC, but i just don't want to. I don't have a burner, or a compiler, but i would like to make one. I do have a BASIC stamp, and numerous laptops and desktops, so, i could make one. I was wondering if a serial EEPROM would work with a shift register? Or should i get a parallel EEPROM? Thanks for your help so far! :) :) :) ;)
 
I have a question; What is the syntax of the address "*x****"? What i mean, is, what do each one of the digits mean? Like the number before the the "x", and the 4 numbers that ar after. They are in HEX, right?
0x just means that the 4 digits following it are HEX digits. It is to avoid confusing a HEX number with decimal number if there is no A,B,C,D,E, OR F in it. Like the number 1234. Is it HEX or decimal? You know that 0x1234 is hex which is 4660 in decimal.
And why is there 3 CE lines coming off of the circuit? Shouldn't all be connected?
Besides being connected to the 3 memory chips and the 74LS138, they go off to another diagram on another page (There are 7 pages) to some special control circuitry. For this example we can ignore the special control circuitry.
What is the purpose of the multiplexer?
It is connected to the upper address lines to select the 3 memory chips like this:
When address lines 11-15 are low, Y0 of the 74LS138 goes low and activates the ROM.
When address lines 12-15 are low and 11 is high, Y1 of the 74LS138 goes low and activates RAM1.
When address lines 11 & 13-15 are low and 12 is high, Y2 of the 74LS138 goes low and activates the RAM2
Thus we get a memory map like this:
ROM 0x0000 - 0x07FF
RAM1 0X0800 - 0X0FFF
RAM2 0X1000 - 0X17FF
I was wondering if a serial EEPROM would work with a shift register? Or should i get a parallel EEPROM?
Parallel EEPROM is what the Z80 can read natively. It cannot use serial EEPROM for program memory.
Thanks for your help so far!
No problem! :)
 
0x just means that the 4 digits following it are HEX digits. It is to avoid confusing a HEX number with decimal number if there is no A,B,C,D,E, OR F in it. Like the number 1234. Is it HEX or decimal? You know that 0x1234 is hex which is 4660 in decimal.

Ok, that makes sence now!

Besides being connected to the 3 memory chips and the 74LS138, they go off to another diagram on another page (There are 7 pages) to some special control circuitry. For this example we can ignore the special control circuitry.

Quote:

Ahh, i see. But then how would i control the memories without that circuit? Also, are thoes SRAM or DRAM chips?

Parallel EEPROM is what the Z80 can read natively. It cannot use serial EEPROM for program memory.

Ok, i will order som parallel EEPROM's from Jameco when i get some money around. I might get a few other parts too, if i can mooch some money off my parrents after school starts. :)

No problem!
I hope you say that 20 more questions from now! :) I am hoping you will beable to help me through-out this whole process. I am hoping if i can learn from this experiance, then i might beable to figure out how CPU's and computers work. I just bought that book i talked about in another post a few days ago. The book is called "Computer archetecture and organization". I will read it cover to cover as soon as i get it. THANK YOU SO MUCH!
 
Ahh, i see. But then how would i control the memories without that circuit? Also, are thoes SRAM or DRAM chips?
It is actually the 74LS138 which controls the special control circuitry as well as the memories. ie: data flows out those lines to the other page, not in.
They are SRAM chips. I don't think you'll be able to find the same chips I used because they are really old and dated now. Who wants 2K RAM chips these days? :rolleyes: Just get a 32K one and a 32K EEPROM and you'll have the whole Z80 address space used up. Even those may be hard to find.
I just bought that book i talked about in another post a few days ago. The book is called "Computer archetecture and organization". I will read it cover to cover as soon as i get it
That'll answer alot of questions for you and probably generate another 20! :D
 
There is a much funnier, cheaper and more rewarding approach to computing.
Look at this link **broken link removed**
At a starting cost of $13 you will get a running computer to program before the first day is over. A few resistors and you can program it from your PC.
You will have a robot running before you get anything out of the Z80.
For the Z80 you will need an EPROM burner and eraser to write the boot code. So when you got this for all your savings you got to understand how to use it. Then you got to know the assembler for the Z80 to program it. I understand your desire for building a computer. But it's like climbing a mountain before you even have learned to walk if you do not have a whole bunch of experience.
 
Marks256 said:
Ok, if you think the Z80 is useless, then what about the 8088? I have one of those. I got it out of a PC XT, along with that DRAM. How about his CPU? I like the sounds of that, but some of the pins are multipurpose. I think they are mulitplexed? I don't know, but a few of the address lines are for addressinga AND data? How does that work? I have the pinouts of the 8088 included.

Exactly as the others, you have pins on the processor that select either ROM or RAM, you usually use latches in conjunction with those signals.

But the 8088 is another 'antique' processor, you're just making life extremely difficult for no good reason?.

And certainly with the simple beginner questions you're asking?, your chances of building a full blown 1970's/1980's computer seen VERY remote! :eek:
 
They are SRAM chips. I don't think you'll be able to find the same chips I used because they are really old and dated now. Who wants 2K RAM chips these days? Just get a 32K one and a 32K EEPROM and you'll have the whole Z80 address space used up. Even those may be hard to find.

Ok. I will buy a few of these things when i get a chance! :)

That'll answer alot of questions for you and probably generate another 20!

Most likely. You will be here, right? Lol. ;)

There is a much funnier, cheaper and more rewarding approach to computing.
Look at this link **broken link removed**
At a starting cost of $13 you will get a running computer to program before the first day is over. A few resistors and you can program it from your PC.
You will have a robot running before you get anything out of the Z80.
For the Z80 you will need an EPROM burner and eraser to write the boot code. So when you got this for all your savings you got to understand how to use it. Then you got to know the assembler for the Z80 to program it. I understand your desire for building a computer. But it's like climbing a mountain before you even have learned to walk if you do not have a whole bunch of experience.

Yes, i know a pic would be much funner and easier, BUT I JUST DON'T WANT TO! :) Ok, i just want to use the Z80, then an 8088, and then build my own CPU. I don't even own an Oscilloscope!

And certainly with the simple beginner questions you're asking?, your chances of building a full blown 1970's/1980's computer seen VERY remote!

We all must learn some how. I have chosen to learn with the z80. Actually, i think you were the one who suggested the Z80 TO ME! Yes, that i right, here is the quote;

I would suggest you start somewhat lower?, perhaps a 6502 or Z80?, something more back in the "build from scratch" days. An 8088 or 8086 probably isn't too bad?, but a 486 is asking for trouble!.

Yes, that is the bitter taste of hypocrisy!
 
Marks256 said:
We all must learn some how. I have chosen to learn with the z80. Actually, i think you were the one who suggested the Z80 TO ME!

On the basis that you were aiming FAR too high!, but I didn't realise at the time that a 30 year old Z80 was also far too high!.

Anyway, I've scanned the EZ80 circuit for you, it should (hopefully) allow you to see how a simple Z80 circuit looks, and stop all your silly questions relating to it? :p :p :p
 

Attachments

  • Z80_up.gif
    Z80_up.gif
    339.8 KB · Views: 206
and stop all your silly questions relating to it?
Not a chance! :) Aww c'mon Nigel, i'm just givin' ya a hard time!

Anyway, I've scanned the EZ80 circuit for you, it should (hopefully) allow you to see how a simple Z80 circuit looks, and stop all your silly questions relating to it?

Ooh! Thank you so much! I really appreciate it!


I just ran into another slight problem. I found nine sticks of RAM in an old motherboard. From what i can read on them, i can tell that they are 256k. The problem is; I can't find any data on them. :( The part number is as follows; UM61M256K-15. The reason the "M" is in bold is because it is on the chip too. They are in a 28 DIP package. Does anyone have any data on these? I suppose if you think it would be worth the effort, i will post a topic in the datasheets request forum. Thanks!
 
Marks256 said:
Just as the title asks; what is multiplexing? I have the slightest idea, but i don't understand. Thanks.

It is combining multible lines into one. The multiplexer samples each line at a rate faster then that rate that the lines change. It then sends the value of each line in rapid susession.

Basically, it sends a more then one thing at a time down a wire.
 
It is combining multible lines into one. The multiplexer samples each line at a rate faster then that rate that the lines change. It then sends the value of each line in rapid susession.

Basically, it sends a more then one thing at a time down a wire.

I knew that since the second post or so. Thanks for you contribution, though! :cool:
 
Afew facts and thoughts...

Marks256 said:
I just ran into another slight problem. I found nine sticks of RAM in an old motherboard. From what i can read on them, i can tell that they are 256k. The problem is; I can't find any data on them. :( The part number is as follows; UM61M256K-15. The reason the "M" is in bold is because it is on the chip too. They are in a 28 DIP package. Does anyone have any data on these? I suppose if you think it would be worth the effort, i will post a topic in the datasheets request forum. Thanks!

Couldn't find a data sheet for these using Google (not conveniently, anyways). But, if dusty memory serves me correctly, the -61- series are dynamic RAM, 256kbits per chip. Eight of these hold the byte-wide data. The ninth chip held the 'parity' bit, which is how early computers verified data integrity.

Ah, yes, Nigel's Z80 schematic was a nostalgic trip down memory lane. Good ole Z80! Which, by the way, were designed to refresh dynamic RAMs automatically. As long as they only needed 7 bits refresh. I worked in a place that unknowlingly ordered 64kbit DRAM that needed 8 bit refresh. Yessss, that WAS an interesting week in the Production Department, you bet!

The way the multiplexed lines on the 8088 (or most any Intel processor)work is, the lower eight address lines (A0 - A7) are put out of the AD0 -AD7 pins first. After a suitable time for these to stabilize, the processor puts out an 'ALE' signal which latches these lines into an octal latch, usually a 74xx373. The same eight pins are then used to write or read data, D0 -D7. The upper eight address lines, A8 - AF, just get put out on their own pins, no tricks.

So, after you lay down the circuitry and purchase a PC to plug an expensive PROM burner into it, you have to pick an OS (Operating System) and the compiler to write it in. Any thoughts on which of these you will eventually use?
I suggest you find forums that support these two chips (they're out there, I believe) and start discussing your plans with them. They will have a wealth of experience to share with you. Keep coming back here for/to help, and let us know how you're making out as you progress.

And have fun doing it!
kenjj
 
Hmm, i never thought about finding a Z80 forum! :) I will look into that. Thanks for the description on how an 8088 does that. That makes A LOT of sense! I finally get that. I didn't know that it was the processor's job to refresh memory? I thought DRAM had internal refreshing? Oh well. Thanks!

So, after you lay down the circuitry and purchase a PC to plug an expensive PROM burner into it, you have to pick an OS (Operating System) and the compiler to write it in. Any thoughts on which of these you will eventually use?
Aah, i am not sure what you mean? Do you mean what type of computer i will program the BOOT ROM on? I don't know. I have a i480 Laptop running DOS 6.0 from a floppy, or a TI Travelmate 6030 with Win98 on it, and the same kind with DOS on it. Or a Gateway with XP Home on it, or my desktop running XP PRO on it. I have enough computers, but what would you suggest for a compiler?
 
Last edited:
That'll answer alot of questions for you and probably generate another 20!
Most likely. You will be here, right? Lol.
I am around mostly during the week. I do go camping alot on the weekends so I may take a few days to respond to posts then. Not to mention my 1.5 weeks holiday at the start of September. :cool:
Yes, i know a pic would be much funner and easier, BUT I JUST DON'T WANT TO! Ok, i just want to use the Z80, then an 8088, and then build my own CPU. I don't even own an Oscilloscope!
Well, I didn't have a scope or even a computer then either... It can be done without these tools if you are very carefull in assembling your circuit.
Anyway, I've scanned the EZ80 circuit for you, it should (hopefully) allow you to see how a simple Z80 circuit looks, and stop all your silly questions relating to it?
Nigel, that is a nasty trick they use to scan the Keyboard Rows via the upper address lines! :eek: First I thought they were just using the IO addressing to scan the rows, and then I realized that IO transactions only involve the lower 8bits of the address buss.... Hmmm... Must be some undocumented function. Ahhh! I figured it out. They are using the Memory mapped IO probably with the LD (0x????), A instuction. You made me dig out my old dusty hardcover paper Z80 manual. :rolleyes: Now look what you've done!:D
 
kchriste said:
Nigel, that is a nasty trick they use to scan the Keyboard Rows via the upper address lines! :eek: First I thought they were just using the IO addressing to scan the rows, and then I realized that IO transactions only involve the lower 8bits of the address buss.... Hmmm... Must be some undocumented function. Ahhh! I figured it out. They are using the Memory mapped IO probably with the LD (0x????), A instuction. You made me dig out my old dusty hardcover paper Z80 manual. :rolleyes: Now look what you've done!:D

I've had the book for years, I've often toyed with building it to play with Z80 (I was a 6502 user) - but somehow never got around to it!. That's the basic circuit, there are other parts in the book, along with detailed descriptions of how it all works - plus the required source code, and various projects and things. It's really a nice little book!.
 
Ok, i just want to get this straight now. I have been looking at Z80 and other schematics, and found something that disturbed me. It looks to me as if the software does all of the work!? Is this true? I mean, the hardware is just directly hooked into some I/O's, and no other controlling hardware! Is this fact, or am i out-of-it?
So, if i am correct, memory isn't really necessary? I know it is needed to store variables, data, and crap like that, but it isn't mandatory? So memory is treated just like other hardware? You address it, and then send data to it, and leave the rest to the chip? Aaah, this is all making so much sense now! Serious! I finally understand how a computer works! At a basic level, of course, but i am no longer lost.
So, if i needed to send something to memory, i would define an address in the software, and then program it to send it to memory? Hmm, sound very in-efficient. But, then again, i have only had a little ASM experience, so it might be very efficient. Thanks guys!

ILLEGAL REQUEST DELETED BY MODERATOR
 
Last edited by a moderator:
Marks256 said:
Ok, i just want to get this straight now. I have been looking at Z80 and other schematics, and found something that disturbed me. It looks to me as if the software does all of the work!? Is this true? I mean, the hardware is just directly hooked into some I/O's, and no other controlling hardware! Is this fact, or am i out-of-it?
So, if i am correct, memory isn't really necessary? I know it is needed to store variables, data, and crap like that, but it isn't mandatory?

'Memory' is absolutely essential - that's where the program resides, under certain limited circumstances you can get away with just ROM and no RAM (although I couldn't comment on the Z80). But this would SERIOUSLY cripple any programs you tried to write - something like programing with all your limbs amputated, your ears cut off, and your eyes gouged out.

You are quite right that the software does all the work, but the software needs somewhere to reside, and something to work with.
 
Status
Not open for further replies.

Latest threads

Back
Top