angus wrote:
GARTHWILSON wrote:
You might be used to the RD\ and WR\ signals of other systems. You can derive those with the circuit at the bottom of the clock-generation page (section 6) of the 6502 primer at
http://wilsonminesco.com/6502primer/ClkGen.html.
This is exactly what I'm looking for (I guess). So:
~RD = memory read := (~R/W) NAND ø2
~WR = memory write := R/W NAND ø2
I wish there were a way to put the overbar on text in the forum. In "R/W" which is "read, or write-not," there should be a bar over the W, meaning the signal is low for writing. It looks like you're inverting R/W for the wrong one. I'm not familiar with your ":="; but to clarify,
The read-not output signal should be the NAND of R/W itself and Φ2.
The write-not output signal should be the NAND of the
inverted R/W and Φ2
Quote:
I assume that the configuration ~RD = 0 and ~WR = 0 (at the same time) does not occur and normally (e.g. nothing read or written) the values are ~RD = 1 and ~WR = 1 to indicate "idle". Right?
Most memories with an output-enable-not (basically a read-not, but the chip select has to be true too) and a write-enable-not input will ignore the output-enable-not input if write-enable-not is true (ie, low). Check the data sheet for the one you want to use of course.
Quote:
See the following why this is important to me ...
BigEd wrote:
If it is reading [...] a RAM or ROM will be adjusting its actions to read the address in question.
[...]
There is a little more to this: some peripheral devices will take some internal action on a read, and so for these devices it's important they don't take action even on a read until the address is stable and their chip selects are active.[...]
I assume he's referring to I/O ICs which may for example clear an interrupt condition if you read the status register, or a timer interrupt if you read a timer's counter registers. Debugging these was quite a challenge in the early days of the NMOS 6502 when indexing across a page boundary caused an extra (but predictable, if you knew how it worked) read of an invalid address. (CMOS does an extra read of the last instruction byte instead.)
Quote:
And that is the key point of my entire question here. I want to trigger an action by a microcontroller when a specific address is read by the 6502. Therefore I need a signal to attach an interrupt on the microcontroller to this signal to then check, inside the ISR, if the specific address is on the bus and the action should be performed by the microcontroller. And in order to do this I need a rising or falling edge on the signal and therefore it is important for me that ~RD and ~WR go back to an idle state and then perform an edge to let the microcontroller trigger the interrupt.
How fast is this microcontroller? Remember the 6502 does a new bus access in every cycle, or every "T state" in the parlance of some other processors (although a few of those, perhaps a quarter of them, are dead bus cycles). Your ISR, including finishing an already-started instruction and also the interrupt sequence and return, will have to execute in under a microsecond if the 6502 goes only 1MHz. If you run it at 20MHz, it becomes 50ns. It's possible, but unlikely, that you have a microcontroller fast enough to do that. Even if the microcontroller is only involved for I/O and ignores memory access, there can still be I/O accesses two cycles in a row.