Bought the wrong SDRAM chips for my de10 nano. What can I do with them? - Page 1
Forum section: electronics / beginners

author: neuralsim
author_rank: Contributor
timestamp: October 30, 2020, 05:04:15 pm
content: Hi all!I'm slowly building a RetroRGB/Mister setup (https://github.com/MiSTer-devel/Main_MiSTer/wiki) using a de10 nano a friend sold to me for cheep. He gave me the breakout board for the sdram in the image attached here, but lost the actual sdram chips. I ordered some from Mouser and got the wrong pinout.Out of frustration I went ahead and bought a pre-assembled ram board for the nano, so now I have 10 useless 128mb SDRAM chips.Along those lines I have a few questions,1) Do you think it would be possible to construct a PCB adapter board that would allow me to connect these chips to the nano?2) What else can I do with these? Is it possible to build a RAM expansion for an Arduino or compatible board?3) Does anyone want some of these? I don't think I'll be using them and I don't want them to go to waste. PM me if you want a couple or three, I'll ship them for free.

author: wraper
author_rank: Unknown
timestamp: October 30, 2020, 05:14:17 pm
content: Quote from: neuralsim on October 30, 2020, 05:04:15 pmYou did not mention what chips should be there originally and what you got. So there is no answer for such vague question. But do you need them to begin with unless you want to buy more nano?QuoteIn theory yes, if you want to build a memory controller. In practice it does not make sense.

author: neuralsim
author_rank: Contributor
timestamp: October 30, 2020, 05:23:38 pm
content: Quote from: wraper on October 30, 2020, 05:14:17 pmI linked to the Mister project which details the correct parts for the DE10 Nano board, and my photo shows the chips I got, I thought that would probably be adequate.

author: neuralsim
author_rank: Contributor
timestamp: October 30, 2020, 05:26:01 pm
content: QuoteOK, why doesn't it make sense? Because I can get a better CPU with RAM already installed I guess? That's fine but humor me, how would I go about doing it, can you point me to any resources? Also any other ideas for the chips?

author: ebastler
author_rank: Super Contributor
timestamp: October 30, 2020, 05:34:09 pm
content: Quote from: neuralsim on October 30, 2020, 05:23:38 pmDid I miss something or is it you asking for help here? And you expect those whomightbe able to provide advice to first search for the required information on that web site, and try to decipher the IC details on your blurry photo? That approach is probably inadequate.

author: wraper
author_rank: Unknown
timestamp: October 30, 2020, 05:40:20 pm
content: Quote from: neuralsim on October 30, 2020, 05:26:01 pmBecause it will be way more complex than arduino itself and you will need to bit bang it. It takes less effort and expense to switch the platform to one which supports RAM natively.

author: neuralsim
author_rank: Contributor
timestamp: October 30, 2020, 05:46:24 pm
content: Quote from: ebastler on October 30, 2020, 05:34:09 pmMy apologies. I guess I thought the DE10 Nano/Mister/RetroRGB project was so widely known it would be easily recognizable. Also since I'm a beginner I don't really know what information I need to provide to be useful, and I figured since I'm offering to ship free hardware to whomever asks for it, that would be some compensation for my inadequacy.In any case please allow me to correct my error. Here is the DIY page for the SDRAM daughterboard. It calls for Alliance Memory AS4C16M16SA-6TCN or Winbond W9825G6KH-6.https://github.com/MiSTer-devel/Main_MiSTer/wiki/SDRAM-Board-Assembly-(DIY)As mentioned, I've already bought a pre-assembled board so I no longer need to use these chips. But it would be nice to know if they could be adapted in case I build more of these Mister setups in the future. Here's a link to the part I bought on mouser:https://www.mouser.com/ProductDetail/issi/is42s32400f-7tl/?qs=DfG0HhEx1UUO9KOSxLWp3Q%3D%3D&countrycode=US&currencycode=USDEven though it isn't a great idea, I'd like to know how I might build a memory expansion for an arduino compatible board using these chips, just for the experience and learning.Sorry for the trouble and thanks again. Also I'd be happy to send a couple chips to whomever wants them. I wanna keep like 3-4, so first come first serve.

author: mikerj
author_rank: Super Contributor
timestamp: October 30, 2020, 05:48:19 pm
content: Quote from: neuralsim on October 30, 2020, 05:26:01 pmIt could absolutely be done but it does seem quite impractical and it's hard to think of a use case where it may be appropriate. Even after you have added a memory controller you can't connect it to the memory and address busses of something like an Arduino, so you end up bit bashing the whole thing, i.e. setting the address via a bunch of latches manipulating the control signals and reading back the data via another set of latches. It won't be very fast, you can't execute anything from it (unless you run some kind of virtual machine or interpreter in the Arduino) and it's volatile so not much use for data logging unless you can ensure everything is powered up all the time.As an exercise in learning how SDRAM works you could do the memory control via the Arduino itself I suppose.

author: wraper
author_rank: Unknown
timestamp: October 30, 2020, 05:53:31 pm
content: Quote from: neuralsim on October 30, 2020, 05:46:24 pmThey have wrong organization for your needs and half of the size. So at best you would need to use 4 chips instead of 1 while wasting half of the capacity. And most likely you won't be able to achieve decent clock speed.

author: neuralsim
author_rank: Contributor
timestamp: October 30, 2020, 05:55:43 pm
content: QuoteThat's a good reason. What do you mean by bit-bang? I guess you mean create a 32 bit memory address system since the typical arduino board is 8-bit?OK then, if not on the Arduino platform, do you have any suggestions for easy to use/hobbyist boards I could purchase that would use this kind of RAM natively? And how could I build a breakout board for them?

