65c02 computer motherboard design feedback
65c02 computer motherboard design feedback
I am working on my own 8-bit computer based on the 65c02, and after about a year at the breadboard stage, I am now preparing a PCB for a more permanent design.
Basically, the architecture is based the one from Ben Eaters video series, but with a slightly more advanced address decoding scheme to accommodate a number of expansion cards/peripherals/devices. Also, there is interrupt multiplexing circuit to handle all the devices. The first device is integrated on the motherboard (a 65c22 with GPIO pins). Here is the address map:
• 0x0000-0x7fff RAM (32KiB)
• 0x8000-0x87ff Dev0-Dev7 (256 registers per device)
• 0x8800-0x8fff IrqDev (really only one register)
• 0x9000-0xffff ROM (28KiB)
Oh yeah, I am aiming for a 1MHz clock, so hopefully pretty permissive in terms of propagation delays.
I have been working on this motherboard PCB for a while, I am starting to be happy with the design (see attached pictures). Any feedback before I send it off for production would be greatly appreciated! Of course, there are endless variations in a design like this, but it would be good to avoid making any bigger mistakes that I regret later. Some particular questions:
• Does the power supply design make sense? I thought a simple 5V input would be the simplest solution, but is there any drawbacks with that?
• The reset circuit is just the simplest possible. Would I regret not making something more fancy?
Basically, the architecture is based the one from Ben Eaters video series, but with a slightly more advanced address decoding scheme to accommodate a number of expansion cards/peripherals/devices. Also, there is interrupt multiplexing circuit to handle all the devices. The first device is integrated on the motherboard (a 65c22 with GPIO pins). Here is the address map:
• 0x0000-0x7fff RAM (32KiB)
• 0x8000-0x87ff Dev0-Dev7 (256 registers per device)
• 0x8800-0x8fff IrqDev (really only one register)
• 0x9000-0xffff ROM (28KiB)
Oh yeah, I am aiming for a 1MHz clock, so hopefully pretty permissive in terms of propagation delays.
I have been working on this motherboard PCB for a while, I am starting to be happy with the design (see attached pictures). Any feedback before I send it off for production would be greatly appreciated! Of course, there are endless variations in a design like this, but it would be good to avoid making any bigger mistakes that I regret later. Some particular questions:
• Does the power supply design make sense? I thought a simple 5V input would be the simplest solution, but is there any drawbacks with that?
• The reset circuit is just the simplest possible. Would I regret not making something more fancy?
Re: 65c02 computer motherboard design feedback
Welcome! I hope (and expect) you will get the feedback you request...
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 65c02 computer motherboard design feedback
Welcome to 6502-land.
Unfortunately, I can't read some of the schematic because of the color, but I was able to make out the reset circuit (and one or two other details). As designed, reset won't work properly. You need to add something to hold reset down for a short while after power is first applied—150-250 milliseconds is sufficient. You can use something like a Maxim DS1813, or you can "roll your own" with a Schmitt trigger and a simple resistance-capacitance delay. As the 65C02's reset input is not Schmitt, merely attaching an R-C delay will not produce a clean reset.
10K is too high a value for pull-up resistors—your circuit will be noise-sensitive. I recommend going down to 3.3K.
It's best to not mix 74LS logic with CMOS logic. While CMOS can reliably drive LS, the other way around isn't true. You should be using all CMOS.
May I suggest you refer to Garth Wilson's "6502 primer" article? His series of pages offers much more detail than you can get from some videos.
Unfortunately, I can't read some of the schematic because of the color, but I was able to make out the reset circuit (and one or two other details). As designed, reset won't work properly. You need to add something to hold reset down for a short while after power is first applied—150-250 milliseconds is sufficient. You can use something like a Maxim DS1813, or you can "roll your own" with a Schmitt trigger and a simple resistance-capacitance delay. As the 65C02's reset input is not Schmitt, merely attaching an R-C delay will not produce a clean reset.
10K is too high a value for pull-up resistors—your circuit will be noise-sensitive. I recommend going down to 3.3K.
It's best to not mix 74LS logic with CMOS logic. While CMOS can reliably drive LS, the other way around isn't true. You should be using all CMOS.
May I suggest you refer to Garth Wilson's "6502 primer" article? His series of pages offers much more detail than you can get from some videos.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: 65c02 computer motherboard design feedback
Hi Stegosaurus,
I am sorry about the colors, is it the combination of red/green that is problematic for colorblindness? This is how kicad draws stuff by default, I will see if I can tweak that.
Thanks for the heads up regarding the reset circuitry; the page you linked to explained what I need to do pretty clearly (http://wilsonminesco.com/6502primer/RSTreqs.html). I did find that there were three versions of the DS1813 (-5+, -10+, and -15+) with different threshold voltages. Does it matter which one I choose? I guess the most permissive one should be okay (-15+ with threshold 4.13V).
I am sorry about the colors, is it the combination of red/green that is problematic for colorblindness? This is how kicad draws stuff by default, I will see if I can tweak that.
Thanks for the heads up regarding the reset circuitry; the page you linked to explained what I need to do pretty clearly (http://wilsonminesco.com/6502primer/RSTreqs.html). I did find that there were three versions of the DS1813 (-5+, -10+, and -15+) with different threshold voltages. Does it matter which one I choose? I guess the most permissive one should be okay (-15+ with threshold 4.13V).
Re: 65c02 computer motherboard design feedback
Oh and thanks for pointing out regarding HC vs LS chip families. I have understood that the HCT family is TTL compatible, but it is still CMOS like the HC, so should be okay, or?
Re: 65c02 computer motherboard design feedback
Updated schematic with added ds1813, and a smaller CXO. Are these colors better?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 65c02 computer motherboard design feedback
kalj wrote:
I am sorry about the colors, is it the combination of red/green that is problematic for colorblindness? This is how kicad draws stuff by default, I will see if I can tweak that.
I'm blue-green colorblind (tritanomaly), along with some trouble distinguishing yellow from white. Blues and greens on a white or yellow background are almost invisible to me, moreso on white. Reds and greens are fine.
Quote:
Thanks for the heads up regarding the reset circuitry; the page you linked to explained what I need to do pretty clearly (http://wilsonminesco.com/6502primer/RSTreqs.html). I did find that there were three versions of the DS1813 (-5+, -10+, and -15+) with different threshold voltages. Does it matter which one I choose? I guess the most permissive one should be okay (-15+ with threshold 4.13V).
Your choice would depend on how stable your power source is. I use the -5 version (4.62 volts), which works for me because I use an old PC power supply to run my unit and can count on it to produce a stable output. If you're powering your contraption from a 5 volt wall-wart, you probably should go with the -15 version so you don't get nuisance resets.
The DS1813 is available in a TO-92 package, which is quite hobby-friendly. It's also available in SMT if you are pinched for working space.
Quote:
Oh and thanks for pointing out regarding HC vs LS chip families. I have understood that the HCT family is TTL compatible, but it is still CMOS like the HC, so should be okay, or?
Yes, an HCT device's input will "understand" LS output. However, there is no good reason to use LS at all. Virtually everything that was developed in LS logic is available in CMOS—and if it isn't, you probably shouldn't be using it. There are also other CMOS families worth considering, especially 74AHC(T) which produces the performance levels of 74ABT and 74AC, but with "gentler" outputs that are less likely to provoke ringing and other circuit maladies associated with extremely fast edges.
Speaking of CMOS vs. LS, you should know that the inputs to the WDC 65C02S ('S' referring to the static-core version, which is current production) recognize around 2.6 volts as a minimum logic 1 state. This is contrary to what the data sheet says, and was determined by actual testing by another member (Dr Jefyl). The guaranteed logic 1 output level of an LS device is 2.4 volts. Theoretically, LS logic can reach 3.4 volts in a 5 volt system, but that assumes zero loading, which is never going to happen in a practical circuit. Ergo driving a 65C02 input from LS logic may not be reliable.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: 65c02 computer motherboard design feedback
Is it too late to allow for +/- split supplies(maybe 12V or 15V) in addition to the 5V? The reason is you may want to create a device where you want to use op-amps or other analogue circuitry that requires split supplies and/or voltages higher than 5V.
But I do favor bussed computers. Nice!
But I do favor bussed computers. Nice!
Bill
Re: 65c02 computer motherboard design feedback
I wonder if you might want to include the PHI2 qualified read and write signals on that 'ctrl' bus to support non-6500 type peripheral ICs?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 65c02 computer motherboard design feedback
Michael wrote:
I wonder if you might want to include the PHI2 qualified read and write signals on that 'ctrl' bus to support non-6500 type peripheral ICs?
That's a good suggestion. Something like this:
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: 65c02 computer motherboard design feedback
Michael wrote:
I wonder if you might want to include the PHI2 qualified read and write signals on that 'ctrl' bus to support non-6500 type peripheral ICs?
BigDumbDinosaur wrote:
That's a good suggestion. Something like this:
But I thought for simplicity that each peripheral could be responsible for computing whatever signals it needs based on the raw phi2/rwb/csb signals.
But yeah, it might make sense, but now I feel a bit too lazy to rewire to rewire the two additional signals into the bus
Last edited by kalj on Tue Oct 26, 2021 6:55 pm, edited 1 time in total.
Re: 65c02 computer motherboard design feedback
BillO wrote:
Is it too late to allow for +/- split supplies(maybe 12V or 15V) in addition to the 5V? The reason is you may want to create a device where you want to use op-amps or other analogue circuitry that requires split supplies and/or voltages higher than 5V.
But I do favor bussed computers. Nice!
But I do favor bussed computers. Nice!
What devices could need that? Stuff I am thinking about doing:
* UART (FPGA-based, already done)
* PS/2 input
* VGA graphics (using FPGA)
* Sound synthesis
Out of this, I guess the sound synthesizer could use op amps, but would I be able to do it with just 0 / 5V? Perhaps...
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: 65c02 computer motherboard design feedback
kalj wrote:
BillO wrote:
Is it too late to allow for +/- split supplies(maybe 12V or 15V) in addition to the 5V? The reason is you may want to create a device where you want to use op-amps or other analogue circuitry that requires split supplies and/or voltages higher than 5V.
- Programming my PIC microcontrollers takes 13V.
- The op amps for my data converters take the ± voltages.
- My fast D/A converter needs a negative voltage.
- The audio power amp (following the D/A, or optionally to monitor the A/D input, switch-selectable) needs the higher positive voltage, to get decent power out to an external 8Ω speaker with one side at ground, ie, not having to resort to a bridged output.
- My RS-232 line drivers, the MC145406 (same thing as the SN75C1406), give three line drivers and three line receivers in a 16-pin DIP, not needing extra pins for the charge-pump capacitors to derive the higher voltages, so board space is saved.
- Some nice supertwist LCDs need a negative voltage for the backplane.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: 65c02 computer motherboard design feedback
honestly I wouldn't bother with including more voltages. the only one i could think of that would be useful to have on hand is 3.3V, to interface things like FPGAs, SD Cards, and a Raspberry Pi (and pico) if you're into that.
If you actually want to get into sound generation it should be somewhat straight forward to just use some existing chip like a YM3812 or SN76489, which don't require any negative voltages for their Amp circuitry, so i'm sure you'll be fine with just having 5V for now.
and one question i always had whenever i saw someone post about their retro computer but never bothered to ask... why an EEPROM over a FLASH chip?
i don't really see the appeal... unless you already had some lying around, or got an old programmer that cannot handle Flash (or don't want to spend time turning an Arduino into a Flash Programmer)
Flash is much faster, comes in higher capacities (not that relevant for an 8 bit CPU, but more for something like the 65C816 or 68k), and is usually much cheaper brand new.
also in your schematic at the Interrupt logic, why not have the output of the 74HC148 go to D1-D2 instead of D0-D2? that way you save yourself a shift instruction when handling Interrupts.
a bit more detail in the primer: http://www.6502.org/mini-projects/prior ... coder.html
overall it's a pretty neat looking board and i'll hope you make lots of cards for it!
though personally i would've used KiCad's "Conn_02x<number>_Odd_Even" symbol for the expansion connectors. as they look a lot closer to the actual footprint, so it's easer to wrap your head around where each pin is gonna end up on the PCB.
If you actually want to get into sound generation it should be somewhat straight forward to just use some existing chip like a YM3812 or SN76489, which don't require any negative voltages for their Amp circuitry, so i'm sure you'll be fine with just having 5V for now.
and one question i always had whenever i saw someone post about their retro computer but never bothered to ask... why an EEPROM over a FLASH chip?
i don't really see the appeal... unless you already had some lying around, or got an old programmer that cannot handle Flash (or don't want to spend time turning an Arduino into a Flash Programmer)
Flash is much faster, comes in higher capacities (not that relevant for an 8 bit CPU, but more for something like the 65C816 or 68k), and is usually much cheaper brand new.
also in your schematic at the Interrupt logic, why not have the output of the 74HC148 go to D1-D2 instead of D0-D2? that way you save yourself a shift instruction when handling Interrupts.
a bit more detail in the primer: http://www.6502.org/mini-projects/prior ... coder.html
overall it's a pretty neat looking board and i'll hope you make lots of cards for it!
though personally i would've used KiCad's "Conn_02x<number>_Odd_Even" symbol for the expansion connectors. as they look a lot closer to the actual footprint, so it's easer to wrap your head around where each pin is gonna end up on the PCB.
Re: 65c02 computer motherboard design feedback
Proxy wrote:
honestly I wouldn't bother with including more voltages. the only one i could think of that would be useful to have on hand is 3.3V, to interface things like FPGAs, SD Cards, and a Raspberry Pi (and pico) if you're into that.
If you actually want to get into sound generation it should be somewhat straight forward to just use some existing chip like a YM3812 or SN76489, which don't require any negative voltages for their Amp circuitry, so i'm sure you'll be fine with just having 5V for now.
and one question i always had whenever i saw someone post about their retro computer but never bothered to ask... why an EEPROM over a FLASH chip?
i don't really see the appeal... unless you already had some lying around, or got an old programmer that cannot handle Flash (or don't want to spend time turning an Arduino into a Flash Programmer)
Flash is much faster, comes in higher capacities (not that relevant for an 8 bit CPU, but more for something like the 65C816 or 68k), and is usually much cheaper brand new.
also in your schematic at the Interrupt logic, why not have the output of the 74HC148 go to D1-D2 instead of D0-D2? that way you save yourself a shift instruction when handling Interrupts.
a bit more detail in the primer: http://www.6502.org/mini-projects/prior ... coder.html
overall it's a pretty neat looking board and i'll hope you make lots of cards for it!
though personally i would've used KiCad's "Conn_02x<number>_Odd_Even" symbol for the expansion connectors. as they look a lot closer to the actual footprint, so it's easer to wrap your head around where each pin is gonna end up on the PCB.
If you actually want to get into sound generation it should be somewhat straight forward to just use some existing chip like a YM3812 or SN76489, which don't require any negative voltages for their Amp circuitry, so i'm sure you'll be fine with just having 5V for now.
and one question i always had whenever i saw someone post about their retro computer but never bothered to ask... why an EEPROM over a FLASH chip?
i don't really see the appeal... unless you already had some lying around, or got an old programmer that cannot handle Flash (or don't want to spend time turning an Arduino into a Flash Programmer)
Flash is much faster, comes in higher capacities (not that relevant for an 8 bit CPU, but more for something like the 65C816 or 68k), and is usually much cheaper brand new.
also in your schematic at the Interrupt logic, why not have the output of the 74HC148 go to D1-D2 instead of D0-D2? that way you save yourself a shift instruction when handling Interrupts.
a bit more detail in the primer: http://www.6502.org/mini-projects/prior ... coder.html
overall it's a pretty neat looking board and i'll hope you make lots of cards for it!
though personally i would've used KiCad's "Conn_02x<number>_Odd_Even" symbol for the expansion connectors. as they look a lot closer to the actual footprint, so it's easer to wrap your head around where each pin is gonna end up on the PCB.
That D1-D3 idea is actually quite smart, thanks for the suggestion and the link!
Regarding flash vs EEPROM, I guess I went with what I that suited the style / era. But sure, there are probably endless improvements possible. Now that you mention it, are there any good flash chips that suit the bus of a computer like this?