W65C02S RDY / BE pins & first build advice
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Details on the W65C02S RDY / BE pins needed
Osric wrote:
Re: what I “want”: I’m trying to build the first computer I have ever built, for fun,
Quote:
I do not (yet) have sufficient interest to understand the magic of analog and AC circuits, which involve a *lot* of concepts I don’t understand at all … so I think trying to stick to slow clock speeds will help me not get into trouble.
Quote:
VIA with 2-line LCD display attached that can display “Hello, world!”,
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: Details on the W65C02S RDY / BE pins needed
GARTHWILSON wrote:
Osric wrote:
Re: what I “want”: I’m trying to build the first computer I have ever built, for fun,
GARTHWILSON wrote:
Quote:
I do not (yet) have sufficient interest to understand the magic of analog and AC circuits, which involve a *lot* of concepts I don’t understand at all … so I think trying to stick to slow clock speeds will help me not get into trouble.
GARTHWILSON wrote:
Quote:
VIA with 2-line LCD display attached that can display “Hello, world!”,
P.S. Sorry for the slow response it took me a while to realize my post had a page 2 <blush>
Re: Details on the W65C02S RDY / BE pins needed
Osric wrote:
I thought I had something functional but reading your AC performance page makes it seem that I am deluding myself, as I have built the prototype on solderless breadboards and used long wires that ought to be a disaster area. I'll have to test at 1Mhz and see it fail. I'm not even sure how fast I've run the circuit so far - probably just 1Khz or 2Khz, so it "working" may be quite the overstatement.
This works just fine:
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: Details on the W65C02S RDY / BE pins needed
drogon wrote:
You can get to 2Mhz on breadboards without issues.
"The key is not to let the hardware sense any fear." - Radical Brad
Re: Details on the W65C02S RDY / BE pins needed
Osric wrote:
BigEd wrote:
Yes, I’m using 55ns SRAM and plan to run the system at 1Mhz, so the RAM is about 20x faster than it needs to be.
Then you have the 25nS delay for the address and data to be valid on the bus after BE goes high again. Playing with BE is an expensive transaction (See P25 of the datasheet). Meaning that you need to (or should) wait until you are half way through high phase of PHI2 (at 1MHz) to ensure you aren’t peppering the RAM with corrupted data.
Taking all of that in to account, your 55nS RAM starts getting tighter all of a sudden.
I only know all of this because I’m presently doing the same thing in my present project and have had to resort to some trickery to get my own 6502 homebrew running stable, which I only managed today in fact.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Details on the W65C02S RDY / BE pins needed
Paganini wrote:
Edit: That bit has to do with what Garth mentioned above. Those CMD parts are a lot more forgiving when it comes to edge rates than new WDC parts are!
All versions of the 65C02 prior to the ‘S’ series from WDC (‘S’ meaning static core) have outputs that are similar to that of 74HC logic. Edges are relatively “gentle,” which improves the odds of a breadboard unit being stable at single-digit Ø2 rates. With each die shrink, starting with WDC’s move from 2.0µ to 1.2µ in the 1990s and leading to the current 0.6µ geometry, the maximum Ø2 and edge rates increased. Hence the same breadboard with a W65C02S6(T) has a much greater chance of being DOA or unstable.
WDC doesn’t publish the output edge rates for the current 0.6µ parts. However, I have observed that the 65C816’s edges on my 275 MHz scope are not visible with the sweep running at maximum rate, which suggests an edge rate around 1 to 2 nanoseconds. Such an edge rate is comparable to that of 74AC logic, which is “famous” for provoking ringing and instability in a less-than-sterling build. While I won’t say a 1-2 ns edge rate is unworkable on a breadboard, such a build’s generally-sloppy wiring, as well as the lack of a ground plane, will likely trigger instability.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Details on the W65C02S RDY / BE pins needed
Unfortunately I’m on a hiatus from this project for a while so I haven’t had a chance to see if my breadboard can go fast or not, but I am using a static core part and so am expecting problems. Once I have those problems, it’d be nice to be able to solve them without understanding analog electronics … as I’m about to demonstrate my lack of knowledge in the futile quest for a solution:
I must not really understand the issue, because it seems to to me that putting a small capacitor to ground ought to enable me to soften any edge that’s too fast? Please bear in mind that I realize that what I am saying must be nonsensical but hopefully explaining to me why it won’t work will enlighten me (and perhaps others).
Let’s say we want to have edges that are 10 ns long, and we’ll use 500 ohm pull down resistors on all the address and data lines so that they’re never floating. Then we want T = 2 nanoseconds (because we need 5T to fully charge the capacitor) and T = RC so our capacitor needs to be 2e-9/500 = 1/250 e-9 = 4e-12, so we put 4 picofarad capacitors in series with the pull down resistors and now our rising edges are about 10-15 nanoseconds long, and similarly for our trailing edges. Or maybe 2k pull downs work making the capacitors 1pF instead, I’m not really clear on the right way to size pull down resistors either. Aside from the exact values that are desirable, there must be some other flaw in this approach that I don’t understand?
What’s the flaw in this approach to avoiding hard edges?
I must not really understand the issue, because it seems to to me that putting a small capacitor to ground ought to enable me to soften any edge that’s too fast? Please bear in mind that I realize that what I am saying must be nonsensical but hopefully explaining to me why it won’t work will enlighten me (and perhaps others).
Let’s say we want to have edges that are 10 ns long, and we’ll use 500 ohm pull down resistors on all the address and data lines so that they’re never floating. Then we want T = 2 nanoseconds (because we need 5T to fully charge the capacitor) and T = RC so our capacitor needs to be 2e-9/500 = 1/250 e-9 = 4e-12, so we put 4 picofarad capacitors in series with the pull down resistors and now our rising edges are about 10-15 nanoseconds long, and similarly for our trailing edges. Or maybe 2k pull downs work making the capacitors 1pF instead, I’m not really clear on the right way to size pull down resistors either. Aside from the exact values that are desirable, there must be some other flaw in this approach that I don’t understand?
What’s the flaw in this approach to avoiding hard edges?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Details on the W65C02S RDY / BE pins needed
Osric wrote:
Once I have those problems, it’d be nice to be able to solve them without understanding analog electronics … as I’m about to demonstrate my lack of knowledge in the futile quest for a solution:...
Unfortunately, some understanding of analog electronics is necessary when working with fast digital logic. We’d like to think that digital circuits operate with crisp 1s and 0s, but it isn’t so.
BTW, attempting to slow the edges as you’re thinking will likely make things go from bad to worse. That said, please experiment so you can benefit from the experience.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Details on the W65C02S RDY / BE pins needed
Osric wrote:
Unfortunately I’m on a hiatus from this project for a while so I haven’t had a chance to see if my breadboard can go fast or not, but I am using a static core part and so am expecting problems.
I’ve personally had a stable-ish 38 MHz on a W65C02S on cheap and nasty breadboards alone. If you are looking at a few MHz you’ll have to do something really silly to stop it from working. And we are all here to bounce ideas and failures off anyway. We’ve all been there.
Give it a go. What’s the worst that can happen?
Re: Details on the W65C02S RDY / BE pins needed
Experiment is good, but it can also be helpful to do some study - in particular, one can look at simple designs which already exist and which work.
I would note that one rarely sees pull-down resistors. Not never, but rarely. If you don't have a good reason to think you need them, based on some understanding or example, don't add them in. Similarly for other embellishments!
Good luck on your journey.
I would note that one rarely sees pull-down resistors. Not never, but rarely. If you don't have a good reason to think you need them, based on some understanding or example, don't add them in. Similarly for other embellishments!
Good luck on your journey.
Re: Details on the W65C02S RDY / BE pins needed
BigEd wrote:
Experiment is good, but it can also be helpful to do some study - in particular, one can look at simple designs which already exist and which work.
I would note that one rarely sees pull-down resistors. Not never, but rarely. If you don't have a good reason to think you need them, based on some understanding or example, don't add them in. Similarly for other embellishments!
I would note that one rarely sees pull-down resistors. Not never, but rarely. If you don't have a good reason to think you need them, based on some understanding or example, don't add them in. Similarly for other embellishments!
Start with the KISS method and build from there, I say.
Garth’s primer, while awesome, can be an intimidating read. Making you feel that if you don’t have a dedicated ground plane or don’t use wire-wrap, that you are destined for failure. It’s not like that at all, I find the W65C02 to be quite forgiving. I’ve had masses of long wires all over the place on breadboards and still managed clock the chip easily beyond double or triple its specification.
Take the plunge, you won’t regret it.
Re: Details on the W65C02S RDY / BE pins needed
BigEd wrote:
I would note that one rarely sees pull-down resistors. Not never, but rarely. If you don't have a good reason to think you need them, based on some understanding or example, don't add them in. Similarly for other embellishments!
All the posts here have done so far is made me think I should write a simple ram test that I can run at speed before I bother adding more to the system, and that rather than adding the mono display next that I should add either the keyboard interface or a serial interface next, both of which are recognizably smaller increments than the mono video card (if less exciting). Everything seems to be working fine at the moment but I haven't tried running it at 1Mhz yet.
I do appreciate the encouragment
Re: Details on the W65C02S RDY / BE pins needed
J64C wrote:
Garth’s primer, while awesome, can be an intimidating read.
- open drain vs open collector meaning and purpose
- familiarity with 74-family ICs
- what the function of a ground plane is and why twisted pairs couldn't serve the same purpose
and basically my experience of reading the primer is that I have to go do more research to understand each sentence. At the end of the day it's probably less productive but significantly more fun to actually wire up a working circuit, which is what I have, while worrying that it won't -stay- working without fixing the multitude of sins I have committed in the process.
Re: Details on the W65C02S RDY / BE pins needed
Osric wrote:
At the end of the day it's probably less productive but significantly more fun to actually wire up a working circuit, which is what I have, while worrying that it won't -stay- working without fixing the multitude of sins I have committed in the process.
He cops a bad rap around these parts for whatever reason, but I recommend checking out Ben Eater's videos. He does explain things simply and to the point and you'll get something that works if you follow along, barring things out of his control like dodgy connections etc.
Sure, there are things you'd improve upon and change over time, but when is a "Hello world" example ever intended to be a production run?
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Details on the W65C02S RDY / BE pins needed
Osric wrote:
J64C wrote:
Garth’s primer, while awesome, can be an intimidating read.
- open drain vs open collector meaning and purpose
- familiarity with 74-family ICs
- what the function of a ground plane is and why twisted pairs couldn't serve the same purpose
Quote:
Expectations and nonExpectations
This primer is to give a good grasp of computer design basics, so that with good construction, you can make a computer that works on first try, with no hardware troubleshooting. (There are troubleshooting helps in case it doesn't though.)
Intended for newcomers to the 6502 and hobbyists building their own computers, this primer is rather rudimentary, but assumes that the reader is acquainted with a few things like
This primer is to give a good grasp of computer design basics, so that with good construction, you can make a computer that works on first try, with no hardware troubleshooting. (There are troubleshooting helps in case it doesn't though.)
Intended for newcomers to the 6502 and hobbyists building their own computers, this primer is rather rudimentary, but assumes that the reader is acquainted with a few things like
- binary and hexadecimal number bases
- common 74-family logic ICs and their functions
- wire-OR'able open-drain or open-collector logic
- very basic DC circuit theory
- even more-basic AC circuit theory (involving capacitance and, to a lesser extent, inductors)
- what a stack is (a last-on first-off storage area in memory—it's in the software manual) (I do have a treatise on 6502 stacks on this site though.)
- what the address and data buses are and generally how they are connected
- Timing diagrams are in the data sheets and will not be repeated here.
The Primer is logically organized into pages of various topics, each one building upon the previous ones; so I recommend going through them in order. Because of the length, I have spent countless hours trying to make it more concise, finding ways to get all the important stuff through as clearly as I can without any more words than necessary. I have a short page on why I do the website, and why I do it the way I do, at http://wilsonminesco.com/whydothis.html, and the last paragraph says,
Quote:
I try to get right into the subject on every page, not wasting your time like books that have their title page, copyright page, dedication page, acknowledgements page, the foreword, "About This Book" page, "About the Author" page, preface, table of contents, introduction, etc., before getting to the meat. Everyone has too much material to read; so it's appropriate to just get to the point. For more on how I work on the writing to make it the way it is, see this forum post
and one of the points I make there in that linked forum post is that I write far more than I post, and edit like crazy and remove everything that's not essential, ending up with something much shorter than I started with. If it's left there, it's probably essential.
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?