6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 4:49 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: RAM and ROM for 6502
PostPosted: Sun Jan 26, 2020 5:41 am 
Offline

Joined: Sat Jan 30, 2016 11:43 pm
Posts: 15
Location: Baguio City, Philippines
Now that I have tested my 6502 and having a basic knowledge of what's going on, I want to start adding some memory. I would like start with a ROM(EEPROM) for now coz' I don't have any RAM yet. I have a Winbond W27c512 EEPROM that i would like to start with. So the address pins of the W27c512 (A0..A15) goes to the address bus pins of the 6502 and the same with the data pins, correct? What about the OE and CE? I'm guesing they should held low? If so, why?

Attachment:
Capture.PNG
Capture.PNG [ 57.21 KiB | Viewed 3792 times ]


So while I experiment with just a ROM I would like to know any recommended RAM I should buy? 16k or 32k I guess.

The 6502 datasheet says it can address a total of 65k of memory which I don't understand quite well yet. When it says 65k memory, does it mean 65k for just ROM and I can add say a 16k or 32K RAM too? Or a total for both like for example 32k ROM + 32k RAM? Or 32k ROM + 16k RAM + other inputs = 65k?

_________________
// tinkerBOY


Top
 Profile  
Reply with quote  
 Post subject: Re: RAM and ROM for 6502
PostPosted: Sun Jan 26, 2020 5:57 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
M0001 wrote:
I have a Winbond W27c512 EEPROM

The 27's are EPROM. 28's are EEPROMs.

Quote:
So the address pins of the W27c512 (A0..A15) goes to the address bus pins of the 6502 and the same with the data pins, correct? What about the OE and CE? I'm guesing they should held low? If so, why?

They have to be low to output data; but if you hold them low all the time, nothing else will be able to put data on the bus without bus contention. You don't want that. Again, see the 6502 primer, particularly the address-decoding page (and the first diagram since you're interested in 32KB of ROM) and the whole-computer circuit at the top of the circuit potpourri page.

Data lines will be connected straight across. It's mostly the same story with the address lines, except that A15 will have nowhere to go on the ROM, since a 32KB ROM only has 15, not 16, address lines. A15 will be used to select the ROM. See the diagram at the top of the circuit potpourri page. When you get to the SRAM, address lines can be scrambled, and data lines can be scrambled, if it makes routing a PC board easier.

Quote:
The 6502 datasheet says it can address a total of 65k of memory which I don't understand quite well yet. When it says 65k memory, does it mean 65k for just ROM and I can add say a 16k or 32K RAM too? Or a total for both like for example 32k ROM + 32k RAM? Or 32k ROM + 16k RAM + other inputs = 65k?

65,536 (64K) locations altogether, including RAM, ROM, and I/O; so if you have 32KB of ROM and 16KB of RAM, that leaves 16KB for I/O—not that you need that much for I/O but it makes the address decoding really simple and nothing has more than two gate delays. The diagrams linked above give a very simple way to get 32KB of ROM, 16KB of RAM, and up to ten I/O ICs, using only a single quad NAND gate for glue.

_________________
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  
 Post subject: Re: RAM and ROM for 6502
PostPosted: Sun Jan 26, 2020 6:09 am 
Offline

Joined: Sat Jan 30, 2016 11:43 pm
Posts: 15
Location: Baguio City, Philippines
Thank you!

What about just the ROM for now? The one i have is 64k(w27c512) with address pins A0 to A15. So is it a straight connections to the 6502 including the A15? Do i still need some decoding if im just going to use just a ROM?

_________________
// tinkerBOY


Top
 Profile  
Reply with quote  
 Post subject: Re: RAM and ROM for 6502
PostPosted: Sun Jan 26, 2020 6:13 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
You could put just a ROM on there, filling all 64K, but with no RAM, you can't have any subroutines or variables, and with no I/O...well, that wouldn't be a very interesting computer. :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  
 Post subject: Re: RAM and ROM for 6502
PostPosted: Sun Jan 26, 2020 6:19 am 
Offline

Joined: Sat Jan 30, 2016 11:43 pm
Posts: 15
Location: Baguio City, Philippines
GARTHWILSON wrote:
You could put just a ROM on there, filling all 64K, but with no RAM, you can't have any subroutines or variables, and with no I/O...well, that wouldn't be a very interesting computer. :lol:


Yes I know that. :D But since I don’t have any RAM or I/O parts i might as well learn with just ROM for now.

_________________
// tinkerBOY


Top
 Profile  
Reply with quote  
 Post subject: Re: RAM and ROM for 6502
PostPosted: Sun Jan 26, 2020 6:22 am 
Offline

Joined: Sat Jan 30, 2016 11:43 pm
Posts: 15
Location: Baguio City, Philippines
So any parts recommended for a RAM or even an EEPROM?

_________________
// tinkerBOY


Top
 Profile  
Reply with quote  
 Post subject: Re: RAM and ROM for 6502
PostPosted: Sun Jan 26, 2020 6:39 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
M0001 wrote:
So any parts recommended for a RAM or even an EEPROM?

It looks like the only 32KB EEPROM Mouser has in a DIP is this one. Zowee. Neither cheap, nor very fast either! (I've only used EPROMs not EEPROMs, and never paid nearly that much. I guess if you don't want to use a UV eraser, and you want to program it in-circuit, you pay a lot for each part.) For 5V 32KB SRAMs in DIP, they have these. I can't take the time to look at all the data sheets, but I suspect any of them would work. I've used the 62256 type. The 62256, 27c256 and 28c256 varieties are what are shown in the diagram in the circuit potpourri page.

