On the search for SRAM chips for the Z80. - Page 1
Forum section: electronics / beginners

author: makerimages
author_rank: Regular Contributor
timestamp: October 21, 2013, 12:33:47 pm
content: Hi, i have a vintage HM6116L-70 SRAM chip on my hands, the datasheet and pinouts of which I know, I have also tested the chip and it works. Now, I will be ordering a Z80 amongst other things within a few weeks time. Now, the Z80 has address lines A0-A15, the HM6116L-70 has address lines a0-a10, causing some space to get lost when I`d hook that up, What I would really like to do is have 2 SRAM chips with a0-a7 so I could have 2 memory banks(later on I would have to switch one for a EEPROM).Could you guys suggest any SRAMS that are made currently and can be used with the Z80 in the abovementioned way ^, meaning the chips have the standard RD and WR pins and a CS(chip select) pin. Prefferably the chips could be cheap.All the best,Makerimages

author: PA0PBZ
author_rank: Super Contributor
timestamp: October 21, 2013, 12:50:23 pm
content: Quote from: makerimages on October 21, 2013, 12:33:47 pmYou are not going to store a lot of data in 2 * 256 bytes...

author: grumpydoc
author_rank: Super Contributor
timestamp: October 21, 2013, 12:51:12 pm
content: QuoteWhat you reallyneedto do though is look up how Z80 addressing works.I posted some circuit ideas not all that long ago for interfacing Z80's to various kinds of memory and there's loads of stuff on the 'net.

author: free_electron
author_rank: Super Contributor
timestamp: October 21, 2013, 02:42:28 pm
content: aiaiai. no clue how to make an address decoder.if you get two of those 6116 you wrire them up in parallel. you use the top three address lines of the z80 to drive something like a 74138 and tie outout 0 of the 74138 to CE of ram 1 , output 1 of the 74138 to CE of ram 2 and so on.that is how you make an address decode to split out across rams.

author: makerimages
author_rank: Regular Contributor
timestamp: October 21, 2013, 03:19:46 pm
content: The thing is, the 6116 is not sold anymore(atleast here).By the looks of it, id need 2 SRAMs with the same amount of address lines as the z80(a0-a15) and wire those both to the address pins, then I could use memreq of the Z80 nand'ed with, lets say a15 of the z80 to index the chip I want. Could I?

author: homebrew
author_rank: Frequent Contributor
timestamp: October 21, 2013, 03:30:26 pm
content: Just use 62256 SRAMS (32Kx8 5V). They are available in DIP-Packages. And depending on your application one might well be enough ...They should also be quite easy to obtain.

author: netdudeuk
author_rank: Frequent Contributor
timestamp: October 21, 2013, 04:21:51 pm
content: I've just bought one of thesehttp://www.ebay.com/itm/Alliance-Memory-Sram-1Mb-2-7V-5-5V-128Kx8-Pdip32-As6C1008-55Pcn-/121112507675?For something simple, use as many lower order address lines as you need (for example, to get 32K) and fasten the others to ground. Or you could implement bank switching, etc.

author: grumpydoc
author_rank: Super Contributor
timestamp: October 21, 2013, 07:37:10 pm
content: Did you bother to look athttps://www.eevblog.com/forum/beginners/z80-single-board-memory-bank-switching/. I posted several circuits for interfacing Z80 to RAM & EPROM including using a 74LS138 to generate chip select signals for 8k devices (as per free_electron's post) and larger devices such as 2 32k chips and a design for 64k RAM bank switched with 32k ROMAll pretty simple and exactly what you're looking for.

author: JoeO
author_rank: Frequent Contributor
timestamp: October 21, 2013, 08:44:24 pm
content: Quote from: makerimages on October 21, 2013, 03:19:46 pmWhere is "here"?

author: codeboy2k
author_rank: Super Contributor
timestamp: October 21, 2013, 08:47:34 pm
content: I have a bunch of W24257AK-20 and HY658256S-20 . These are pin compatible PDIP28 skinny , 32K x 8bits SRAM, 20nsThey have OE/ CS/ WE/ , bidirectional I/O pins, and address lines.You should be able to interface to a Z80.I'll mail one to you for $5.00 shipping included.

author: codeboy2k
author_rank: Super Contributor
timestamp: October 21, 2013, 08:49:53 pm
content: Quote from: JoeO on October 21, 2013, 08:44:24 pmyes, where is here... I (perhaps wrongly) assumed USA, but sometimes , even mailing a small chip in a small bubble mailer internationally is prohibitively expensive, for the sender and the receiver too.

author: iceisfun
author_rank: Regular Contributor
timestamp: October 21, 2013, 10:08:21 pm
content: Quote from: codeboy2k on October 21, 2013, 08:47:34 pmI'm interested in one of these for a Z80 project

author: codeboy2k
author_rank: Super Contributor
timestamp: October 22, 2013, 03:02:56 am
content: Quote from: iceisfun on October 21, 2013, 10:08:21 pmsend me a PM.Cheers!

author: westfw
author_rank: Super Contributor
timestamp: October 22, 2013, 03:50:04 am
content: Well, there's this 128k*8 chip:http://www.digikey.com/product-detail/en/AS6C1008-55PCN/1450-1017-ND/4234576That's more than the z80 can address, but ... you don't need to use ALL of it, and ... About $2 !(The same manufacturer does make 8k*8 and 32k*8 chips at even lower prices, but why bother?)

author: netdudeuk
author_rank: Frequent Contributor
timestamp: October 22, 2013, 06:31:08 am
content: Quote from: westfw on October 22, 2013, 03:50:04 amYes, that's the one that I mentioned was in eBay. I was going to use the classic 8Kx8 SRAMs and then came across the biggie. Not really any point in going for the old RAM for new designs.

author: fluxcapacitor
author_rank: Frequent Contributor
timestamp: October 22, 2013, 06:32:09 am
content: Theres a Z80 kit on ebay,it includes 128K SRAM .http://www.ebay.com/itm/Z80-Homebrew-Microcpmputer-Kit-with-Z80-CPU-ROM-RAM-V6366-Video-IC-SN76489-/121195367061?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item1c37ce8a95

author: makerimages
author_rank: Regular Contributor
timestamp: October 22, 2013, 03:41:38 pm
content: Well, all of the above ideas used a demux chip, I was more thinking of hooking something like this up to the z80 and memories(HiCS and LoCS on C4 and C3 being the CS lines for program memory and RAM).

author: makerimages
author_rank: Regular Contributor
timestamp: October 23, 2013, 10:08:33 am
content: Hmm, I looked up a 62256 datasheet, and it uses One pin for the WE and RD , if it is low, it is writing, if hihgh, then reading.. but the Z80 outputs separate, actibve low WR and RD... how would I go about those?

author: grumpydoc
author_rank: Super Contributor
timestamp: October 23, 2013, 10:38:25 am
content: QuoteLemme see - oh yes,every single oneof the diagrams I posted in the thread I referred you to showed you how to connect RD and WR.

author: makerimages
author_rank: Regular Contributor
timestamp: October 23, 2013, 10:51:25 am
content: Quote from: grumpydoc on October 23, 2013, 10:38:25 amUsing aDEMUXI plan on using a 74LS00NANDbut, wait... I just connect OE of the 62256 to RD of the z80 and th WE to WR?! Wow, thats easy.I did have alook at that thread late yesterday night, on a 4.7 inch device.. So I might have missed a bit on those schematics, will have a thorough read sometime soon.

author: codeboy2k
author_rank: Super Contributor
timestamp: October 23, 2013, 05:41:19 pm
content: What the hell kind of schematic is that 7400 box you have drawn, anyways???I have been using the 7400 series since the early '70s I think I know almost every pinout by heart, but even I don't draw schematics like the boxes you have drawn. You should have drawn 4 individual gates, so you can see the logic flow. ... even the box you have drawn has all the net names as if they were inputs... as if that box has 12 inputs, when I know a 7400 IC has 4 gates, 8 pins are inputs, 4 pins are outputs.Sheesh.. why don't they teach schematics in school these days???And while I am ranting, I wish people would stop using named nets like that, they are not for making invisible wires on your schematics.

author: makerimages
author_rank: Regular Contributor
timestamp: October 23, 2013, 08:04:59 pm
content: Well, bare in mind that I am just getting started with Eagle and made that part myself for convenience. How would you do it?

author: fluxcapacitor
author_rank: Frequent Contributor
timestamp: October 23, 2013, 10:15:04 pm
content: Quote from: wilfred on October 22, 2013, 09:43:13 amYes i know its a collection of parts,it includes a Z80.The OP said he hasn`t bought one yet .

