6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 4:34 pm

All times are UTC




Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Sat Oct 23, 2021 5:10 pm 
Offline

Joined: Sat Oct 23, 2021 8:05 am
Posts: 15
Location: Sweden
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
pcb2.png [ 1003.34 KiB | Viewed 2305 times ]
pcb.png
pcb.png [ 257.66 KiB | Viewed 2305 times ]
schematic.png
schematic.png [ 195.31 KiB | Viewed 2305 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 23, 2021 8:56 pm 
Online
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Welcome! I hope (and expect) you will get the feedback you request...


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 23, 2021 9:57 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
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!


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 24, 2021 8:29 am 
Offline

Joined: Sat Oct 23, 2021 8:05 am
Posts: 15
Location: Sweden
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).


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 24, 2021 9:02 am 
Offline

Joined: Sat Oct 23, 2021 8:05 am
Posts: 15
Location: Sweden
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?


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 24, 2021 9:26 am 
Offline

Joined: Sat Oct 23, 2021 8:05 am
Posts: 15
Location: Sweden
Updated schematic with added ds1813, and a smaller CXO. Are these colors better?


Attachments:
pcb3d.png
pcb3d.png [ 914.54 KiB | Viewed 2236 times ]
pcb.png
pcb.png [ 272.34 KiB | Viewed 2236 times ]
schematic.png
schematic.png [ 195.97 KiB | Viewed 2236 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 24, 2021 6:29 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
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!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 25, 2021 11:27 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1007
Location: Canada
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


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 3:30 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 589
Location: Michigan, USA
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?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 6:57 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
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:

Attachment:
File comment: Ø2-Qualified Read/Write
read_write_qualify_alt.gif
read_write_qualify_alt.gif [ 46.98 KiB | Viewed 2103 times ]

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 6:46 pm 
Offline

Joined: Sat Oct 23, 2021 8:05 am
Posts: 15
Location: Sweden
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:

Attachment:
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:
Attachment:
rw.png
rw.png [ 5.86 KiB | Viewed 2072 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.

Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 6:51 pm 
Offline

Joined: Sat Oct 23, 2021 8:05 am
Posts: 15
Location: Sweden
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...


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 7:25 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
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?


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 28, 2021 6:19 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 28, 2021 7:10 pm 
Offline

Joined: Sat Oct 23, 2021 8:05 am
Posts: 15
Location: Sweden
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?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: