[sebhc] Schematic
Lee Hart
leeahart at earthlink.net
Wed Apr 28 00:17:00 CDT 2004
Carroll Waddell wrote:
> How do you get an 8080 to address more than 64K?
Basically, the same way Intel got the 8088 to address 1 megabyte. You
add segment registers, which supply the upper bits of the address, and
let the CPU itself supply the lower bits
I designed a product called the "Databug" which is a Z80 single-board
computer, 6.25" x 2.5", 1 bytewide RAM socket (8k-512k bytes), 1 EPROM
socket (8k-512k bytes), 2 serial ports, 3-channel A/D converter, and an
8-bit parallel I/O port. It's used for data logging and processing
applications.
The two memory chips can total 1 megabyte, which requires 20 address
lines (A0-A19). The Z80 only has 16 address lines (A0-A15). So, 4 bits
of an 8-bit output port provide the upper 4 address lines (A16-A19). Let
N = the value of these 4 bits; 0 upon Reset, and whatever the Z80 writes
thereafter.
A 5th bit of this port also provides a RAM/ROM select bit (high=RAM,
low=ROM). A 74HC139 decodes the Z80's A15, and the output port's RAM/ROM
bit as follows:
A15=0 A15=1
RAM/ROM=0 ROM bank N RAM bank 0
RAM/ROM=1 RAM bank N RAM bank 0
On power-up or Reset, RAM/ROM=0 and N=0 (A16-A19 all 0). So 0-32k is the
lowest 32k in the EPROM, and 32k-64k is the lowest 32k in the RAM.
If the Z80 writes some number N to the output port, then 0-32k will now
address the selected 1 of 16 32k banks in the ROM. If the Z80 sets
RAM/ROM=1, then 0-32k now addresses RAM bank N (1 of 16 32k blocks in
the RAM chip). Since the upper half of the Z80's address space is always
RAM bank 0, you have a "safe" place to put the code that manages the
bank switching.
This system was used just because it was simple (just a 74HC139 and a
74HC02 to implement it). But we could work out variations on it for more
memory chips, or for different size memory blocks.
--
"Never doubt that a small group of committed people can change the
world. Indeed, it's the only thing that ever has!" -- Margaret Meade
--
Lee A. Hart 814 8th Ave N Sartell MN 56377 leeahart_at_earthlink.net
--
Delivered by the SEBHC Mailing List
More information about the Sebhc
mailing list