GARTHWILSON wrote:
lordbubsy wrote:
In theory perhaps you and I are right, and if I’m not mistaken, for a 1MHz system that would likely work if the AVR or PIC is running fast enough(16 or 20MHz). However, I believe what BitWise is saying, is that a PIC or AVR isn’t fast enough to detect and react on the 6502 / W65C134S BUS signals. With a faster system it simply wouldn’t work.
A 16MHz PIC would have only two instruction cycles per half cycle of a 1MHz 6502, probably not enough to do anything useful. A one-word forward conditional branch on a PIC takes two of these instruction cycles (8 clocks), and a longer one takes two instructions and three instruction cycles (12 clocks); so if the PIC has to watch for a condition on even a single bit and branch on it, it's already out of time before doing anything useful.
I should probably ask which 6502 variant we're talking about. If we're talking about the NMOS 6502, you can't stop the PHI0 clock, correct? How about the R65C02 though? If I'm using a PIC to supply an R65C02 with a 1-MHz PHI0 clock, I can stop it any time while PHI0 is high. Then, while stopped, I should be able to run the R65C02 through a single cycle by taking the PHI0 output low and then high again. That single-cycle PHI0 clock doesn't have to be 1-MHz, does it?