Starting with my first SBC Project, Plans and Confusions

Building your first 6502-based project? We'll help you get started here.
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Starting with my first SBC Project, Plans and Confusions

Post by BigDumbDinosaur »

cjs wrote:
Most SRAM I've seen has, at first glance, what look like JEDEC pinouts, but I've not actually bothered to dig into their standards to see what JEDEC has to say about this.)
The only 32KB SRAM data sheet I have in my library refers to a 28-pin JEDEC standard. I also noted this blurb in the data sheet for an ISSI 512KB SRAM:
  • The IS61C5128AL/AS and IS64C5128AL/AS are packaged in the JEDEC standard 36-pin SOJ (400-mil), 32-pin sTSOP-I, 32-pin SOP, 44-pin TSOP-II and 32-pin TSOP-II packages
That's a little ambiguous, in that it isn't entirely clear if "JEDEC standard" refers to the internal pin connections as well as the package itself. However, this product has the exact same pinout as the Cypress 512KB SRAM, so there may be some sort of standard for that.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
Proxy
Posts: 746
Joined: 03 Aug 2018
Location: Germany

Re: Starting with my first SBC Project, Plans and Confusions

Post by Proxy »

BigDumbDinosaur wrote:
Proxy wrote:
..."speaking of which i also need a power-up reset circuit" i meant "speaking of reset circuits i also need an additional circuit that brings the reset line low automatically on power up".
The simplest route and also the one that consumes the least amount of board space is using the Maxim DS1813 reset controller. It's available in TO-92 or SMT packaging (SOT-23, which is really tiny). The DS1813 is sensitive to power supply voltage, so it will hold the MPU in reset until 150 milliseconds after the power supply voltage has reached at least 4.0 volts (depends on which model is used). A pushbutton wired from reset to ground can be used to trigger a manual reset—the same 150ms pause will occur. No other components are required. See attached.
well dammit, i wish i would've known of that earlier. and looking at the example circuit they have it's basically perfect as i can just hook the switch up in parallel to it and it will keep the line held low for 150ms after letting it go... does this also mean i don't need a capacitor for the Switch? and since it has an internal pull-up resistor it also seems i don't need to have an external one...

modern technology is amazing.

this is the new Reset circuit:
Image
User avatar
Michael
Posts: 633
Joined: 13 Feb 2013
Location: Michigan, USA

Re: Starting with my first SBC Project, Plans and Confusions

Post by Michael »

Microchip makes one, too. The MCP130 Microcontroller Supervisory Circuit is available in a TO-92 or SOT23-3 package and seven different trip voltages to support 3.0v, 3.3v, or 5.0v systems.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Starting with my first SBC Project, Plans and Confusions

Post by GARTHWILSON »

Proxy wrote:
BigDumbDinosaur wrote:
The simplest route and also the one that consumes the least amount of board space is using the Maxim DS1813 reset controller. It's available in TO-92 or SMT packaging (SOT-23, which is really tiny). The DS1813 is sensitive to power supply voltage, so it will hold the MPU in reset until 150 milliseconds after the power supply voltage has reached at least 4.0 volts (depends on which model is used). A pushbutton wired from reset to ground can be used to trigger a manual reset—the same 150ms pause will occur. No other components are required. See attached.
well dammit, i wish i would've known of that earlier.
That's in the 6502 primer's reset-circuit page too (first circuit, near the top of the page). :D
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
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Starting with my first SBC Project, Plans and Confusions

Post by GARTHWILSON »