author: free_electron
author_rank: Super Contributor
timestamp: October 24, 2013, 01:24:28 am
content: Quote from: wilfred on October 23, 2013, 11:03:26 pmclose but not complete.a signal leaving a page and connecting to another page uses a PORT or a POWER OBJECT. a stub of wire with a netname on it is a big no-no for that purpose !A netname is injected on signals that go multipoint. you NEVER use a netname to connect only two points together. thats what wires are for.signals that go multipoint are grouped in busses. the busses are drawn as fat lines showing what goes where.

author: makerimages
author_rank: Regular Contributor
timestamp: October 24, 2013, 08:41:51 am
content: But hey, the schematic would work-right?

author: PA0PBZ
author_rank: Super Contributor
timestamp: October 24, 2013, 09:21:02 am
content: Quote from: makerimages on October 24, 2013, 08:41:51 amThe problem is that you are making it very hard to verify what it does, compare your drawing with this:

author: makerimages
author_rank: Regular Contributor
timestamp: October 24, 2013, 10:26:46 am
content: That is indeed more readable-I agree. But.. is there an Eagle library for individual logic gates?

author: PA0PBZ
author_rank: Super Contributor
timestamp: October 24, 2013, 10:46:16 am
content: I don't have/use Eagle but it looks like it is possible:

