Re: Another semi-fail - again with the W65C02
Posted: Sun Jun 17, 2018 5:23 pm
GaBuZoMeu wrote:
Well, I scanned the WDC65C02 (an old one, 2004) data sheet for "compatible" and "replacement" - no finds. Perhaps they knew better 
But if using PHI2out make things worse then using an oscillator can for PHI2 for the GAL and delay that PHI2_GAL by one or two buffers and fed it into the µP should make things better - I hope. The GAL signals then are slightly earlier than the "nominal" (=PHI2_µP qualified) signals.
But if using PHI2out make things worse then using an oscillator can for PHI2 for the GAL and delay that PHI2_GAL by one or two buffers and fed it into the µP should make things better - I hope. The GAL signals then are slightly earlier than the "nominal" (=PHI2_µP qualified) signals.
Indeed doing this resolved the problem. The board will now (even with a 120ns rated EPROM) run happily at 14MHz.
So it seems that timing with the W65C02, especially in conjunction with ultra fast RAM, is very tight. Just as with the last project where a 12nS delay to the Phi-2 feeding the ACIA was enough to throw it off the rails, in this case a mere 15ns delay in the /QW line was the culprit. I guess not so mere when you compare it to the 15ns access time of the RAM. The combination fast RAM and W65c02 seems to have no 'sense of humor'.
The previous project solution ended up with only a 6ns delay and that is good up to about 17mHz under the right conditions. This solution produces a net 0ns delay between the CPU's clock and the gating of a Phi2 qualified write and will be the solution I use going forward.
Thanks GaBuZoMeu, your intuition was right on the money.
Here is a scope shot of the resulting timing at 10MHz. Please excuse the ringing in the traces - I have verified it is a scope ground issue and does not appear on the board. As before the traces are: Yellow=Phi2 (at CPU), Blue= RAM CE, Red=/QW, Green=DB @floobydust - There was minimal ground bounce and Vcc glitching. The worst coincided with the RAM /CE signal (as expected). Much less than I have seen in some of my successful efforts. The Vcc glitch was at most about 150mV across the RAM's bypass cap.