6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Oct 06, 2024 6:31 am

All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Mon Aug 03, 2009 5:53 pm 
Offline

Joined: Thu Jul 30, 2009 8:56 pm
Posts: 18
Thanks a lot Garth. You're a nice guy.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 05, 2009 6:17 am 
Offline

Joined: Thu Jul 30, 2009 8:56 pm
Posts: 18
Is there a way to modify this decoder setup to have 32k RAM and 16 ROM instead of the other way around? If you just switch them around, then the reset vectors is somewhere in a sea of RAM. The memory map I'm trying for is like this, or something similar, as long as I have more RAM than ROM.

$0000-$7FFF - 32k RAM
$8000-$bFFF - VIAs, LCD, etc
$C000-$FFFF - 16k ROM

A couple hours of struggling with graph paper and a pencil has left me with only one insight: The chip select for the ROM can be (A15 NAND A14). How do I get the others?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 05, 2009 7:06 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8521
Location: Southern California
very hastily written-- check and see if I got it right

For the I/O, the inverter preceding the NAND goes in A14 instead of A15.

For RAM, the bus's A14 goes to the RAM's A14 only, not to its OE\. The way you saw mine, writes to the I/O area also write to the high 16K of RAM, but there's no provision to read that part of RAM. (Just what I always wanted-- write-only memory, or WOM! :D ) Connect its OE\ to A15 (instead of A14), or just ground it. Outputs will not be enabled if the RAM is not selected or if its W\ line is down.

A single 74xx00 is no longer enough, but oh well. I thought it could still be done, but I haven't thought about it in years. (Doing it with a single assumes you use a NAND section as only an inverter.)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 05, 2009 7:58 am 
Offline

Joined: Thu Jul 30, 2009 8:56 pm
Posts: 18
I'm probably missing something, but that would seem to do it while still using just one chip. What am I doing wrong? It all seems to check out in my illegible scribbles and bleary eyes.
http://socialkonstrukt.com/garthsdecode.gif


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 05, 2009 8:43 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8521
Location: Southern California
Your RAM needs inverted A15, not A14, so you need inverters on both A14 and A15.

P.S. I never thought I'd have a web page named after me!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 05, 2009 11:39 pm 
Offline

Joined: Thu Jul 30, 2009 8:56 pm
Posts: 18
I'VE GOT IT!
http://socialkonstrukt.com/garthsdecode2.gif
This is exactly the memory map I was looking for, and still only two (simple, standard, cheap) chips! Plus, I could use inverters anyway to interface the LCD display, so the extra chip won't be going entirely to waste. My only concern is that the enable for the LCD is going through five gates of logic (3 inverters and 2 NANDs). Still, it only adds up to 96ns worst case using 74LS logic, and that seems to be plenty fast enough at 1mhz, if I'm reading the 6502 timing diagrams right.

Thanks again. I don't have the money to order everything right now, but I'm gonna get the sockets and board and start anyway. I think I'm beginning to feel a little of the excitement some lucky people must have felt when they sent away for their SYM, KIM, or Altair kits in the mail.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 05, 2009 11:58 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8521
Location: Southern California
That's a horridly long delay for the LCD enable. It could be a problem if you write to the LCD and its enable stays true after the data are no longer valid. How about replacing the last three gates with a NOR (with A11 low) for LCD enable? Other sections of the NOR can also be used as inverters, so you might still get away with two ICs.

You might as well use HC as LS though. According to my data books, it's usually (not always) slightly faster, and takes far less power, and its inputs don't present the heavy load that LS's do.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 06, 2009 3:43 am 
Offline

Joined: Thu Jul 30, 2009 8:56 pm
Posts: 18
http://socialkonstrukt.com/hunley-6502rev3.gif
How's this look? I'm still thinking about the keyboard. ASCII encoded keyboards seem to be in short supply. I think I'll start with a hex keypad, like the micros of yore, just a 4x4 matrix hooked straight to one VIA.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 06, 2009 6:31 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8521
Location: Southern California
It's awfully hard to read, but with a quick scan, I don't see any problems.

I've seen ASCII RS-232 keyboards, but they're hundreds of dollars. Somehow I missed that you had said "ASCII keyboard," and I assumed you wanted one where the matrix was brought out so you have direct access to the rows and columns, where it's only your software that determines what key is at what row & column intersection. The latter should be much more common. Even if it's not, there are proabably a lot of modern ones you could remove the electronics from and connect a ribbon cable to.

There are various ways you could encode it. You'll never need to drive more than one row at a time, so you could use something like a 74xx154 or '138 to take 3-4 of the data lines that feed the printer and make those be data inputs for the IC. Another way would be to use a counter IC, then you only need one line to increment the row and one to reset it, meaning you can have as many rows as you want on only two lines. Something else I've done is to make it so if the increment pulse is longer than a certain amount, the counter resets, using an RxC and Schmitt trigger, so one line does the whole job of selecting the row. Then you read the columns as you drive each row. Even that wouldn't have to be parallel, but it does make it quite a bit easier to output the row and then input 8 bits of column data. If the columns' data lines are shared with something else like printer and LCD, just make sure you can make the keyboard not drive those lines while you're trying to talk to the other devices on them.

BTW, don't overlook the shift register in the 6522's. It's very useful for gaining tons of I/O on one 6522. I have more tips on using the SR in my "Tip of the Day" column.

My workbench computer has been fine with the five keys according to my Tip of the Day #26 at viewtopic.php?t=342&postdays=0&postorder=asc&start=26 because the typing is done on the host computer (typically my DOS PC but I've also done it on my HP handhelds).

Using a PC keyboard as-is however is not that difficult. The interface is almost the same as I²C.


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

All times are UTC


Who is online

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