Simple 6502 computer, some BUS questions?
Posted: Sun Feb 16, 2014 12:10 pm
Hello All,
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...
I am a decent programmer, and have a practical knowledge of electronics, so its mostly the fundamentals of a discrete computer that I will be learning in this project.
I want to keep things simple (KISS) to start with but there are a few aspects of my initial design that I need some guidance in.
For my initial design, I would ideally like to leverage only 3 chips, the R65C02, 64k SRAM, and an Arduino Nano (Microcontroller).
The SRAM will cover the entire address space of the R65C02, so I don't have to worry yet about address decoding.
The SRAM will act as both the RAM space and ROM of more conventional designs.
The Arduino Nano will be controlled via the PCs (USB) serial port, and will be used to manipulate the contents of the SRAM to load programs, and echo back the SRAM's state to verify the computers operation.
The Arduino will also provide the 1MHz clock for the processor.
This leads to my first uncertainty, as this design seems to need a shared address and data bus between the 6502 and the Arduino.
From the data sheets I understand that the 6502 cant set the address bus into a high impedance mode, which will lead to bus contention.
It seems that the BE (bus enable) pin is only present on the (65102?), which would have been ideal.
Can anyone point me in a good direction here with this problem? I would rather not increase the complexity by using extra chips (74ACT245) to interface the 6502 to the bus.
The most simple solution in my mind is to simply power down the 6502 when the Arduino wants to take control of the SRAM. Would this release the 6502's grip on the address and data lines?
May this damage the 6502 if its address/data pins are raised to 5v while its Vdd is at 0v or floating?
I have almost all the parts I should need here, so this seems to be the only hurdle that I can see.
I would very much appreciate some expert advice in this area, and please point out anything I seem to have misunderstood, or share alternative/better ideas with me.
Thanks.
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...
I am a decent programmer, and have a practical knowledge of electronics, so its mostly the fundamentals of a discrete computer that I will be learning in this project.
I want to keep things simple (KISS) to start with but there are a few aspects of my initial design that I need some guidance in.
For my initial design, I would ideally like to leverage only 3 chips, the R65C02, 64k SRAM, and an Arduino Nano (Microcontroller).
The SRAM will cover the entire address space of the R65C02, so I don't have to worry yet about address decoding.
The SRAM will act as both the RAM space and ROM of more conventional designs.
The Arduino Nano will be controlled via the PCs (USB) serial port, and will be used to manipulate the contents of the SRAM to load programs, and echo back the SRAM's state to verify the computers operation.
The Arduino will also provide the 1MHz clock for the processor.
This leads to my first uncertainty, as this design seems to need a shared address and data bus between the 6502 and the Arduino.
From the data sheets I understand that the 6502 cant set the address bus into a high impedance mode, which will lead to bus contention.
It seems that the BE (bus enable) pin is only present on the (65102?), which would have been ideal.
Can anyone point me in a good direction here with this problem? I would rather not increase the complexity by using extra chips (74ACT245) to interface the 6502 to the bus.
The most simple solution in my mind is to simply power down the 6502 when the Arduino wants to take control of the SRAM. Would this release the 6502's grip on the address and data lines?
May this damage the 6502 if its address/data pins are raised to 5v while its Vdd is at 0v or floating?
I have almost all the parts I should need here, so this seems to be the only hurdle that I can see.
I would very much appreciate some expert advice in this area, and please point out anything I seem to have misunderstood, or share alternative/better ideas with me.
Thanks.