Hello,
I have a problem in my homebuilt 65C02 system, in which addresses from $0000 to $7FFF are assigned to RAM. Its first implementation used the address decoding circuit described in the "address decoding section" of Garth's primer (32K RAM + 16K ROM) : /OE and /CS both qualified by PHI2 and /WE directly connected to RW\ from the CPU :
/OE , /CS = NOT (PHI2 AND NOT A15)
That works well with a 70-nS SRAM, up to 9.6 MHz (well beyond specifications). I ran it at 6 MHz clock rate during months without any problem.
Then I decided to go faster : 8 MHz. I ordered 55-nS SRAMs and I changed the decoding circuit after having read about the hard limitation induced by a PHI2-qualified /CS. I used Daryl Rictor's method (SBC-2) : /CS wired to A15, /OE receiving the inverted RW\ signal from the CPU, and finally /WE qualified by PHI2 :
/CS = A15
/OE = NOT RW\
/WE = NOT (PHI2 AND NOT RW\)
Here are the results :
- 1st decoding method / 6 MHz / 55-nS SRAM : NOK, the RAM test reports write errors.
- 2nd decoding method / 6 MHz / 55-nS SRAM : NOK, same test result.
- 2nd decoding method / 6 MHz / 70-nS SRAM : OK
The 70-nS SRAM works perfectly well even at 8 MHz.. I didn't ramp-up the clock to check the limits, but the RAM test didn't report any error during a 24-h run, and my application also runs OK.
The SRAMS I use are : BSI BS62LV256-70 (
https://emu-docs.org/WonderSwan/bs62lv256.pdf) and Alliance AS6C62256-55 (
http://www.alliancememory.com/pdf/AS6C62256.pdf). I investigated their data sheets ; at first I wondered if the Alliance VOH, specified to only 3V typical, wasn't the point in my 5-V SBC : no, its VOH actually equals VCC (checked on a test rig).
Then I stumbled upon a note to be found only in the Alliance datasheet, page 6 : "/WE and /CE must be high during all address transitions". So my hypothesis is that when the RAM is selected as soon as A15 gets low, it latches the address bus -but each bit hasn't still fully stabilized (tADS not elapsed).
(as if the internal decoding circuitry was edge-triggered by /CE)
What do you think of all that ? I may wery well be doing so huge a mistake that I don't notice it...
Thank you !
Marc