First a good rule for TTL logic
TTL uses higher current to make a logic 0 then logic 1
Good idea to use Pull-Up resistors for TTL
Using Pull-UP resistors requires boot rom code to be at highest address block.
ian.M is putting all MMU control on one I/O output port.
Saves I/O ports at some possible cost of slower software to control MMU
My setup uses 4 I/O output ports for 74LS670 and one output port for boot.
One for Boot where only 1 bit is used leaving you 7 bits you can use.
4 addresses that you only write B3 to B0 from
B7 B6 B5 B4 B3 B2 B1 B0
X X X X EA17 EA16 EA15 EA14
If you add one more 74LS670 to get 4M range this becomes
B7 B6 B5 B4 B3 B2 B1 B0
EA21 EA20 EA19 EA18 EA17 EA16 EA15 EA14
With pull up resistors connected to outputs of 74LS670, just put the power up boot program in the highest 16k block of ram and have ram at top of memory.
When you disconnect A14 & A15
0000h-3FFFh the Z80 is asking for becomes
??00 0000 & ??11 1111 for high byte of address
The 74LS670 4 outputs are pulled to 1
1111 from 74ls670 and 00 0000 from Z80 to
1111 from 74ls670 and 11 1111 from Z80
This gives
3C000-3FFF range in expanded memory the highest 16 k block
You need the Z80 to see 0-16k as boot program. with the outputs of 74LS670 this is the high 16k of memory.
1. A14/A15 go to the read data port address lines Ra & Rb
2. A0 A1 go to Wa Wb with the D1-D4 connected to Z80 data lines
Gw is connected to Z80 output write for a range of 4 addresses.
3. Yes these are the highest address lines for ROM/RAM.
4. Pull-UP connect to Qn
5. Read my last post. Rom disable for grant's logic or bit of a 273
6. Grants logic is a FF, one bit of 273 is a FF
Keep in mind that both circuits do the same thing with minor changes.
Tried to step you through the 4 chip logic
You understand the 4 chip version then you are very close to the 74LS670
Erm.. where? Are you talking about D1-D3 on the schematic?
on 74LS670 pin GR(11) controls the tri-state of Qn outputs.
74LS670
Think you understand your current ram chip.
You could think of the 74ls670 as two ram chips.
One ram chip is write only.
One chip is read only.
When you use write only chip to write a location say address 1 you can only read the data using the read only chip using address 1
The 74LS670 is like two ram chips but with only one storage location inside for an address.
Think you want to play and learn hardware using Z80
Z80 is also not bad learning software on.
For software side you can get more done using nice powerful tools.
For hardware side good hardware design is what makes it easer.
Grant's just a working computer with few chips. not a great hardware design.
Parts of design is for other microprocessers, still works with Z80 just not great.
MMU
simple concept
A circuit that lies about the address it uses.
Here the MMU only stores address data used for the Lie.
It can an often does store other data like.
is this area accessable
is this area writable.
has this area been changed
The CPU asks for something by address.
the MMU uses this address to access it memory. from this memory it gets the actual address to use with memory
This takes time but can make a computer very powerful.
Even at the cost on having to add wait states for memory.
Think of what CP/M3 can try to do.
that old slow floppy disk drive that is using 1024 byte sectors.
CP/M programs want a 128 byte sector.
CP/M can read that 1024 byte sector from that slow floppy and put data in extra memory
Keep track of what changed and then write back to floppy if needed.
Many many things possible with more memory