cbmeeks wrote:
Unfortunately, the only 6502 I have (not counting the 50+ computers I own) that is breadboard ready is a vanilla, legacy 6502 so it sounds like I need to get some more modern variants.
You can build with the NMOS 6502, as long as you understand the limitations of this device. As Ed pointed out, you won't be able to run it at 14 MHz, as most 6502s can only operate in the 1 to 2 MHz range. Also, being an NMOS device, its output drive is weak, which sets a hard limit on how much you can attach to the address and data buses—poor drive strength also increases sensitivity to the effects of sloppy construction techniques. As I earlier said and Ed also noted, the 65C02 is a much better choice for a new design.
Quote:
So it sounds like I should tie Φ2 (output) from the 6502 to my SRAM so that when I am writing, I am doing so in the second half of the cycle? And, that would be pretty much the only reason to use Φ2 at all?
Please re-read my previous post!
Although the 65C02 still has the Ø1 out and Ø2 out signals, their use is not recommended in new designs.
Also, you must not have read the part where I said chip selects
should not be gated by the clock.
Quote:
I think, however, for my first iteration I will stick to 1 MHz because 14 MHz would probably be more complicated.
14 MHz operation isn't any more complicated than 1 MHz operation—circuit design, hence complexity, is a function of the required logic. The desired clock rate, however, dictates the degree of meticulousness required in the construction of the unit. As Garth Wilson has often noted, you can get away with murder at 1 MHz. At 14 MHz, reactive effects due to sloppy construction techniques may result in an unstable or DOA unit. As I've often advised, learn how to fly a Piper Cub before climbing into the cockpit of a 747. In other words, build for 1 MHz and learn from it so when you do decide to build that 14 MHz unit you will have a high probability of success.
Quote:
So, if I use the propeller to generate a 1 MHz clock, can I simply "pause" the signal generator when I want the propeller to access SRAM? Would I have to wait for the CPU to finish what it was doing (i.e., finish the clock cycle) before I did anything else?
You could, although as Ed notes, this is best accomplished with the 65C02. The NMOS parts require that a minimum clock rate be maintained at all times in order to avoid loss of data from the registers. The WDC 65C02 can be completely stopped with the clock in either phase for an indefinite period of time without data loss.
However, a better way to stop and start the 65C02 is by using the RDY input and not fooling around with the clock. When RDY is high the 65C02 is active and processing instructions. When RDY is low the 65C02 stops at the next Ø2 high and remains stopped until RDY goes high again. While stopped, the 65C02 maintains bus state, which gives a slow device more time to respond to selection and read/write commands—this is what we call a "wait-state". Note that the NMOS 6502 will not respond to RDY during a write cycle, which is yet another reason why the NMOS part should be avoided in new designs.
That said, there's more to allowing both the 65C02 and Propellor device to share access to SRAM than just stopping the MPU. Not only must you stop the MPU, you have to "disconnect" it from the circuit so as to avoid bus contention. With the 65C02 this is accomplished by negating the BE (bus enable) input. As long as BE is low, D0-D7, A0-A15 and RWB will go to the high impedance (hi-Z) state, allowing something else to drive the buses. When BE is brought high again the 65C02 will resume driving the buses.
Similarly, while the MPU has control (that is, acting as the "bus master"), the Propellor must be "disconnected" from the buses, again to avoid contention. I don't know enough about the Propellor to advise as to how you might do this, so you will need to read that device's data sheet for guidance.