BigDumbDinosaur wrote:
You should not use Ø2 to gate chip selects—only use Ø2 to qualify RWB.
which is why I said, "
Preferably you make it so [the RAM's]
WE\ cannot go low when phase 2 is low, but you can also make it so the RAM's CE\ won't go low until phase 2 rises, which will be fine at your low clock speed." Again, RAM is available in speeds faster than any other part of the computer, down to 8 ns, so early qualification is not really needed until you get into the highest speeds, say at least dozen MHz. My workbench computer doesn't select RAM until phase 2 goes up, and runs up to 7MHz with 4MHz parts and 55 SRAM. I'll do things differently though when I try for 25+MHz.
Quote:
When Ø2 goes high that is the time to assert the /OE (read) or /WR (write) input of the selected device. Note that this arrangement is required if using 65xx family I/O devices (e.g., 65C22).
Actually, the '22 requires that its R/W\ input be valid
before phase 2 rises. It has no OE\ of course, as it has the phase-2 input.
Quote:
Note that the 6502 family data bus is never valid when Ø2 is low, regardless of the state of RWB. Allowing a write to occur during that time could result in a wild access to a device, possible corrupting memory contents or I/O device registers.
That's particularly true if you use a transparent latch for an output, where it could be a problem if the output experiences glitches during the phase-2-high time. The processor is not guaranteed to have the data correct on the bus until tMDS time (at least 25ns for a 14MHz part)
after phase 2 rises though; but fortunately as long as the address is correct, most devices won't care what the data is until their setup time before de-select. Before their data setup time, the data could be wild and it won't matter. The important thing is to make sure no writes can be done until after the address is valid and stable.