6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Apr 28, 2024 9:05 am

All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed May 11, 2016 4:30 am 
Offline
User avatar

Joined: Wed May 11, 2016 4:15 am
Posts: 24
Location: Texas
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.


Attachments:
Diagram.png
Diagram.png [ 145.16 KiB | Viewed 2330 times ]
Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 6:58 am 
Offline
User avatar

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


and there are many more but I don't want to overwhelm you. Do keep coming back and asking your questions though. There's a load of info to browse at the 6502.org website at http://6502.org/, not just the forum, and several of us have our own 6502 websites also—not to compete, but it's easier to add or edit things on our own sites. 6502.org is kind of the hub for all things 6502.

_________________
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: Wed May 11, 2016 7:19 am 
Offline
User avatar

Joined: Wed May 11, 2016 4:15 am
Posts: 24
Location: Texas
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.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 7:36 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1927
Location: Sacramento, CA, USA
xXZexxMooreXx wrote:
... As far as the diagram goes, I'm not understanding why the criss-cros.

My amateur opinion: I think that the criss-crosses indicate potential transitions, and the areas between the horizontal lines indicate stable binary states. The idea is to show that there are potential instabilities near the clock edges, so any bus sampling performed during those criss-cross periods may be unreliable.

Mike B.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 7:39 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
[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


Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 7:41 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
Quote:
As far as the diagram goes, I'm not understanding why the criss-cros.

It's a graph of the signals, with time in the X axis and logic state in the Y for each signal. The fact is that the signals take a little time to transition from high to low and vice-versa, typically a few ns for the ICs we deal with here. There is a transition time in which the pin is not in a valid logic state. This is true of any processor, not just the '02.

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?


Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 7:47 am 
Offline
User avatar

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

The target audience for Dr. Leventhal's books is an assembly language programmer, not a hardware designer.

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!


Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 8:15 am 
Offline
User avatar

Joined: Wed May 11, 2016 4:15 am
Posts: 24
Location: Texas
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.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 8:16 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Sounds like a grand adventure in front of you - hope we can help you as and when you have questions. Welcome to our world!


Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 8:35 am 
Offline
User avatar

Joined: Wed May 11, 2016 4:15 am
Posts: 24
Location: Texas
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?


Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 8:47 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
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...)


Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 9:13 am 
Offline

Joined: Sun Apr 10, 2011 8:29 am
Posts: 597
Location: Norway/Japan
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).


Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 9:15 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
BigEd wrote:
helping people is its own reward.

Yep. We also enjoy promoting our interest, for the sake of our interest. And with each newbie we dialog with, we get better at helping the next one. Every topic is a springboard for exchanging and developing more ideas too. I know I myself learn from helping others.

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 have an article about assembly language still being relevant today, at http://wilsonminesco.com/AssyDefense/ . From the links at the end:
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

There are plenty of others here who have not been stopped by that. Probably the majority of our most knowledgeable people here have no formal education in the field. Most real education happens outside of school. Computer engineering and computer science are particularly hard for schools to offer coursework in that's not outdated by the time the text books have been written and published and the curriculum developed. Besides, professors are as opinionated as we are here! :lol: You might as well get it here! :lol:

_________________
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: Wed May 11, 2016 9:18 am 
Offline
User avatar

Joined: Wed May 11, 2016 4:15 am
Posts: 24
Location: Texas
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...)


The only reason I asked is because, before signing up, I was thinking this could be like an insiders club. Ignoring that thinking turned out to be a good decision.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 11, 2016 9:22 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
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.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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: