Shop OBEX P1 Docs P2 Docs Learn Events
Processor Interface — Parallax Forums

Processor Interface

Got a question Guys!

I'm diddling with a Z80 CPU with a half-baked idea of building a low budget Z80 computer (one of the many shiny things that keep from me from completing much of anything :-( ).
The question... While testing, I'd like to use a Basic Stamp to supply the Z80's clock frequency. Can I output a BS2 waveform directly to the Z80 clock pin or would I need some same of interface?

Thanks for any wisdom!

@

Comments

  • kwinnkwinn Posts: 8,697
    Directly from the Stamp to the Z80 should be fine. Running it to other chips increases the loading so at some point a clock driver will be needed.
  • It sounds a fair idea. I think the z80 is still an incredibly capable chip, especially with the cmos 20MHz variants. There seems to be a few projects out there for z80 based single board computers. I have a few of the early maplin boards. I suppose you could use a signal generator set to square wave, but a stamp is an awful lot cheaper.
    I'm interested to see how you get on.
    regards john
  • One problem with the Stamp is that it does not have a command that will output an arbitrary square wave frequency. The FREQOUT command generates a sine wave (based on PWM).

    What frequency do you need? There are so many little packaged oscillators available that cost about a buck, pick your frequency. And doesn't the Z80 have a crystal option?
  • kwinnkwinn Posts: 8,697
    One problem with the Stamp is that it does not have a command that will output an arbitrary square wave frequency. The FREQOUT command generates a sine wave (based on PWM).

    What frequency do you need? There are so many little packaged oscillators available that cost about a buck, pick your frequency. And doesn't the Z80 have a crystal option?

    IIRC the original Z80 required an external clock signal. Later versions may have had an on chip oscillator that only required a xtal but I am not certain about that. Too much time has passed.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2017-04-25 21:24
    The other problem with the BS2 is that there's no command that will output a waveform indefinitely. And doing it by a software loop would be too slow. The Propeller could handle the job easily, though.

    -Phil
  • kwinnkwinn Posts: 8,697
    The propeller would be a better choice, and having control over the Z80 clock frequency and all those cogs would be a big help with debugging hardware and software.


  • Just in the testing phase right now. A clock frequency somewhere around 1kHz-ish would be fine.
    I only thought of using the Stamp cuz I'm too lazy to wire up a 555. :-|

    @
  • ercoerco Posts: 20,244
    edited 2017-04-27 14:22
    ajward wrote: »
    Just in the testing phase right now. A clock frequency somewhere around 1kHz-ish would be fine.
    I only thought of using the Stamp cuz I'm too lazy to wire up a 555. :-|

    Stamp: $50
    555 timer: 4 cents http://forums.parallax.com/discussion/comment/1393138/#Comment_1393138

    Just sayin'.
  • I have a little stack of SMT 555 breakouts prewired as square wave generators which were shipped by mistake when I ordered a set of HX711 ADC breakouts. When I informed the seller of the mistake they went ahead and sent me the HX711's and said keep the 555's.
  • ajwardajward Posts: 1,120
    edited 2017-06-03 22:56
    A bit of progress on my Z80 activity. Started wiring the CPU and and connecting an 74LS244 octal line driver to the address lines. Using this small-ish breadboard, I quickly realized "You're gonna need a bigger breadboard!!".
    Bought an Elenco board with over 3000 tie points. Even with this, I'm going to keep some sections off the main board. Initially at least, the power supply, clock generator and address line LEDs.
    To start, all data lines are tied low to load an NOP instruction to all the accessibile memory locations. (Non-existent at the moment) Moving forward I have some 32K ram chips to try to integrate.
    Edit: I'm going to need to use 2-74LS244 chips to handle the 16-address lines. (Off to another breadboard).

    If anyone has experience with something like this, I'd appreciate you sharing your wisdom!
    My goal is to kinda simulate the Altair 8800... I used to own one and foolishly traded it away. DOH!
    900 x 675 - 215K
  • Cluso99Cluso99 Posts: 18,066
    Hi Amanda,
    Haven't seen you around for a while.

    There has been a number of projects using a prop to do a lot of the glue for the Z80 including loading up the RAM as ROM, and using the prop as an I/O device on the Z80 bus as well. Try the RetroBrewComputers forum and wiki for more info. Dr_Acula has done some work on this too.

    Or of course you could just use a prop with ZiCog - see my RamBlade link in my signature for the hardware (prop, eeprom, sram, glue gate and microSD. Cannot get much smaller than this matchbox ;)
  • An update... after a few weeks of tinkering with my Z80 things are starting to come together (kinda).:-)
    Obviously, all this was fueled with liberal amounts of caffeine, adult beverage and colorful language.

    I jumped right into the project without a lot of research and started wiring things up with the first info I found... bad move! :-|
    Also started out with a 555 Sq wave generator picked up on eBay, For some reason it put out a really raggedy signal. Sucked it up and built my own that works just fine (Adjustable from 1 thru ~45Hz).

    Right now, I have all 8 data lines tied to ground to effect a NOP instruction. The 16 Address lines are connected to green LEDs through some 74LS244 driver chips. Pulled out 5 status lines to LEDs... left to right M1, Mreq, Rd, IOrq and Wr.
    The small breadboard to the right is my single-step circuit.

    Also wiring up a 62256 - 32K static ram module. Waiting for some decoder and latch modules to integrate the ram and future rom.

    https://www.flickr.com/photos/81065424@N00/34874306154/in/dateposted-public/
Sign In or Register to comment.