Challenge Understanding Clock Cycle Diagram
Challenge Understanding Clock Cycle Diagram
I'm a complete beginner and have started reading "An Introduction To Microcomputers" by Adam Osborne. I'm failing to understand the diagram in the attachment below.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Challenge Understanding Clock Cycle Diagram
I believe that's a book that I had and loaned out but never got back. I was hoping to be able to see what microprocessor it's talking about there. It is certainly not the 6502 which works a bit differently. The '02 starts each cycle with Φ2 low, not high, and ends the cycle with it high. When it's reading, the data is latched in on the falling edge of Φ2. Instead of a read\ line and a write\ line, the 6502 has a R/W\ line. (The trailing bar is supposed to be horizontal and go over the top of the "W", but there's no way to show it that way in the forum text. You pronounce it "read, write-not.") The address and R/W\ come out soon after the beginning of the Φ2-low time. There is time to set up memory or peripherals before the rising Φ2 edge which signals the actual read or write time. In the case of writing, you must ensure that no writing can be done while Φ2 is low, since that would require that the address be guaranteed to be valid and stable well before R/W\ goes down, which is not the case, and you could inadvertently corrupt other addresses on the way.
Documents that come to mind that would help you more are:
Documents that come to mind that would help you more are:
- the '02 data sheet such as WDC's at http://6502.org/documents/datasheets/wd ... 7_2013.pdf or Rockwell's at http://6502.org/documents/datasheets/ro ... essors.pdf (our datasheet archive is at http://6502.org/documents/datasheets/)
- the 6502 primer at http://wilsonminesco.com/6502primer/
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: Challenge Understanding Clock Cycle Diagram
I bought "6502 Assembly Language Programming" by Lance A. Leventhal and the author assumes you've read the microcomputer book first.
What your describing, is that for the 6502 or for the what the diagram is showing? As far as the diagram goes, I'm not understanding why the criss-cros.
What your describing, is that for the 6502 or for the what the diagram is showing? As far as the diagram goes, I'm not understanding why the criss-cros.
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: Challenge Understanding Clock Cycle Diagram
xXZexxMooreXx wrote:
... As far as the diagram goes, I'm not understanding why the criss-cros.
Mike B.
Re: Challenge Understanding Clock Cycle Diagram
[Oops, this response crossed in the post]
Crossed lines in a diagram like this is meant to show the points at which data changes, or in this case, the point at which data, having potentially changed, is now valid and stable.
Another convention is to use a series of crossed lines, or cross-hatching, to the left of the period of stability to show that the data could be changing during that time.
See also Jeff's animated timing diagrams - they might help you to get a sense of what is causing what and a sense of the freedoms in the system.
viewtopic.php?f=4&t=2909
Crossed lines in a diagram like this is meant to show the points at which data changes, or in this case, the point at which data, having potentially changed, is now valid and stable.
Another convention is to use a series of crossed lines, or cross-hatching, to the left of the period of stability to show that the data could be changing during that time.
See also Jeff's animated timing diagrams - they might help you to get a sense of what is causing what and a sense of the freedoms in the system.
viewtopic.php?f=4&t=2909
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Challenge Understanding Clock Cycle Diagram
Quote:
As far as the diagram goes, I'm not understanding why the criss-cros.
The Leventhal book should be a good place to start; but I would recommend that you soon get into the 65c02 (ie, CMOS) for its many advantages including an expanded instruction set that makes it easier to do certain things. I have an article on all the differences between the original NMOS 6502 and the CMOS 65c02 at http://wilsonminesco.com/NMOS-CMOSdif/ . The reason not to use CMOS would be if you want to write for vintage computers which will not have been retrofitted with the CMOS version, especially the Commodore 64 which used the 6510 which never was made in CMOS.
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?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Challenge Understanding Clock Cycle Diagram
xXZexxMooreXx wrote:
I bought "6502 Assembly Language Programming" by Lance A. Leventhal and the author assumes you've read the microcomputer book first.
What your describing, is that for the 6502 or for the what the diagram is showing? As far as the diagram goes, I'm not understanding why the criss-cros.
What your describing, is that for the 6502 or for the what the diagram is showing? As far as the diagram goes, I'm not understanding why the criss-cros.
You should stop by Jeff Laughton's website and have a look at his page explaining timing diagrams. It could answer quite a few questions for you.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Challenge Understanding Clock Cycle Diagram
Thanks for all the replies.
My ultimate goal is to be game programmer. I've tried learning C# as a first language, but I spent too much time wondering what was really going on deep down. After searching the internet for the pros and cons of learning assembly as first language, I'm convinced this is the best route for me.
I choose 6502 to write a demo for the NES. Along the way I believe I will have a better understanding of how computers work so that learning a high level language will make more sense to me.
I'm nearing 34 with no college education and often times feel I'm too late for the party. I'm working on it a little everyday just to build up a habit of doing it while leaving room for the possibility that I'm taking the wrong route. There you go, just so that we're all on the same page.
My ultimate goal is to be game programmer. I've tried learning C# as a first language, but I spent too much time wondering what was really going on deep down. After searching the internet for the pros and cons of learning assembly as first language, I'm convinced this is the best route for me.
I choose 6502 to write a demo for the NES. Along the way I believe I will have a better understanding of how computers work so that learning a high level language will make more sense to me.
I'm nearing 34 with no college education and often times feel I'm too late for the party. I'm working on it a little everyday just to build up a habit of doing it while leaving room for the possibility that I'm taking the wrong route. There you go, just so that we're all on the same page.
Re: Challenge Understanding Clock Cycle Diagram
Sounds like a grand adventure in front of you - hope we can help you as and when you have questions. Welcome to our world!
Re: Challenge Understanding Clock Cycle Diagram
BigEd wrote:
Sounds like a grand adventure in front of you - hope we can help you as and when you have questions. Welcome to our world!
Thanks BigEd.
If you guys have already put your time in, why are you so interested in helping others? What do you guys get out of it?
Re: Challenge Understanding Clock Cycle Diagram
I find helping people is its own reward. Hmm, that sounded terrible! But I mean it. (There might be an age element: when very young, you look after yourself. Later on, you look after your family. Later still, you look after anyone...)
Re: Challenge Understanding Clock Cycle Diagram
As Ed said. But there's a bit more. People (we and others) are learning things, but also collecting knowledge and working on making it accessible (see for example Garth's primer pages on http://wilsonminesco.com/). I work (elsewhere) with info and docu about older systems, and it's just much more fun to work with when somebody else actually makes use of it. Otherwise what we learn and do would kind of go into a black hole, which isn't very rewarding in the end. So we're all happy to see more folks joining in, and the 6502 is one of the most interesting and accessible microprocessors to work with (not the least because of this site, which is so active and has so much information).
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Challenge Understanding Clock Cycle Diagram
BigEd wrote:
helping people is its own reward.
Quote:
I've tried learning C# as a first language, but I spent too much time wondering what was really going on deep down. After searching the internet for the pros and cons of learning assembly as first language, I'm convinced this is the best route for me.
I choose 6502 to write a demo for the NES. Along the way I believe I will have a better understanding of how computers work so that learning a high level language will make more sense to me.
I choose 6502 to write a demo for the NES. Along the way I believe I will have a better understanding of how computers work so that learning a high level language will make more sense to me.
Randall Hyde, author of "Write Great Code (No Starch)" has an essay online, "Why Learning Assembly Language Is Still a Good Idea" which has a lot of good comments about how knowledge of assembly helps you write more-efficient high-level-language code. He is an instructor at the University of California who laments the two decades of unwise "assembly-is-dead" teaching that has been in the schools.
Quote:
I'm nearing 34 with no college education and often times feel I'm too late for the party
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: Challenge Understanding Clock Cycle Diagram
BigEd wrote:
I find helping people is its own reward. Hmm, that sounded terrible! But I mean it. (There might be an age element: when very young, you look after yourself. Later on, you look after your family. Later still, you look after anyone...)
Re: Challenge Understanding Clock Cycle Diagram
Glad that we surprised you in a good way!
Another thought - anyone aiming to teach someone (which several people here do, at least in the form of writing articles and explanations) needs to know what the stumbling blocks are, what it is that prevents someone from understanding something. So seeing a question from someone who is presently grappling with something can be very helpful to the would-be teacher - they need to find a way of illustrating or explaining or approaching that topic which will get the reader over the hump. And other people's helpful contributions are a sharing of tactics for the helpers, as well as being, hopefully, helpful to the person who asked the question.
Another thought - anyone aiming to teach someone (which several people here do, at least in the form of writing articles and explanations) needs to know what the stumbling blocks are, what it is that prevents someone from understanding something. So seeing a question from someone who is presently grappling with something can be very helpful to the would-be teacher - they need to find a way of illustrating or explaining or approaching that topic which will get the reader over the hump. And other people's helpful contributions are a sharing of tactics for the helpers, as well as being, hopefully, helpful to the person who asked the question.