How to choose the correct SRAM chips for a 2 MB memory system? - Page 1
Forum section: electronics / beginners

author: MarkS
author_rank: Unknown
timestamp: January 03, 2016, 09:08:43 pm
content: I've been wanting to build a retro computer for years and just bought a MC68000. Nearly everything about the system design makes sense to me and I have several references to go by, but the organization of memory is getting me confused. The 68000 has a 16-bit data bus. I can choose to use two XXXx8 chips or one XXXx16 chip per bank. The issue is with choosing the XXX. If I have two banks of one megabyte each, what size chips would I need, either x8 or x16? Naively, I would think that I would need two 512Kx8 or one 1MBx16 chip(s) per bank, but in doing my research I've seen a 1MB memory system (sorry, I lost the link) that used two 4MBx8 chips. Maybe that was a typo?I find this very confusing, but I've never had it explained. When upgrading RAM in a PC, you buy the correct number of sticks of RAM needed to get the size you want or need and don't worry about the size of the individual chips.

author: MarkS
author_rank: Unknown
timestamp: January 03, 2016, 09:25:09 pm
content: What also makes it confusing is this:http://www.digikey.com/product-search/en?pv961=2&FV=fff40027%2Cfff80434%2C2540002&k=eeprom&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25This is the parallel EEPROM selection at Digikey. Look at the "Memory Size" field. 64K (8Kx8), 256K (32Kx8) and 1M (128Kx8). What?

author: DrGeoff
author_rank: Frequent Contributor
timestamp: January 03, 2016, 09:30:09 pm
content: Back in the day when I was designing lots of 68K control gear we'd use 128Kx8 EPROMS and SRAM devices. Usually 4 EPROMS and 4 SRAM devices.For larger RAM I'd use DRAM devices with a TI DRAM control chip.

author: MarkS
author_rank: Unknown
timestamp: January 03, 2016, 09:34:51 pm
content: I'm having a lot of trouble finding DRAM that would work with such an old processor. I can find plenty of SRAM, but mostly DDRx DRAM. I really do not want to deal with the support logic for that. I'd rather stick with SRAM. It is easier to interface and easier to obtain.Still, the original question remains. I guess what I'm asking is this: If I were to use two 512Kx8 SRAM chips, that would be 1MB, correct? Or, if I wanted less and used two 32Kx8, I would end up with 64K RAM?

author: SeanB
author_rank: Super Contributor
timestamp: January 03, 2016, 09:51:30 pm
content: Correct, though you probably want to go with the good Doctor Geoffs suggestion, and use 128kx8 chips. That way bus layout is a lot easier, with only 2 sets of 8 chips in a row, and you only need 3 bus drivers per row, and can decode the memory easily, and either SRAM or EPROM/EEPROM, as the pinouts are a JEDEDC standard for almost all pins, enabling a simple selection of memory. That way you can have up to 2M-128k of ram.

author: MarkS
author_rank: Unknown
timestamp: January 03, 2016, 09:59:42 pm
content: Thanks! 128Kx8 is also easier to source. It's funny, but the hardest part of designing a retro computer is sourcing acceptable parts!

author: C
author_rank: Super Contributor
timestamp: January 03, 2016, 10:33:10 pm
content: Datasheethttp://cache.nxp.com/files/32bit/doc/ref_manual/M68000UM.pdPage 45 table 3-1If you look at table you see that the CPU can work with ether byte separately or both together.If a 16-bit processor could not do this then to change one byte with out changing the other byte would require the CPU to do a read-modify-write to make this change.8-bit processor with 2x 32kx8 chips.Normal setup is one chip to cover 0-32k while second covers 32k-64kWhen a 16-bit CPU is also accessing this memory, the 8-bit CPU is using A0 to select which of the two 8-bit buses to use and which of the two sets of control lines to use. You have even memory and odd memory.

author: natbuk
author_rank: Contributor
timestamp: January 03, 2016, 11:37:16 pm
content: IIRC, the 68k could access memory in either 8-bit or 16-bit wide busses externally, Internally, it's (mostly) a 16 bit machine, but if you set things up right, it could do two accesses to an external 8 bit memory (to make the 16 bits from the two 8 bits). This could save PCB tracks/routing etc (when such things were a big deal back-in-the-day).I'd suggest using 16 bit wide if you can as it can use up cycles to double-access the 8 bit memory ( to build up a 16 bit 'access'). In modern machinces, DRAM is faster these days than external SRAM, mostly because of bursting, and caching (when you do a read from external XDR ram on your I5, it probably grabs a whole chunk and caches it in super-fast, on-die ram). In the olden-days, SRAM was 'fast ram' becuase you simply applied address and x ns later, the data was ready... with DRAM, you had to apply columns and rows and pulse strobe lines, and do some refresh operations.If you're using the 'antique' 68000, it might be worth googling for Amiga 500 service manual - i believe the ram-pack loaded in the bottom tray was up to 2MByte fast s-ram. Might give some good hints how to connect things up.good luck!Best regards,Nat

