6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 08, 2024 10:31 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Mar 19, 2017 11:20 pm 
Offline

Joined: Sat Mar 11, 2017 1:56 am
Posts: 276
Location: Lynden, WA
Ok, I'm looking at the example in Garth's primer for a memory map with 1 32k SRAM (16k available), 32k ROM, and room for much I/0.

I have been studying the varies combinations possible, and found one scenario that confuses me.

Imagine A15 is LOW, and A14 is HIGH. As I read it, this is to select I/0 addresses. Ok, makes sense.

So if that combo is there, and the phase2 clock is HIGH, you would have I/O plus SRAM's CE pins selected. The OE of SRAM would still be deselected, but you could still write (correct?)

Ok, that is fine since that memory is not actually reachable in this scheme, and write garbage there doesn't matter.

what confuses me is there is still a line from A14 to the SRAM. What is it for? Is it just a bad idea to have that pin not connected?


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 19, 2017 11:55 pm 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
Think one step further :)

If A14 wouldn´t be connected to the RAM, what do you do with the corresponding pin?
a) tie it lo => any access to $4000..$7FFF would look exactly like an access to $0000..$3FFF. => You need to gate /WE as well as /OE to prevent writing to $0000..$3FFF.

b) tie it hi => same story, just different memory section.

=> using A14 saves additional logic.

OK?


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 20, 2017 12:17 am 
Offline

Joined: Sat Mar 11, 2017 1:56 am
Posts: 276
Location: Lynden, WA
Yeah, actually I worked that out as I typed my message. :lol:

I still posted it to make sure. You confirmed it for me!

Many thanks!


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 20, 2017 12:28 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8538
Location: Southern California
Another way to do it would have been to replace the left-most NAND with a NOR, and connect its inputs to the processor's A15 and A14, then tie the SRAM's A14 either high or low. That way, the processor's A14 would be involved in the SRAM's CS\. That would require an additional IC though (a 74xx02), which I was trying to avoid. On the plus side, the '02 might have saved a small (actually pretty negligible) amount of power, since the SRAM would not be selected when you're writing to I/O. (You can't have the RAM and I/O swap places, because you have to have page 0 and page 1 in RAM, since they have special functions.)

As it stands, the use of A14 keeps you from corrupting the used part of the RAM when you write to I/O and the RAM is selected because A15 is low. With A14 tied to OE\, you can never read the upper half of RAM, since that's where your I/O is. You want to be able to read the I/O without bus contention.

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

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