+ Reply to Thread
Page 6 of 8
First ... 2 3 4 5 6 7 8 Last
Results 76 to 90 of 116

Thread: What is multiplexing?

  1. #76
    kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent
    Join Date
    Jul 2006
    Location
    Victoria BC, Canada
    Posts
    3,681

    Default

    The only thing i still don't understand yet, is how to select memory or i/o. Should there be another mux/demux? Would i connect the enable lines of the demux's up to the to the MemRQ and the IORQ?
    Yes, exactly like that; connect the enable line of one demux up to the to the MemRQ and the enable line of the other to the IORQ line from the Z80.
    was wondering, is it possible to add a DIP switch to the data lines, and then hard wire a program?
    It is possible to use a diode matrix and a demux wired to the lower address lines to create your own ROM, but that would be very painfull to do. You can also play around a bit by rewiring some of the resistors on the databus to +5V instead of Gnd. You'll see a change on the address LEDs flash pattern.

    Sounds like it might be fun. How would i figure out what the commands are in binary?
    This is one site that looks easy to use:
    http://www.cantrell.org.uk/david/tec...re/z80index.pl
    This site gives a brief decription of each instruction:
    http://fms.komkon.org/comp/CPUs/z80.txt
    Last edited by kchriste; 18th August 2006 at 03:25 AM.
    Inside every little problem, is a big problem trying to get out.


  2. #77
    Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent
    Join Date
    Jul 2006
    Location
    Minnesota, USA
    Posts
    2,390

    Default

    Awesome! Ok, tomorrow after i get home, i will draw up a schematic of what i think should work. I am hopping you can tell me if it is correct or not.

    Also, i have been thinking about putting the data on the EEPROM. Is there any hardware and software out there to do all of this for me? I could make the stuff on my own, but i don't want this to be the reason i give up. I don't want to buy anything, so when i say hardware, i mean the schematics. Thanks kchriste!

    Oh, i almost forgot. I am getting the software that is for my camera this weekend, so i will be able to post pictures! (They aren't very hires, but they may give a good idea )

  3. #78
    Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent
    Join Date
    Jul 2006
    Location
    Minnesota, USA
    Posts
    2,390

    Default

    Check this link out. It requires an XML viewer, but i think it is my answered prayer. (although i don't believe in God, it is just a figure of speech. )

    http://www.ticalc.org/pub/text/z80/z80.zip

    Am i correct when i say that is what the commands are in binary? The tops of the charts, they say something like "00+X". I know that the X means add the number of the command in the column. Is this true? If it is, i just might crap my pants! Am i correct, or am dreaming. I am pretty damn sure i am right, because i checked, and 00 is in fact a NOP, and it takes EXACTALLY 4 clocking cycles to finish the command!

    Tomorrow my friend, is going to come over. I am going to build a circuit to manually program this thing! OOOh! I am so excited! So, there are exactly 256 commands available. Aaah, this is AWESOME!

    I owe much of it to you, kchriste. Thank you! You didn't give up on me, AND I FINALLY UNDERSTAND IT! I don't think i know this on a basic level, anymore. I think i have reached MODERATE LEVEL! Thank you SO MUCH! Man, electronics are awesome! Especially when they work like you think they should! Thank you, thank you, thank you! Now that i know the binary commands, i think i should be able to make my own compiler! :cool:

    Oooh, i already have ideas! Tomorrow is going to be an interesting day!
    Last edited by Marks256; 12th January 2008 at 05:13 PM.

  4. #79
    kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent
    Join Date
    Jul 2006
    Location
    Victoria BC, Canada
    Posts
    3,681

    Default

    Am i correct when i say that is what the commands are in binary? The tops of the charts, they say something like "00+X". I know that the X means add the number of the command in the column. Is this true? If it is, i just might crap my pants!
    Ok, are you sitting down? On the toilet? Ready?
    .
    ..
    ...
    ....
    ......
    YES! It's true!

    I owe much of it to you, kchriste. Thank you! You didn't give up on me, AND I FINALLY UNDERSTAND IT!
    And now, you've gone and made my day. Thank you!
    Inside every little problem, is a big problem trying to get out.

  5. #80
    Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent
    Join Date
    Jul 2006
    Location
    Minnesota, USA
    Posts
    2,390

    Default

    *Sigh* We built a VERY nice switch board, but i ran out of jumper wires, hex inverters, and resistors. I am going to order the components tomorrow(Monday). This is what i have on my list so-far(All prices are in US currency);

    1. 16k EEPROM...........................................$ 2.29
    2. 16k SRAM.............................................. $1.79
    3. 100 LEDs (assorted)................................$6.95
    4. 200 Resistors(assorted.............................$5. 49
    5. 100 POTs (100Ω to 5MΩ).........................$6.95

    There is most likely a few more thing i will get, but i am looking through the catalog right now.

  6. #81
    Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent
    Join Date
    Jul 2006
    Location
    Minnesota, USA
    Posts
    2,390

    Default

    Ok, i got the software for that camera. Here are some PICS. Oh, sorry they are so low in resolution. Once i get the thing finished, i will borrow a nice digital camera from a friend, and then take some High-Res pictures. What do you think?






  7. #82
    kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent
    Join Date
    Jul 2006
    Location
    Victoria BC, Canada
    Posts
    3,681

    Default

    What do you think?
    Looks like you have plenty of room on that breadboard to prototype your entire Z80 project. Make sure you put plenty of 0.1uF bypass caps on the power rails. Sprinkle some around a bit.
    In the last picture, what is the chip covered by the Q in MemRQ doing?
    Inside every little problem, is a big problem trying to get out.

  8. #83
    Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent
    Join Date
    Jul 2006
    Location
    Minnesota, USA
    Posts
    2,390

    Default

    Sorry i haven't posted for a few days, my router went down, and it took the whole network with it. Anywho, that chip is a 4049 Hex Inverter. I was getting ready to build my switchboard circuit. I do have a bunch of 104 CAPs on the chips, and i have a 1uF on the z80. I got my order sent out to Jameco, here is all the stuff i got;

    1. 16K EEPROM
    2. 16K SRAM
    3. 100 LEDs
    3. 200 1/2 watt, and 1/4 watt resistors
    4. 100 POTS
    5. 100 feet of 22awg hookup wire (for use as jumper wires)
    6. 200 ceramic-disk CAPs

    I think that should be enough for now. Electrolytic are easy to desolder, and normally have long enough leads to connect to the breadboard.

    I did get that switch circuit done last night. I started putting commands in, and then manually clocking it, and i ran into a problem. How do you get numbers into the commands? What i mean, is, if need to add reg(A), and reg(B), then how do i load number into A and B, if the commands are static?

    I am going to assume that the command "ADD A, n" means "add reg(a) and {this number}", correct? If i am right, then how do if define the variable "n"? Since the opcode for "ADD A, n" is 11000110, let's say i want to add "A" with "5". How would i tell the cpu that n=11000110?

    Also, i noticed something else that really disturbs me. A7-A15 blink? Why is that? If you would like, i could try to take some video with that camera?

    Looks like you have plenty of room on that breadboard to prototype your entire Z80 project.
    I am hoping so!
    There is no "I" in "team", unless Apple makes it... Then it would be iTeam.

  9. #84
    kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent
    Join Date
    Jul 2006
    Location
    Victoria BC, Canada
    Posts
    3,681

    Default

    I am going to assume that the command "ADD A, n" means "add reg(a) and {this number}", correct?
    Correct.
    If i am right, then how do if define the variable "n"? Since the opcode for "ADD A, n" is 11000110, let's say i want to add "A" with "5". How would i tell the cpu that n=11000110?
    In this example, you put the number "5" after the opcode for "ADD A, n". The CPU knows that the byte following the opcode for "ADD A, n" contains the value of n and not another opcode.
    So in EEPROM, it would code like this:
    Code:
    Address:    Data:          Comment:
     0x0000     11000110     ADD A, (Opcode)
     0x0001     00000101     n=5     (value)
     0x0002     ????????     next opcode.
    
    Also, i noticed something else that really disturbs me. A7-A15 blink? Why is that?
    That's normal. They blink in sympathy for the lower address line when those do the 7bit DRAM refresh addressing.
    Last edited by kchriste; 24th August 2006 at 12:44 AM.
    Inside every little problem, is a big problem trying to get out.

  10. #85
    Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent
    Join Date
    Jul 2006
    Location
    Minnesota, USA
    Posts
    2,390

    Default

    Oh, ok, i figured that the variable would be stored in memory. Cool. Before i find out the hard way, i have yet another question. If the CPU needs to send data OUT of the data port, will IORQ go active? Also, what does the Halt pin do? Does it go active when the command "Halt" is executed?
    There is no "I" in "team", unless Apple makes it... Then it would be iTeam.

  11. #86
    kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent
    Join Date
    Jul 2006
    Location
    Victoria BC, Canada
    Posts
    3,681

    Default

    i figured that the variable would be stored in memory. Cool. Before i find out the hard way, i have yet another question. If the CPU needs to send data OUT of the data port, will IORQ go active?
    Yes, any of the OUT or IN opcodes will cause the IORQ line to go active low.
    Also, what does the Halt pin do? Does it go active when the command "Halt" is executed?
    Yes, that's all it does. You can use the HALT instruction to wait for an interrupt to occur.
    BTW, you've rekindled my interest in my old Z80 development board and I'm playing around with some 74LS374's from the junk box to make a SRAM/EEPROM programmer for the parallel port. Have you found a compiler yet?
    Inside every little problem, is a big problem trying to get out.

  12. #87
    Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent
    Join Date
    Jul 2006
    Location
    Minnesota, USA
    Posts
    2,390

    Default

    No, actually i am making one. That is great that you are playing around. Sounds like fun! I got a little more techie on the thing. I don't know if you read my post on the LCD i found, but i am thinking of using it as a monitor for it. I also got a better set of LEDs for the address bus. I got 2 LED bar graph readouts. It looks cooler now. I will take some more pics when i get something rigged up for the data bus. Is there some type of chip that allows me to add tri-state to something? I think it would be called a Tri-State Buffer?

    Ok, so if IORQ goes active, then MemRQ should go inactive, and then memory should be Z(High Impedance)?
    There is no "I" in "team", unless Apple makes it... Then it would be iTeam.

  13. #88
    kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent
    Join Date
    Jul 2006
    Location
    Victoria BC, Canada
    Posts
    3,681

    Default

    I don't know if you read my post on the LCD i found, but i am thinking of using it as a monitor for it
    Must have missed that post. If it has it's own display and keypad it'll be truly stand alone.
    Is there some type of chip that allows me to add tri-state to something? I think it would be called a Tri-State Buffer?
    You can use a 74xx245 which is a bidirectional tri-state buffer. It has a nicer pinout than the unidirectional 74xx244.
    A logic IC reference:
    http://focus.ti.com/lit/ug/scyd013/scyd013.pdf
    Ok, so if IORQ goes active, then MemRQ should go inactive, and then memory should be Z(High Impedance)?
    That is correct. I can scan a timing diagram for you if that helps.
    Inside every little problem, is a big problem trying to get out.

  14. #89
    Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent Marks256 Excellent
    Join Date
    Jul 2006
    Location
    Minnesota, USA
    Posts
    2,390

    Default

    You can use a 74xx245 which is a bidirectional tri-state buffer. It has a nicer pinout than the unidirectional 74xx244.
    A logic IC reference
    Yes, i do have a lot of those laying around. I will use a few of them.

    That is correct. I can scan a timing diagram for you if that helps.
    That would be great! :cool: But if you do that, then you will have to teach me how to read it. Every time i look at timing diagrams, i get very confused. :P


    I just tried to make a digital clock selector. Lets just say it was a major failure. This project is really teaching me electronics, the art of computation, and assembly all in one. You know how some people are drug addicts, and alcoholics? Well, i have a sick addiction for knowledge. I try to learn as much as i possibly can, all at once. So far i have been managing, but i just hit another wall.
    As many people on this site have predicted, i am trying to run a marathon before i could even crawl. I have learned to crawl, and i have just about mastered walking. When i say "i just hit another wall", i mean, i don't know ANY basic logic. Yes, i know, it is shameful, but i have a plan! :cool: I have a book on digital electronics, that explains digital logic. I am hoping i can get all of that knowledge crammed into my head before school starts(in about a week or so). I am sure i can do it, but that means i just have more things going on.

    So, anyways, what i am saying, is I WILL NOT GIVE UP! If i can learn logic this week, then i will be back on track! Thanks again for all of your help!
    There is no "I" in "team", unless Apple makes it... Then it would be iTeam.

  15. #90
    kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent kchriste Excellent
    Join Date
    Jul 2006
    Location
    Victoria BC, Canada
    Posts
    3,681

    Default

    When i say "i just hit another wall", i mean, i don't know ANY basic logic. Yes, i know, it is shameful, but i have a plan! I have a book on digital electronics, that explains digital logic.
    The truth table shal set you free! Just concentrate on the basic gates such as AND NAND OR NOR XOR etc first. Then figuring out things like flip-flops and multiplexers becomes possible.
    That would be great! But if you do that, then you will have to teach me how to read it. Every time i look at timing diagrams, i get very confused. :P
    I think you've studied the Z80 enough now that they should make sense.
    Here are the OpCode fetch, Mem read/write and IO read/write. There are a few more about interupts etc, but we'll leave that for later:
    Attached Images
    Inside every little problem, is a big problem trying to get out.

+ Reply to Thread
Page 6 of 8
First ... 2 3 4 5 6 7 8 Last

Tags for this Thread