author: DrGeoff
author_rank: Frequent Contributor
timestamp: January 03, 2016, 11:42:02 pm
content: Quote from: MarkS on January 03, 2016, 09:59:42 pmYes. Older parts become obsolete quickly these days. Still, 128Kx8 SRAM chips can still be found and instead of EPROMS you can use a couple of 128Kx8 flash devices for the firmware at address 0 upwards. The vectors are all stored at the bottom addresses for the 68K.As for 16bit/8bit addressing, the 68K has an upper and lower data strobe for use with banks of 8-bit memory devices. In 16-bit mode (which I assume you will be using), A0 is always high so you need to use UDS/LDS for byte access. And don't forget to always return DTACK, or you'll be getting a bus error!A 68K device with integrated peripherals is the 68302, which was a very handy device when moving from 68K designs to save PCB space.

author: Mechanical Menace
author_rank: Super Contributor
timestamp: January 04, 2016, 12:11:13 am
content: Quote from: natbuk on January 03, 2016, 11:37:16 pmThe 68000 has 23 address lines (well 24 but no A0 on most parts and it's ignored on the ones that have it) plus 2 "byte select" strobe pins. This basically gives you two 8 bit busses, one for odd numbered bytes and one for even. When it wants to grab a 16 bit value it just strobes both of those byte select pins at the same time. Unless the 16 bit wide RAM can act like 2 8 bit ones with their own chip select going for 16 bit wide RAM would only make things more troublesome. As C pointed out when you wanted to write to only one byte you'd have to read from it, store that value somewhere, change only the byte you want, and write the entire 16 bit back to the RAM. All outside of the CPU. Using 2 8 bit SRAMs or ROMs won't slow down the system, using only one 16 bit SRAM could.That's also pretty much why you got your ROMs in multiples of 2 for systems like the Amiga or in Mega Drive/Genesis cartridges.

author: Tomorokoshi
author_rank: Super Contributor
timestamp: January 04, 2016, 12:24:16 am
content: The 68000 is an elegant processor, from a more civilized age.

author: retrolefty
author_rank: Super Contributor
timestamp: January 04, 2016, 01:22:52 am
content: Quote from: Tomorokoshi on January 04, 2016, 12:24:16 am

author: C
author_rank: Super Contributor
timestamp: January 04, 2016, 03:42:10 am
content: http://www.digikey.com/product-search/en?FV=fff40027%2Cfff80434%2C2380053%2C2380060%2C2380061%2C2380062%2C2380063%2C2380065%2C2380066%2C238006f%2C2380071%2C2380073%2C2380076%2C2380089%2C2380371%2C238037c%2C26801f7%2C450000f%2C4500074%2C45000c7%2Cf040002%2Cf040004%2Cf040005%2Cf040006&mnonly=0&newproducts=0&ColumnSort=-142&page=1&stock=1&pbfree=0&rohs=0&quantity=&ptm=0&fid=0&pageSize=100If you can work with the chip packages you may want to look at 512kx8I see some that are cheap and very fast.You might want to download the memory parts list and compute a price per MbI would suggest that you do NOT put the memory on your CPU board.Having separate boards would let you quickly make more.Keep in mind that the 68k is built to function with more than one in a system.The 68010 adds a great virtual CPU capability.The changes needed to go from an Amiga to a mulit-cpu beast are fairly small.The first versions of the VME bus was around the 68k.I would not copy from an Amiga but from a fancy VME system or something like this.In place of one VME system bus, you could use a subset and have a memory bus, an IO bus and a multi-processor buss.Think huge and fancy and leave options to get to this, while you build the simple.

author: MarkS
author_rank: Unknown
timestamp: January 04, 2016, 04:19:39 am
content: I'm looking to do something extremely simple, at least for the first go round.The book I have on 68000 system design shows the use of 4 to 16 decoders to split the address bus into 1 MB (and then further into 64K) memory banks with each memory bank containing two x8 chips addressed via the upper and lower data strobes and enabled via the output of the decoder. I'll probably go this route, although I am considering using a microcontroller as a bus controller to split the address bus and provide bus error functionality. I get the necessity of discrete logic chips for bus control when the 68000 came out, but they didn't have microcontrollers at the time and if I can reduce the chip count, all the better.Quote from: Tomorokoshi on January 04, 2016, 12:24:16 am