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

    kchriste New Member Forum Supporter

    Joined:
    Jul 23, 2006
    Messages:
    3,677
    Likes:
    47
    Location:
    Victoria BC, Canada
    Sort of. The Z80 is a little-endian processor meaning that it sends the little part of the number first. It can get quite confusing with 32bit processors like the 80386 and up.
    So to load HL with 0x0EFF the bytes would go in this order:
    21 FF 0E
    Where 21 is the opcode for load HL and FF 0E is the number byte reversed.
    I think I'll be switching to Eagle. ExpressPCB is quick and easy to learn, but it has quite a few bugs and this bug may be the last straw for me.
     
  2. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    Aaah, ok? I don't have any C compilers... Sorry. Does TASM have a utility with it that allows you to write it to the port, or does TASM just compile it? Basically, what i am asking, is there any other alternative to getting a C Compiler? :)

    Thanks for all the trouble, though. I will keep it, just in case i can't find anything else.

    What does the software do, exactly?
     
  3. kchriste

    kchriste New Member Forum Supporter

    Joined:
    Jul 23, 2006
    Messages:
    3,677
    Likes:
    47
    Location:
    Victoria BC, Canada
    It just compiles the code into a binary, IntelHex, etc . Writing it to the port is gonna be my program's job.
    Like I said, LCC is a FREE compiler with no limitations. I can compile it into an EXE for you, but it would be pretty useless to you because it only sends that Z80 test program to the LPT port right now. Once I get it to read the output file from TASM then I'll post the EXE for you. The LCC compiler would let you modify the binary data to be downloaded right now if you were really itching to have a go at it. ;)
    I assume you mean the Z80 code. It just reads some bits from an IO port and then rotates them left and right over and over for a nice LED display. I just wanted to test TASM and my loader and it was short and easy.
     
  4. dave

    Dave New Member

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


     
  5. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA

    No, i meant your program. I get it now. Take the "IntelHex" file, and then write it to the port. Got it. I will start working on that right now.


    My stuff came! I am going to start rebuilding my system. Do you think it would be ok if i removed the LEDs on the address bus? Or do you think it would be a good idea to keep them? In my opinion they are just taking up space. What do you think?
     
  6. kchriste

    kchriste New Member Forum Supporter

    Joined:
    Jul 23, 2006
    Messages:
    3,677
    Likes:
    47
    Location:
    Victoria BC, Canada
    I'd remove them because they'll load the Buss down too much when you interface all the other parts to it. When the Z80 is clocked at 4Mhz they'll all be "on" anyway.

    That's pretty much what it's supposed to do. I've pretty much got my head around the 8bit IntelHex format that TASM uses. Now it is just a matter of making it work properly.
     
  7. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    Me too. My program is about 75% done. I just have to finish a few SUBs, and then do a little debugging. Aaah, you gotta love debugging! :)

    Ok, i just ripped off the switch panel, and the Address LED's. OOOH! The ROOM! :D

    Now, i will finish my program. When i get it done, i will post the source code, AND the compiled version. :) Then, i need to make some hardware! :) Yaha me! :cool:

    More pics once i get the SRAM and BootROM connected. :)
     
  8. kchriste

    kchriste New Member Forum Supporter

    Joined:
    Jul 23, 2006
    Messages:
    3,677
    Likes:
    47
    Location:
    Victoria BC, Canada
    Ok, it is done and it works! :)
    I've only tested it with some small files so far, but it seems to load them fine. I have included everything in the ZIP file below. If you copy all the files to your Tasm31 directory, then you can run the Z80.BAT file to compile and load the TEST program. You'll have to change the .org, the address of IO port and the stack pointer addresses (In test.asm) to make it run on your hardware which is different than mine. There is a small change to the circuit to make it a little more robust when the Z80 deactivates the BusAck line. I've only tested it on one computer so far so concider it Beta 0.01. ;)
     

    Attached Files:

    • z80.zip
      File size:
      49.1 KB
      Views:
      81
  9. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    I had to stop production on mine. I was wondering if i had to write anything to the eeprom for the END RECORD? If so, what?

    Also, i take it that your hardware doesn't write it to an EEPROM? It just connects right to the z80's Address lines, and data lines, right?
     
  10. kchriste

    kchriste New Member Forum Supporter

    Joined:
    Jul 23, 2006
    Messages:
    3,677
    Likes:
    47
    Location:
    Victoria BC, Canada
    No you don't need to write anything. The end record just tells your program to stop.
    It is designed to be connected to a complete Z80 system that includes RAM and EEPROM. I've used it to write to an in circuit RAM. It should also be able to program your EEPROM in circuit but I cannot test it because I don't have an EEPROM like yours. I'm not even sure which one you got. ;) My program waits 1ms after deactivating the WR line before going to the next byte. This should be enough time for a EEPROM write cycle but it is untested.
    Also I have no fully tested it with the RESET line connected because of the existing hardware I'm using. So if you have problems, try disconnecting the RESET line first.
     
  11. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    Whoa! This is a new posting time for you! :) Playing on the company dime, eh? Lol. Just kidding. :)

    That is what i was thinking. Ok, with any luck i will have my program done by tomorrow. :) Maybe yet today. I'm not sure, it depends on how board i get. :cool:

    Yeah, that makes sence. My EEPROM is an ATMEL AT28C17. The circuit might not turn out so great. I don't really have anything to build it on. :( I want to use my big breadboard STRICALY for my z80 system. I do have a smaller bread board on my Radio Shack Learning Lab, but that breadboard sucks. The holes are too big, and they are too high up, so short pins don't quite reach the pins. :( I am going to try to rig something up so i can use 74LS273's instead. I think it should work. :)
     
  12. kchriste

    kchriste New Member Forum Supporter

    Joined:
    Jul 23, 2006
    Messages:
    3,677
    Likes:
    47
    Location:
    Victoria BC, Canada
    Actually you were right on the money there. I was bored and being paid. ;)
    It should work. The Max write time for that chip is 1ms. 0.5ms is typical.
    No TriState buffers on those, but they'll work for a regular EEPROM programmer setup. (No in circuit programming) In my circuit you'd have to jumper the BUSREQ to the BUSACK for it to work.
    Well, I'm off camping tomorrow so I won't be around here for a week or so. In other words, I'm NOT ignoring you. ;)
     
  13. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    Sounds great! :) Hopefully the next time you come back here, i will have some type of working computer! :)
     
  14. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    Man, time sure flies, huh? Well, sorry for the long wait. I haven't got ANYTHING done since my last post, but, today i am extreamly board, and i think i will build the programmer today. I promis to post pics of anything i create today within the next day or two.
     
  15. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    Ok, well, my camera has died, and my scanner refuses to scan a clear image. :( Oh well. I got the programmer half done, so with any luck(and if my computer doesn't crash{AGAIN}, then i will hopefully get another camera, and take some more pics.
     
  16. kchriste

    kchriste New Member Forum Supporter

    Joined:
    Jul 23, 2006
    Messages:
    3,677
    Likes:
    47
    Location:
    Victoria BC, Canada
    Scanners don't have that great of a "depth of field" so scanning 3D objects is always hit and miss, not to mention the risk of scratching the glass.
    No problem! :D
     
  17. Marks256

    Marks256 New Member

    Joined:
    Jul 14, 2006
    Messages:
    2,350
    Likes:
    9
    Location:
    Minnesota, USA
    No, i wanted to scan the schematics, and take a picture of the current system. :)
     

Share This Page