Z80 Homebrew CP/M - Bank Switching - Page 1
Forum section: electronics / beginners

author: RetroPhase2015
author_rank: Contributor
timestamp: June 07, 2016, 04:44:58 pm
content: Hello, since late 2014 I have been researching and designing a Z80 homebrew computer based on 'Build Your Own Z80 Computer' by Steve Ciarcia. I have cheekily used the bank switching design from this threadhttps://www.eevblog.com/forum/beginners/z80-single-board-memory-bank-switching/(Grumpydoc's reply 13).1. The 74LS74 flip flop needs a clock signal derived from a couple of other signals. I am wondering if this signal from the black and white schematic in Ciarcia's book _MEMWR_ is suitable?Also attached is a page concerning memory from my 20-page schematic.2. On the subject of clocks - I have an 8MHz SGS Thompson Z84 clone of the Z80. Is changing the clock circuit from 2.5MHz to 8Mhz simply a matter of switching the Crystal or, would my capacitors and resistors need changing too?

author: grumpydoc
author_rank: Super Contributor
timestamp: June 07, 2016, 07:09:11 pm
content: Quote from: RetroPhase2015 on June 07, 2016, 04:44:58 pmIf you mean the 74ls74 in the bank switching circuit I posted then not quite - it needs to be a decoded I/O write signal. It's basically just a 1 bit output port.Look at the circuit I postedlater in the threadwhich shows some port decoding. The clock pulse for the 74LS273 is derived in the way that you want. Or, in fact, the I/O write strobes in the circuit that you posted.QuoteDepends on the crystal that you choose, but if you pick a different frequency from the same range it will probably need the same load capacitance.

author: rstofer
author_rank: Super Contributor
timestamp: June 07, 2016, 07:27:51 pm
content: For the flop, almost anything will work but in keeping with the intent, it is better to treat the flop as an IO device. We could actually use an 8 bit register and use the other 7 bits for something else.Before I went anywhere, I would want to spend time thinking about how I plan to use mapping. In some ways Reply 13 is kind of nice because you get a monitor to play with at low addresses. When you want to boot off the floppy (CP/M), the ROM loads the BIOS from the disk into high RAM and the BIOS turns off the mapping by writing to the IO port.So, decode an IO addess (that doesn't collide with other devices), invert it and OR it with IOWRT' (you want a positive going signal to clock the flop). Use bit 0 of the databus (D0) as the D input.

author: grumpydoc
author_rank: Super Contributor
timestamp: June 07, 2016, 07:46:34 pm
content: Quote from: rstofer on June 07, 2016, 07:27:51 pmIt doesn't really matter - 74xx74 clock the data on the rising edge of the clock pulse. Data is valid for the whole of the write cycle so the rising edge of the 7474 clock can correspond to either the rising or falling edge of \$ \overline{WR} \$

author: RetroPhase2015
author_rank: Contributor
timestamp: June 07, 2016, 07:48:51 pm
content: Quote from: grumpydoc on June 07, 2016, 07:09:11 pmThanks, that's great - I already have my motherboard power and ground pins soldered and quite a bit of wire wrapping done so being able to use the existing system will be convenient.QuoteOkay, not quite sure as a newbie what you mean by range - do you mean like 'HU-49 range' for example? I'm attaching a schematic of the clock circuit from the book I'm using.

author: grumpydoc
author_rank: Super Contributor
timestamp: June 07, 2016, 08:06:02 pm
content: Quote from: RetroPhase2015 on June 07, 2016, 07:48:51 pmHC-49 is a case style IIRCBasically a manufacturer will have a whole range of frequencies with largely similar other characteristics - eg to pick something at random all ofthis serieswill need 2x 20pf load capacitance.Wherever you buy the crystal should be able to tell you what the load capacitance is - if it's the same you don't need to change the caps, if it's different you might (or it might work anyway given component tolerances).

author: RetroPhase2015
author_rank: Contributor
timestamp: June 07, 2016, 08:09:20 pm
content: QuoteMy aim is -1. Use the Zap monitor from 'Build Your Own Z80 Computer', to test the Motherboard with a Hex Keyboard using segment Hex LED's and an RS232 serial to terminal emulator in my PC.2.When that works build the NEC upd7220 video display with GPU and SN76489 PSG.3.Add a PS/2 serial keyboard port.4.Build an IDE interface and run CP/M from CF Card.5.Possibly port BASIC to the 32k EEPROM (I haven't researched how much RAM is free for BASIC within CP/M rather than from ROM).6.Write a game for my system and make people's socks pop off in excitement!So that's what my memory map will need to reflect. I know this all seems very ambitious, and I'm on my 3rd attempt at the mainboard, and learning the hard way. The schematic was finished in April 2015 but I'm breaking up my SBC into modules with a backplane to make debugging easier.QuoteI'm going to draw this later so I can visualise it.

author: RetroPhase2015
author_rank: Contributor
timestamp: June 07, 2016, 08:20:37 pm
content: Quote from: grumpydoc on June 07, 2016, 08:06:02 pmRight, I understand. Some of the crystals I have were supplied loose with no documents so I guess I need to do some research or buy some from a vendor who supplies more details. Thankyou!

author: grumpydoc
author_rank: Super Contributor
timestamp: June 07, 2016, 08:43:51 pm
content: Quote from: RetroPhase2015 on June 07, 2016, 08:20:37 pmIf you have them anyway I'd just stick them in the circuit and see if they oscillate at the right frequency. Probably much faster than trying to figure out the parameters - especially with the logic gate series resonant oscillator circuits such as you posted.