Re: Another semi-fail - again with the W65C02
Posted: Tue Jun 19, 2018 5:02 am
BillO wrote:
Dr Jefyll wrote:
Is that the same RAM that's in context for this thread, and can you please post or link to the datasheet?
Quote:
I was referring to the timing diagrams on page 7 where they (to me anyway) clearly show that the rising edge of /CE can be coincidental with or lag /WE but not the other way around.
Turning to page 6, of interest (to me) is the SRAM's Tdw specification, which is the amount of time the data bus must be stable after the rise of /WE. The corresponding 'C02 spec would be Tdh, the MPU's data hold time at the end of a write cycle. WDC says that is 10ns after the fall of Ø2. Tdw is 30ns minimum.
Going by those numbers and the SRAM's write timing diagram, it would seem that the SRAM is too slow for the 65C02 at any Ø2 frequency—Tdh is generally not a function of clock rate. If my theorizing is correct, the 'C02 will stop driving the data bus 20ns before the SRAM is finished sampling it.
Incidentally, in the ISSI IS61C1024AL 128KB SRAM I used in POC V1, the equivalent spec to Tdw is 0ns—which implies the SRAM's internal data sampling timing is anchored to when /WE is driven low. That is a lot friendlier when combined with the 65C02 than the Tdw spec of the SRAM you are using.
Quote:
Before the added delay I had /WE rising after /CE by something like 4ns. The delay corrected that such that /CE rises about 8ns after /WE. This better agrees with the specified timing.
With the WDC MPUs, the best results are going to be obtained by not qualifying device selection with Ø2. That is, device selection should occur as soon as an address that is understood by the decoding logic is present on A0-A15. Reading and writing should be separately controlled as illustrated in the circuits earlier published by Jeff and me. You shouldn't have to be doing funky things with Ø2 just to get an SRAM to work.