65c02 computer motherboard design feedback

For discussing the 65xx hardware itself or electronics projects.
kalj
Posts: 15
Joined: 23 Oct 2021
Location: Sweden

65c02 computer motherboard design feedback

Post by kalj »

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?
Attachments
pcb2.png
pcb.png
schematic.png
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: 65c02 computer motherboard design feedback

Post by BigEd »

Welcome! I hope (and expect) you will get the feedback you request...
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 65c02 computer motherboard design feedback

Post by BigDumbDinosaur »

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.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
kalj
Posts: 15
Joined: 23 Oct 2021
Location: Sweden

Re: 65c02 computer motherboard design feedback

Post by kalj »

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).
kalj
Posts: 15
Joined: 23 Oct 2021
Location: Sweden

Re: 65c02 computer motherboard design feedback

Post by kalj »

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?
kalj
Posts: 15
Joined: 23 Oct 2021
Location: Sweden

Re: 65c02 computer motherboard design feedback

Post by kalj »

Updated schematic with added ds1813, and a smaller CXO. Are these colors better?
Attachments
pcb3d.png
pcb.png
schematic.png
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 65c02 computer motherboard design feedback

Post by BigDumbDinosaur »

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!
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: 65c02 computer motherboard design feedback

Post by BillO »

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!
Bill
User avatar
Michael
Posts: 633
Joined: 13 Feb 2013
Location: Michigan, USA

Re: 65c02 computer motherboard design feedback

Post by Michael »

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?
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 65c02 computer motherboard design feedback

Post by BigDumbDinosaur »

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:

Ø2-Qualified Read/Write
Ø2-Qualified Read/Write
x86?  We ain't got no x86.  We don't NEED no stinking x86!
kalj
Posts: 15
Joined: 23 Oct 2021
Location: Sweden

Re: 65c02 computer motherboard design feedback

Post by kalj »

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:

The attachment read_write_qualify_alt.gif is no longer available
I thought about that too. In fact, I guess I already have that signal available from this part of the circuit:
rw.png
rw.png (5.86 KiB) Viewed 6342 times
(for some reason I decided to use ~WE instead of ~RW)

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 :P
Last edited by kalj on Tue Oct 26, 2021 6:55 pm, edited 1 time in total.
kalj
Posts: 15
Joined: 23 Oct 2021
Location: Sweden

Re: 65c02 computer motherboard design feedback

Post by kalj »

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!
Interesting. It would affect quite a lot of the schematic, so it would mean quite a bit of work of layout. Would also change the PSU requirements.

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...
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: 65c02 computer motherboard design feedback

Post by GARTHWILSON »

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.
What devices could need that?
I have ±12V (actually anything from about 9 to 13.5V, adjustable at my power supply but very non-critical in most cases) on my workbench computer for several things.

  • 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?
User avatar
Proxy
Posts: 746
Joined: 03 Aug 2018
Location: Germany

Re: 65c02 computer motherboard design feedback

Post by Proxy »

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.
kalj
Posts: 15
Joined: 23 Oct 2021
Location: Sweden

Re: 65c02 computer motherboard design feedback

Post by kalj »

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.
I also think I will settle with 5V and Gnd. Some limitations are actually nice and inspire your creativity.

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?
Post Reply