author: daveshah
author_rank: Unknown
timestamp: October 24, 2013, 01:36:00 pm
content: The 74xx-US, 74xx-EU and 40xx libraries (should be included in your Eagle installation) have parts split up into individual logic gates. Once you have placed the part, use the invoke tool (or right click and select Invoke) to place the remaining gates and power symbol - remember not to forget the power connections!

author: makerimages
author_rank: Regular Contributor
timestamp: October 25, 2013, 08:46:58 am
content: Oh really? Great!

author: makerimages
author_rank: Regular Contributor
timestamp: November 03, 2013, 10:26:13 am
content: Allright, ordered the parts I need to start off with from 2 suppliers-one order is useless without the other!Now, I wrote a small piece of asssembly code to practice withCode:Start:.ORG 000hLD A,5LD B,A.end.endUsing tasm301 I got this .LST filehttps://www.dropbox.com/s/fmtij3zcwir4szx/TRY.LSTformat:Code:Line Address Data SourceAnd now I face a challenge-at first I would like to bitbang the .LST file to the memory chip. What puzzles me is theCode:0003 0000 3E 05 LD A,5line, 3E and 05 make a 16 bit value, z80 has 8 data bits-3E fits, 05 doesn`t, what I want to know is where the 05 would go. My guess is it goes to 0001 of memory. Am I right?

author: makerimages
author_rank: Regular Contributor
timestamp: November 03, 2013, 11:10:04 am
content: So this is how I would bitbang it?Code:address data0000000000 001111100000000001 000001010000000010 01000111

author: makerimages
author_rank: Regular Contributor
timestamp: November 03, 2013, 12:38:50 pm
content: hmm, there is still one thing. From what I know there is this indianness, beign big or small, I believe the z80 uses big, what does that mean to me, which end of address goes to a0 and which end of data goes to db0?

author: grumpydoc
author_rank: Super Contributor
timestamp: November 03, 2013, 01:03:56 pm
content: Z80 is little-endian so the least significant byte of a multi-byte value goes at the lower address, so a jump to address 0x1003 will appear asC3 03 10in a hex dump of memory

author: makerimages
author_rank: Regular Contributor
timestamp: November 03, 2013, 01:22:41 pm
content: so basically I can do. a raw hex to bin conversion, add 0s in the beginning to form a byte and then just have the result going to the db from left being db0 and right end. db7, same with addresses? so the binary above is valid to enter from left to right

author: grumpydoc
author_rank: Super Contributor
timestamp: November 03, 2013, 02:03:22 pm
content: QuoteNot quiteYour byte order is OKYour bit order is correct as you have written it out.Your bit order is wrong, however in your description above. d0 on the data bus is the least significant bit. When you write this out you will have bit 7 on the left and bit 0 on the rightIE:address hex binaryD7 D0/ \0000000000 3E 001111100000000001 05 000001010000000010 47 01000111

author: makerimages
author_rank: Regular Contributor
timestamp: November 03, 2013, 02:19:21 pm
content: and address line?

author: grumpydoc
author_rank: Super Contributor
timestamp: November 03, 2013, 03:32:18 pm
content: A0 is least significant

author: makerimages
author_rank: Regular Contributor
timestamp: November 03, 2013, 03:35:30 pm
content: so that is reversed above aswell?