Pukuhaha wrote:
I recently have had a desire to create a (very) simple 6502 computer, for fun and learning, which I am sure that many here share...as this design seems to need a shared address and data bus between the 6502 and the Arduino.
Considering that you want either the MPU or the Arduino to act as a bus master, I strongly recommend the use of the genuine WDC 65C02 (part number W65C02S6TPG-14, which is a DIP-40 package). The WDC part has the BE (bus enable) input, which when asserted (active low), causes the MPU to tri-state D0-D7, A0-A15 and RWB.
The procedure to get the 65C02 to relinquish control is to first assert RDY (low true) to halt further processing. When Ø2 goes high, the MPU will stop on the current instruction. At that time you would assert BE to "disconnect" the MPU from the buses. You would then enable the Arduino. After the Arduino has completed its work you would get it off the buses and then de-assert the MPU's BE input. Once BE has been deasserted you would de-assert RDY, causing the 65C02 to resume processing.
Timing is everything with this sort of arrangement, so carefully think it through before you start designing the actual circuit.
Also, I recommend you use a TTL can oscillator to generate your 1 MHz Ø2 clock, and clock the Arduino from it as well. This arrangement will allow you to change the Ø2 clock without having to reprogram the Arduino.