_________________
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  
 Post subject: Re: RAM and ROM for 6502
PostPosted: Sun Jan 26, 2020 7:15 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 730
Location: Tokyo, Japan
My RC6502 Apple 1 Replica uses an Amtel AT28C256 for ROM and Hitachi HM62256BLP-7 for RAM, and works nicely. These are both pretty common parts used throughout the hobbiest community, with many non-official sources as well (although you need to be alert for used, possibly not tested, and possibly remarked chips from China, I suppose).

GARTHWILSON wrote:
It looks like the only 32KB EEPROM Mouser has in a DIP is this one. Zowee. Neither cheap, nor very fast either!

These can be had for closer to a tenth that price (often even with free shipping) from many vendors on AliExpress. With the usual "buyer-beware" warnings, of course.

On Ebay and the like there are also plenty of sellers of packages of various chips that include RAM and ROM; much of the RAM and ROM in my parts bin has come from those. (For example, I saw a good deal on a 68008 that I wanted to try out, and the seller had packaged it with enough other stuff for a full computer, sans decoding logic.) The RAM chips I currently have in my parts bin (mostly untested so far), include:

Code:
     Qt  Item           Desc
    -----------------------------------------------------------------
      2  TC551001CP-70L Toshiba 128k×8 static RAM
      4  W24512AK-10    64K×8 CMOS static RAM DIP-32N
      1  W24512AK-15    64K×8 CMOS static RAM DIP-32N
      5  HM62256ALP-8   Hitachi 32k×8 CMOS static RAM
      7  HM62256ALP-10  Hitachi 32k×8 CMOS static RAM
      2  HM6264LP-70    8k×8 static RAM
      5  HM6264ALP-10   Hitachi 8k×8 CMOS static RAM

(The chips just seem to collect, like socks in a laundry room! :-))

_________________
Curt J. Sampson - github.com/0cjs


Last edited by cjs on Sun Jan 26, 2020 11:55 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: RAM and ROM for 6502
PostPosted: Sun Jan 26, 2020 10:14 am 
Offline

Joined: Sat Jan 30, 2016 11:43 pm
Posts: 15
Location: Baguio City, Philippines
cjs wrote:
My RC6502 Apple 1 Replica uses an Amtel AT28C256 for ROM and Hitachi HM62256BLP-7 for RAM, and works nicely. These are both pretty common parts used throughout the hobbiest community, with many non-official sources as well (although you need to be alert for used, possibly not tested, and possibly remarked chips from China, I suppose).

GARTHWILSON wrote:
It looks like the only 32KB EEPROM Mouser has in a DIP is this one. Zowee. Neither cheap, nor very fast either!

These can be had for closer to a tenth that price (often even with free shipping) from many vendors on AliExpress. With the usual "buyer-beware" warnings, of course.

On Ebay and the like there are also plenty of sellers of packages of various chips that include RAM and ROM; much of the RAM and ROM in my parts bin has come from those. (For example, I saw a good deal on a 68008 that I wanted to try out, and the seller had packaged it with enough other stuff for a full computer, sans decoding logic.) The RAM chips I currently have in my parts bin (mostly untested so far), include:

Code:
     Qt  Item           Desc
    -----------------------------------------------------------------
      2  TC551001CP-70L Toshiba 128k×8 static RAM
      4  W24512AK-10    64K×8 CMOS static RAM DIP-32N
      1  W24512AK-15    64K×8 CMOS static RAM DIP-32N
      5  HM62256ALP-8   Hitachi 32k×8 CMOS static RAM
      7  HM62256ALP-10  Hitachi 32k×8 CMOS static RAM
      2  HM6264LP-70    8k×8 static RAM
      5  HM6264ALP-10   Hitachi 8k×8 CMOS static RAM

(The chips just seems to collect, like socks in a laundry room! :-))


I bought a couple of Amtel AT28C256 for ROM and Hitachi HM62256BLP-7 just a while ago. I hope it arrives sooner as I'm excited to tinker and decide what 6502 build im gonna be doing.

_________________
// tinkerBOY


Top
 Profile  
Reply with quote  
 Post subject: Re: RAM and ROM for 6502
PostPosted: Sun Jan 26, 2020 5:08 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8509
Location: Midwestern USA
M0001 wrote:
So any parts recommended for a RAM or even an EEPROM?

For a RAM, this part will work.

Realistically, any computer without RAM and I/O is all but useless. In the case of the 65C02, there are two "must have" areas of RAM if any reasonable program is to be executed: page zero and page one. Many instructions have zero page addressing modes and some instructions are 100 percent dependent on page zero access to work, e.g., LDA (<addr>),Y.

Page one is important because the 65C02's stack is "hard-wired" to that range of addresses. The stack pointer is an eight-bit register, which means you cannot point at any address outside the range $0100-$01FF.

As for ROM, a 32KB EPROM (27C256) or EEPROM (28C256) is way more that enough. You can cram a lot of code and/or data into a ROM that size. In reality, you probably will use a fraction of that space and could get by with something smaller.

Unfortunately, sources for parallel interface E(E)PROMs are dwindling and prices are increasing. My long-time go-to EPROM was the 27C256-55, which has vanished from first tier distribution. One second tier distributor quoted me 13 dollars each on them—I bought quite a few from Jameco a few years ago for about four dollars each.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: DRG, jgharston and 27 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: