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

Z80 Programming

Discussion in 'Microcontrollers' started by stigma, Nov 4, 2004.

  1. stigma

    stigma New Member

    Joined:
    Oct 23, 2004
    Messages:
    11
    Likes:
    0
    Location:
    Norway
    Hello!

    I just got 10 Z80CPU's (Zilog Z84C0006PEC) and a programmer (PX-1000 V2.0). Im totally new to this (Only programmed basic stamp mpu's before). So basically what i need is some good software to program this CPU with (Linux or windows software) and some good links's / info about this cpu. I've been searching around the web, and to me it looks like i have to program this CPU in Assembly ? Is there any compilers for other languages for this CPU ?

    Hope sombody could help :)
     
  2. williB

    williB New Member

    Joined:
    Aug 30, 2004
    Messages:
    2,217
    Likes:
    3
    Location:
    New Jersey
    I hope this wont discourage you.
    I think the Z80 (any version) requires some support chips ie. memory ,parallel I/O , so two support chips will get you going .. you could use a pc to load in the program into static or flash RAM
    there should be tons of software around the net for this chip , this is the good part..
    google "boot loader Z80"
     
  3. stigma

    stigma New Member

    Joined:
    Oct 23, 2004
    Messages:
    11
    Likes:
    0
    Location:
    Norway
    Thanks for replying so fast ;)

    So basically what you say is that i need extern memory and i/o modules ?
    Even if i just want the processor to flash some leds ? The processor got 20pins on each side (total of 40 pins), so i assumed some of them was i/o pins ?
     
  4. dave

    Dave New Member

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


     
  5. JohnBrown

    JohnBrown New Member

    Joined:
    Apr 26, 2004
    Messages:
    141
    Likes:
    0
    Location:
    Surrey, England

    If it is a Z80, then 8 of them are data lines (for external memory) 16 of them are address lines (for external memory) and the rest are things like /RD and /WR, Halt, external interrupts etc.
    You will also need an external clock, i.e. you can't just hang a crystal or a resonator on a Z80.
    If you get as far as connecting up your external clock, external EPROM, external RAM and external I/O, you'll still only have a Z80, which will draw a lot of current, and, IMSNHO, is one of the clumsiest and badly designed processors of all time.
    Also one of the first to attempt the "faster clock = faster programs" confidence trick.
    Some of the operations involving IX and IY index registers took so long, that a colleague of mine theorized that the registers didn't really exist, and that the CPU was actually saving the swapping the HL pair with the notional index register, permorming the operation, and then swapping back.
    Having said that, I know that I was spoilt by experiencing the 6809. Possibly the best 8 bit processor of all time.
    Some people swear by Z80's, I tend to swear at them.
    My advice is to throw the evil things away and get yourself a cheap AVR or PIC to learn on. Or maybe an old Babbage difference engine.
     
  6. samcheetah

    samcheetah New Member

    Joined:
    Dec 30, 2003
    Messages:
    872
    Likes:
    0
    Location:
    Pakistan
    well, if you have bought 10 Z80's then you wouldnt restrict yourself to just flashing LEDs, right??? a microprocessor system always needs a number of other chips for it to work depending on the requirement of the system. you will need interfacing chips, memory chips etc. the amount and type of these chips will depend on your application and the CPU you have chosen. a better alternative is to use a microcontroller. a microcontroller has alot of things built on a single chip. that makes life much easier. but i wouldnt say that you abandon the Z80. look for Z80 projects around the internet (use google as williB suggested).
     
  7. williB

    williB New Member

    Joined:
    Aug 30, 2004
    Messages:
    2,217
    Likes:
    3
    Location:
    New Jersey
    it can be done , its no easy task though.
    on the trs 80 system the data and address bus was multiplexed, but you dont have to do it that way.
    you still need the I/O ie .. parallel periferial Interface chip..because the z80 WILL output data to blink LEDs but you just cant drive an LED with the data bus output..but you could use a LS 245 i believe ..., to latch the data .using either IOREQ or WR lines or both
     

    Attached Files:

    • z80.jpg
      z80.jpg
      File size:
      35.7 KB
      Views:
      905
  8. williB

    williB New Member

    Joined:
    Aug 30, 2004
    Messages:
    2,217
    Likes:
    3
    Location:
    New Jersey
  9. stigma

    stigma New Member

    Joined:
    Oct 23, 2004
    Messages:
    11
    Likes:
    0
    Location:
    Norway
    Once again thanks for answers ;)

    I got those cpu's and the PX-1000 programmer for free by a friend who didn't need it.
    I guess this is a bit too advanced for me right now, i'll rather should go for a PIC i guess.
    Could be fun to play with though, so i'll to try to gain some knownledge about this chip and try to experiment with it ;)
     
  10. stigma

    stigma New Member

    Joined:
    Oct 23, 2004
    Messages:
    11
    Likes:
    0
    Location:
    Norway
  11. samcheetah

    samcheetah New Member

    Joined:
    Dec 30, 2003
    Messages:
    872
    Likes:
    0
    Location:
    Pakistan
    yes starting with a PIC would be a good idea. and for that i would recommend that you go to Nigel's site http://www.winpicprog.co.uk
     
  12. williB

    williB New Member

    Joined:
    Aug 30, 2004
    Messages:
    2,217
    Likes:
    3
    Location:
    New Jersey
    ,, it WAS just the WR line..hooked into a LS373 better off decoding a port also otherwise.... well ...yeah stick with a PIC..
    you are in luck ,your programmer will program pics..
     

    Attached Files:

  13. stigma

    stigma New Member

    Joined:
    Oct 23, 2004
    Messages:
    11
    Likes:
    0
    Location:
    Norway
    So the PX-1000 programmer will program PIC's ?
    Picture of it here: http://www.inex.co.th/images/px_1000_new02.gif

    Im not even sure if it is able to program the z80 cpu's, when i do a google on PX-1000 i get alot of sites telling me it's an Atmel's MCS-51 Microcontroller programmer.

    Anyone know ?
     
  14. JohnBrown

    JohnBrown New Member

    Joined:
    Apr 26, 2004
    Messages:
    141
    Likes:
    0
    Location:
    Surrey, England
    It certainly won't be able to program Z80's, as there is nothing programmable inside them. That's why they need external memory to walk.
     
  15. DirtyLude

    DirtyLude Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    1,904
    Likes:
    56
    Location:
    Toronto, Canada
    According to that site, the programmer is an Atmel programmer.

     
  16. williB

    williB New Member

    Joined:
    Aug 30, 2004
    Messages:
    2,217
    Likes:
    3
    Location:
    New Jersey
    sorry, the site i saw said it would do Pics .. guess not..
     

Share This Page