Proxy wrote:
are ceramic 0.1uF caps enough for decoupling capacitors? or is there another type i should be using?
I'll just assume every unpolarized capacitor is supposed to be ceramic, and every polarized one electrolytic.
That's right. Put a ceramic one from power and ground at each IC, with the connections as short as practical. 0.1uF is typical. There should also be an electrolytic nearby, like 100uF, but very non-critical.
Quote:
oh i see. In KiCad Symbols are used for the Schematic, and Footprints for the PCB.
In the CAD I use, there are schematic symbols and PCB symbols. (I don't use schematic capture though, because there are major things about all of them I've tried that I don't like; so I still do my schematics by hand.)
Quote:
i will update the previous comment that had the "IMAGE" link shortly after this
The forum software doesn't seem to like .png files. It still doesn't show. Do a "Preview" (below the edit window, to the left of "Submit") before posting. You can also have the forum host the pictures so if the hosting site goes down or you cancel your account or whatever, the picture still remains here indefinitely. We keep the archives for good reason, and people do look at stuff many years later.
Quote:
so what diode should i choose? i know there are different types and that they all have different values like breakdown voltage, voltage drop, etc. but i'm not sure if any of those are really important
Your 1N400x would not be good for digital signals, but I'm sure it's totally fine for the reset circuit.
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
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Starting with my first SBC Project, Plans and Confusions

Post by BigDumbDinosaur »

Proxy wrote:
well dammit, i wish i would've known of that earlier. and looking at the example circuit they have it's basically perfect as i can just hook the switch up in parallel to it and it will keep the line held low for 150ms after letting it go... does this also mean i don't need a capacitor for the Switch? and since it has an internal pull-up resistor it also seems i don't need to have an external one...
Do not put a capacitor across the push button. I recommend a 3.3K pull-up resistor to improve noise immunity, but it's not a requirement.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
Proxy
Posts: 746
Joined: 03 Aug 2018
Location: Germany

Re: Starting with my first SBC Project, Plans and Confusions

Post by Proxy »

GARTHWILSON wrote:
Proxy wrote:
BigDumbDinosaur wrote:
The simplest route and also the one that consumes the least amount of board space is using the Maxim DS1813 reset controller. It's available in TO-92 or SMT packaging (SOT-23, which is really tiny). The DS1813 is sensitive to power supply voltage, so it will hold the MPU in reset until 150 milliseconds after the power supply voltage has reached at least 4.0 volts (depends on which model is used). A pushbutton wired from reset to ground can be used to trigger a manual reset—the same 150ms pause will occur. No other components are required. See attached.
well dammit, i wish i would've known of that earlier.
That's in the 6502 primer's reset-circuit page too (first circuit, near the top of the page). :D
and again, i am blind. i don't know how i keep doing this.
GARTHWILSON wrote:
Proxy wrote:
are ceramic 0.1uF caps enough for decoupling capacitors? or is there another type i should be using?
I'll just assume every unpolarized capacitor is supposed to be ceramic, and every polarized one electrolytic.
That's right. Put a ceramic one from power and ground at each IC, with the connections as short as practical. 0.1uF is typical. There should also be an electrolytic nearby, like 100uF, but very non-critical.
Quote:
oh i see. In KiCad Symbols are used for the Schematic, and Footprints for the PCB.
In the CAD I use, there are schematic symbols and PCB symbols. (I don't use schematic capture though, because there are major things about all of them I've tried that I don't like; so I still do my schematics by hand.)
well if Mouser supplies free and premade schematic and PCB symbols, why not? i'm lazy anyways so it fits perfectly.
GARTHWILSON wrote:
Quote:
i will update the previous comment that had the "IMAGE" link shortly after this
The forum software doesn't seem to like .png files. It still doesn't show. Do a "Preview" (below the edit window, to the left of "Submit") before posting. You can also have the forum host the pictures so if the hosting site goes down or you cancel your account or whatever, the picture still remains here indefinitely. We keep the archives for good reason, and people do look at stuff many years later.
it's not supposed to show, it's a URL... you click it to show the image, as i mentioned in a previous comment i made it a link instead of an in-forum image because the size is ridiculous (yay for 4k screens!) and would not look good on here.

also it's hosted on imgur, even when you don't have an account they NEVER delete images (unless they were made public and deleted by admins for being agaist rules or similar), which is why i use that site.
GARTHWILSON wrote:
Quote:
so what diode should i choose? i know there are different types and that they all have different values like breakdown voltage, voltage drop, etc. but i'm not sure if any of those are really important
Your 1N400x would not be good for digital signals, but I'm sure it's totally fine for the reset circuit.
looking online, 1N4148 seems to be a popular choice. i could order a few with the rest of the stuff i need to order if it's better suited for this.
Michael wrote:
Microchip makes one, too. The MCP130 Microcontroller Supervisory Circuit is available in a TO-92 or SOT23-3 package and seven different trip voltages to support 3.0v, 3.3v, or 5.0v systems.
but the DS1813 is also made to handle a manual reset on the same output line. so it's a bit more convenient.
BigDumbDinosaur wrote:
Proxy wrote:
well dammit, i wish i would've known of that earlier. and looking at the example circuit they have it's basically perfect as i can just hook the switch up in parallel to it and it will keep the line held low for 150ms after letting it go... does this also mean i don't need a capacitor for the Switch? and since it has an internal pull-up resistor it also seems i don't need to have an external one...
Do not put a capacitor across the push button. I recommend a 3.3K pull-up resistor to improve noise immunity, but it's not a requirement.
I still have the 4.7k Pull-up on it, so guess i can keep it there.
User avatar
cjs
Posts: 759
Joined: 01 Dec 2018
Location: Tokyo, Japan
Contact:

Re: Starting with my first SBC Project, Plans and Confusions

Post by cjs »

Proxy wrote:
GARTHWILSON wrote:
Proxy wrote:
well dammit, i wish i would've known of that earlier.
That's in the 6502 primer's reset-circuit page too (first circuit, near the top of the page). :D
and again, i am blind. i don't know how i keep doing this.
Well, there's a huge amount of information on Garth's site, so especially if you're not already fairly familiar with the site it's easy to miss things. One thing that I find helps is to take notes as one goes through a page, with summaries of information and links, and keep that in a file. That can help you make sure you don't miss anything; even when you skip over stuff that doesn't seem relevant right now, you can put in a note about what you skipped or skimmed, which really helps you remember that it's there to come back to if you realize later it is relevant.

(For an idea of what such notes look like when I've gone through a subject in detail, have a look at my CBM serial bus notes. That's eventually what my my SBC notes file will look like when I get around to doing more serious research on it.)
Proxy wrote:
looking online, 1N4148 seems to be a popular choice. i could order a few with the rest of the stuff i need to order if it's better suited for this.
Yes, that's the "standard" signal diode, so I'd go ahead and order a hundred of them.
Curt J. Sampson - github.com/0cjs
User avatar
Proxy
Posts: 746
Joined: 03 Aug 2018
Location: Germany

Re: Starting with my first SBC Project, Plans and Confusions

Post by Proxy »

cjs wrote:
Proxy wrote:
GARTHWILSON wrote:
Proxy wrote:
well dammit, i wish i would've known of that earlier.
That's in the 6502 primer's reset-circuit page too (first circuit, near the top of the page). :D
and again, i am blind. i don't know how i keep doing this.
Well, there's a huge amount of information on Garth's site, so especially if you're not already fairly familiar with the site it's easy to miss things. One thing that I find helps is to take notes as one goes through a page, with summaries of information and links, and keep that in a file. That can help you make sure you don't miss anything; even when you skip over stuff that doesn't seem relevant right now, you can put in a note about what you skipped or skimmed, which really helps you remember that it's there to come back to if you realize later it is relevant.

(For an idea of what such notes look like when I've gone through a subject in detail, have a look at my CBM serial bus notes. That's eventually what my my SBC notes file will look like when I get around to doing more serious research on it.)
Proxy wrote:
looking online, 1N4148 seems to be a popular choice. i could order a few with the rest of the stuff i need to order if it's better suited for this.
Yes, that's the "standard" signal diode, so I'd go ahead and order a hundred of them.
while very helpful i think i'm too lazy to take notes...
well i can order like 100 for 2 EUR so i might as well. (i'd only order 20 at most, because why would i need more? this is the first time i ever used a diode in something)

besides that, is there is anything else i'm missing on the schematic. i even added a Power LED.
also i'll add the image as attachment instead of a link as that seems to confuse some people.
kicad_2020-01-27_05-13-14.png
User avatar
Proxy
Posts: 746
Joined: 03 Aug 2018
Location: Germany

Re: Starting with my first SBC Project, Plans and Confusions

Post by Proxy »

Ok i'm having quite a lot of problems with aranging the components on the PCB.

i tried looking up other similar 65C02 or just any DIY Computer designs to get an idea on how to do it. and some tutorials.

i didn't really got a lot from either, i just know you're supposed to keep parts short and make sure nothing overlaps and stuff.

here is what i currently got, i'm very open to critism.
kicad_2020-01-28_09-41-26.png
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: Starting with my first SBC Project, Plans and Confusions

Post by drogon »

Proxy wrote:
Ok i'm having quite a lot of problems with aranging the components on the PCB.

i tried looking up other similar 65C02 or just any DIY Computer designs to get an idea on how to do it. and some tutorials.

i didn't really got a lot from either, i just know you're supposed to keep parts short and make sure nothing overlaps and stuff.

here is what i currently got, i'm very open to critism.
kicad_2020-01-28_09-41-26.png
Remember that you can swap address lines round going into the RAM if you need to (same for data but it looks like you have a nice data path there). I vertically stacked my 2 32KB RAM chips - and brought out the 2nd select line - more for laziness than anything else. You can also put the decoupling capacitors inside the sockets - and maybe some resistors too. I don't have an (OCD :) ) issue flipping or quarter turning chips too if it makes the routing easier, although you just need to make sure the board is adequately marked (one issue I have is that I'm using square can oscillators and one is quarter turned from the other and yes, I've put one in the wrong way round...)

I also use the autorouter in Fritzing which is rubbish, but it gives me a proof of concept or at least lets me know that it's physically possible, then I undo it and manually route the board. And you can try to apply some of the usual guidelines - like horizontal lines on one side, vertical on the other but that never fully works for me.

Nice compact board though - hope it goes well!

Cheers,

-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Starting with my first SBC Project, Plans and Confusions

Post by GARTHWILSON »

Routing may seem pretty hopeless; but remember there are lots of tricks you can use. Again, remember you can mix up SRAMs' data lines if it helps, and mix up SRAMs' address lines. You could do that with (E)EPROM too, except that programming outside the board will require an adapter socket or software to pre-scramble them so the target computer will read it all correctly. You can also go as much as four traces between DIP pads without going smaller than .006" trace & space, if you use .045"x.055" DIP pads with .030" holes, like this:
4tracesThruDIP.gif
4tracesThruDIP.gif (8.68 KiB) Viewed 1180 times
If that seems too insane, you can do three traces with .007" trace & space between .050" pads. The green part is soldermasked; so you don't have to worry about bridging.

The following is more unusual, but actually has a standard name in the industry: the I-lead, or butt. The DIP's leads are trimmed just below the shank, then surface-mounted. It takes more solder than normal surface-mount, because you need to get a sizable fillet. An alternative is to J-lead the DIP, but that takes a special tool. The pads for the I-lead should be longer (although the .050" width is still fine); but an advantage is that since it only takes space on the one side and not all layers, other signal lines can be run underneath on other layers.
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: Starting with my first SBC Project, Plans and Confusions

Post by Proxy »

My current idea is to just let FreeRouting have a try at it (because i don't think i can actually route this manually, especailly with my skill level and attention span). I left the default trace width at 0.25mm but increased the width of the Power traces to 0.3mm, i cannot really go any larger than that because of the tiny pads of the SMD Chip. but it shouldn't require a lot of power anyways.

I'm also not sure if there are options for the auto router to fill all (or most) of the unused space with a GND Plane, i didn't really find anything online or in the options menu.
i added a Ground plane manually on both sides after using FreeRouting but i'm not sure how good it is.

also i know i can mix data and adress lines without any real effect on the COmputer, but to be honest i couldn't look at the board if i did that... it just seems wrong to me.
Technically i'm done... i got the PCB "finished" as far as i can tell and would only need to order the parts. which is the scariest part as that's the one that includes Money.

I could upload the PCB files so someone could take a look at it to see if there are any mistakes or similar, but i've looked over it and don't think there is anything... otherwise i don't know what else to do before ordering.

it would costs me 7 EUR on JLCPCB + shipping (19 EUR). so that would be quite a hit.
Chromatix
Posts: 1462
Joined: 21 May 2018

Re: Starting with my first SBC Project, Plans and Confusions

Post by Chromatix »

In KiCad, you can manually add a ground plane as a flood polygon, and it will automatically space itself from non-ground pads. An autorouter can then be let loose on everything else. I normally set up for a four-layer board and provide both ground and power planes on the inner layers, leaving both outer layers free for signal traces; this is not an expensive option any more. An SMD chip can have a short trace leading to a via which connects with a ground or power plane.

The JEDEC memory pinouts are a genuine PITA to route to from a 6502. Once you've figured out how to do it to one memory chip, it's definitely worth putting any others directly next to it and feeding traces between pins. This is an art that takes practice to do manually, but learning how will help you place components to make an autorouter's job easier. Don't be afraid to rotate components for convenience, either; the silkscreen will indicate which way around they go for assembly. And you may find that moving gates to different units of the same 74-series IC makes routing easier.

(Speaking of which, don't forget to include and wire up the power units of any multi-unit ICs you might have in the schematic, and tie off the inputs of any unused units. KiCad will not warn you about this, which I consider a serious bug in the ERC algorithms.)
User avatar
Proxy
Posts: 746
Joined: 03 Aug 2018
Location: Germany

Re: Starting with my first SBC Project, Plans and Confusions

Post by Proxy »

Chromatix wrote:
In KiCad, you can manually add a ground plane as a flood polygon, and it will automatically space itself from non-ground pads. An autorouter can then be let loose on everything else. I normally set up for a four-layer board and provide both ground and power planes on the inner layers, leaving both outer layers free for signal traces; this is not an expensive option any more. An SMD chip can have a short trace leading to a via which connects with a ground or power plane.
so should i've added the GND Plane before auto-routing?
also increasing the amount of layers from 2 to 4 increases the cost by ~27 EUR (JLCPBC), so i'd say that is still pretty expensive.
Chromatix wrote:
The JEDEC memory pinouts are a genuine PITA to route to from a 6502. Once you've figured out how to do it to one memory chip, it's definitely worth putting any others directly next to it and feeding traces between pins. This is an art that takes practice to do manually, but learning how will help you place components to make an autorouter's job easier. Don't be afraid to rotate components for convenience, either; the silkscreen will indicate which way around they go for assembly. And you may find that moving gates to different units of the same 74-series IC makes routing easier.
yea i put all memory chips in order next to the CPU, since the ROM needs fewer address lines than the RAM it's further away to the CPU.
Chromatix wrote:
(Speaking of which, don't forget to include and wire up the power units of any multi-unit ICs you might have in the schematic, and tie off the inputs of any unused units. KiCad will not warn you about this, which I consider a serious bug in the ERC algorithms.)
not entirely sure what you mean. all unused inputs are pulled to either GND or Vcc, and all unused outputs are just unconnected. (i checked every unconnected pin to make sure it stayed unconnected)
Post Reply