R65C02 data bus sharing

Building your first 6502-based project? We'll help you get started here.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: R65C02 data bus sharing

Post by GARTHWILSON »

The SRAMs I've worked with don't care what OE\ is when they're not selected or when WE\ is low.

The SRAM chip select will depend on more than just phase 2 since you don't want the SRAM to be driving the bus when you're trying to read I/O or ROM.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: R65C02 data bus sharing

Post by BigDumbDinosaur »

phvic wrote:
Just to make sure I'm not doing anything wrong: is it ok to hardwire SRAM's OE to ground? From what I've gathered, it seems that SRAMs don't care about OE during writes.
I recommend that you verify that against the data sheet for the specific SRAM you are using. While in most cases such an arrangement will work, it's not wise to assume so.
Quote:
phi2 clock would be connected to SRAM's CE through an inverter to prevent accidental writes when phi2 is low.
Ø2 should not be used to quality chip selects (especially so with the 65C21, 65C22 and 65C51). You should qualify RWB with Ø2 and gate CE strictly by your memory decoding logic. Doing it as you are doing it results in part of the Ø2 high cycle being wasted as the SRAM responds to /CE being asserted.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
phvic
Posts: 36
Joined: 22 Nov 2014

Re: R65C02 data bus sharing

Post by phvic »

I checked my SRAM datasheet and its truth table reports Don't Care for OE so I should be good to go.

I visited my local electronics shop today to get a 628128 chip (128k x 8 SRAM) to replace my 32k SRAM but they didn't have one on the shelf. Instead I got a 70ns KM681000 which is supposed to be completely compatible with a 628128. I wonder why it isn't called "628128" then, if there is no difference. *shrugs*

I'll get back to you on the phi2 stuff later -- I have a somewhat unorthodox setup which is better explained with a schematic (which is only in my head at the moment!).

Anyway, I can now toggle between 1 Mhz clock signal and single-stepping on the fly without crashing the 6502 *huzzah!*
I.e. I can pause the 1 Mhz clock reliably on high state and switch to single-stepping and then back to the 1 Mhz clock.

The clock and reset signals are generated by the AVR, so I can easily choose between 250 khz, 500 khz, 1 Mhz, 2 Mhz and 4 Mhz clocks by updating the AVR firmware. I'm planning to make the clock selectable with a rotatory or DIP switch.
Post Reply