randallmeyer2000 wrote:
Quote:
"!Ø2 && (VDA || VPA)~BDD"
This terminology confused me. I get phi 2. I get VDA and VPA (sort of; mystery pins that I am presently becoming aware of). What is || ? Is that logical-ese? I can't remember my symbolic logic, at the moment? Hpow about the "&&"?
|| represents logical OR and
&& represents logical AND. These are borrowed from ANSI C.
Quote:
So, with CE/Low, and WE/Low (again, from RWB from 65816?) OE/ would have to be high to initiate a write cycle; I won't do this (pull OE/ high) while its in the socket, so writing to it by accident won't be a problem.
Just so you understand what these chip control symbols mean,
/CE is "chip enable," and may also be written as
/CS, meaning "chip select."
/OE means "output enable" and
/WE means "write enable." As with
/CE, other notations may be used, but mean the same thing.
Using the Cypress CY7C1049D static RAM as an example, the control inputs are designated
/CE,
/OE and
/WE. You would assert
/CE when the address placed on the address bus by the MPU is one that is somewhere in RAM. This should occur as soon as the address bus becomes valid, which is sometime during the Ø2 low part of the cycle.
When Ø2 goes high, glue logic would "translate" the MPU's
RWB output to assert
/OE if a read cycle (
RWB is high) or
/WE if a write cycle (
RWB is low). Note that neither
/OE or
/WE should be asserted until Ø2 is high. This is especially important during a write cycle, as the address bus can change during Ø2 low, which could result in a wild write if
/WE is asserted at that time.
Also, during Ø2 low, the 65C816 places the bank address on the data bus. If
/OE on the SRAM is asserted at that time both the '816 and the SRAM will attempt to drive the data bus, causing contention and a possibly-bogus bank address.
If you carefully inspect the timing details of the Cypress SRAM, you will see that the time required for it to generate output varies with the order in which you assert
/CE and
/OE. As the 65C02 and 65C816 both place a valid address on the address bus during Ø2 low, and maintain that address until after the next fall of the clock, best performance is achieved by asserting chip selects as soon as the address is present (and the '816 indicates when a valid address is present with the
VDA and
VPA outputs). With
/CE asserted the SRAM will respond most rapidly when
/OE or
/WE is asserted. If you tie
/OE low and control the SRAM with
/CE alone, the time required for output to appear after selection will increase.
The CY7C1049D data sheet doesn't specifically state what happens if
/OE and
/WE are simultaneously asserted (but see figure 7 on page 9 for some confusion in that regard). In some other SRAMs, such as the 128KB unit I used in POC V1, the data sheet indicates that simultaneously asserting
/OE and
/WE will result in undefined behavior. Hence POC asserts
/OE only when the SRAM is accessed during a read cycle and, of course, only when Ø2 is high. As I needed separate read and write control signals for use with the SCSI host adapter and the DUART (the latter which requires exclusivity with the read and write control inputs), no extra circuitry was involved in controlling the SRAM in this fashion. Also, with no reads allowed during Ø2 low, I eliminated any possibility of data bus contention with the '816.
GARTHWILSON wrote:
The Cypress page you show does mean OE\ is a "don't care" when WE\ is low or CE\ is high. That's prety usual. I don't doubt that BDD's mentioned scenario exists somewhere in the world of RAM, but I haven't seen it myself. Regardless, you always have to consult the truth tables and timing diagrams and charts to make sure you're doing things right.
I quote from page six of the ON Semiconductor 28C256 EEPROM data sheet:
A write cycle is executed when both CE and WE are low, and OE is high.
Similarly, from the Atmel 28HC64 EEPROM data sheet, subsection 4.2:
A low pulse on the WE or CE input with CE or WE low (respectively) and OE high initiates a write cycle.
In both cases, it is required that
/OE be high while writing.