author: neuralsim
author_rank: Contributor
timestamp: October 30, 2020, 06:05:24 pm
content: Quote from: wraper on October 30, 2020, 05:53:31 pmAh so you're saying they cannot be adapted for use with the De10/nano? Or at least not without compromising speed?I should mention that I'm a software engineer with 20 years experience, but just getting started in EE. So I know a bit about memory architectures from a software standpoint, but almost nothing from a hardware standpoint. I do remember back in the DOS days, addressing "extended RAM" using microsoft's page:offset scheme that allowed a 16 bit OS to address 32 bit RAM.Basically, memory was organized into "pages" that overlapped, so a particular memory address could be accessed lots of different ways. I forget the exact details, but say a page was 64k in size, and pages were offset by 16k, it meant that each memory address lived in 4 distinct abstract memory "pages". So Page1, address 16,001 was the same as page2 address 1.Is that kinda what you meant when you said I'd need to do bit-banging?

author: neuralsim
author_rank: Contributor
timestamp: October 30, 2020, 06:15:39 pm
content: Quote from: mikerj on October 30, 2020, 05:48:19 pmThat sounds fun and educational! What would I do to get started?

author: wraper
author_rank: Unknown
timestamp: October 30, 2020, 06:25:51 pm
content: Quote from: neuralsim on October 30, 2020, 06:05:24 pmNot in a reasonable way, especially considering that proper chip costs below $1.

author: james_s
author_rank: Super Contributor
timestamp: October 30, 2020, 06:32:35 pm
content: It is absolutely possible to interface those chips to a FPGA, but working with SDRAM is a pain, it's definitely an advanced level project. From what you have posted here, it appears you are a LONG way from reasonably being able to do anything with those parts. I don't mean this as an insult, it's just that you are proposing a challenging project while stating that you are a beginner. IMO set them aside and purchase the correct parts for the MiSTer and get that working. Then if/when you have sufficient knowledge to design a PCB for the other chips and feel like a challenge, you can pull those out and try to get something going. If they were worth $100 each then it *might* be worth trying to adapt something, but the proper chips cost a small fraction of that.

author: james_s
author_rank: Super Contributor
timestamp: October 30, 2020, 06:37:22 pm
content: Quote from: neuralsim on October 30, 2020, 06:15:39 pmBecome proficient at programming in C++ for the arduino, practice practice practice until you are comfortable writing fairly complex programs from scratch, acquire an oscilloscope and/or logic analyzer and learn how to use them proficiently, then study the datasheet for the SDRAM you have until you understand it. Then wire up the hardware and start coding. I doubt an Arduino is going to be anywhere near fast enough to produce the timing required for SDRAM but you could try. Personally I prefer SRAM as it's FAR easier to work with, though the capacity is far smaller for the price.

author: neuralsim
author_rank: Contributor
timestamp: October 30, 2020, 07:35:26 pm
content: Quote from: james_s on October 30, 2020, 06:32:35 pmNo insult taken at all. OK fair enough, I've got useless ram chips I s'pose.I do have an oscilloscope though.QuoteAs I mentioned elsewhere, I'm a professional software engineer, and I haven't found arduino programming even slightly challenging so far. I'm in good shape there I think. I am extremely green with hardware though, and datasheets are still rather mysterious. I understand how to design basic circuitry with discrete components, and can build a circuit from a schematic.I guess I'll just toss these in a drawer for now unless someone wants them. Thanks for the advice and suggestions everyone!

author: Hideki
author_rank: Frequent Contributor
timestamp: October 31, 2020, 12:39:13 am
content: They are not useless, but they need an address and data bus and some additional control signals and your arduino has none of that.Now, you could add that using latches, bus transceivers or other logic, but it might get tricky to get the clocking and timing right.If you don't continually refresh it fast enough, any data you store will slowly disappear. You also need to convert all signals to 3.3V or run the arduino on 3.3V.Even if you get it up and running, you can't use it for code, since the AVR only supports executing code from its built in flash. Using it for other data is fine of course.If you abandon AVR and move up to ARM, there are many more microcontrollers available with built-in memory controllers that have SDRAM support. Still, low end parts in packages with few pins are unlikely to support external memory of that type.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: October 31, 2020, 01:18:14 am
content: Make a cabinet with a glass door in front and a picture frame around it, and make a sign that says: "Wall of Shame" and put it in that cabinet together with the unusalbe RAM chips.Also put the result of other mistakes in it, and then every now and again, look at your mistakes to remember what you did wrong so you can learn form your mistakes and do not keep repeating them.

author: wraper
author_rank: Unknown
timestamp: October 31, 2020, 01:23:37 am
content: BTW it's a good skill to let your mistakes go. Throwing good money after bad only causes more loses and wasted time.

author: neuralsim
author_rank: Contributor
timestamp: October 31, 2020, 01:25:14 am
content: Quote from: Hideki on October 31, 2020, 12:39:13 amI'm not married to the Arduino platform by any means, it's just that there's such a community behind it that it has tons of software and that makes a big difference.Can you recommend any ARM platforms that are accessible for a software engineer with a smattering of EE skill? Creating my own platform doesn't seem at all feasible anytime soon, I need to learn a lot more before I can do that.I've been thinking raspberry Pi and Teensy would probably be the platforms I'll use if I really need some power and capability for my projects, depending on the project, but I'm very much open to and appreciate any suggestions.

author: james_s
author_rank: Super Contributor
timestamp: October 31, 2020, 05:52:52 am
content: Isn't there an ARM core in the FPGA on the DE10 board?

author: Saskia
author_rank: Super Contributor
timestamp: October 31, 2020, 06:27:15 am
content: Yes there is.