Electronic – Feasibility of using “computer RAM” with a microcontroller project

embeddedmicrocontrollerram

How feasible is it that I could connect the pins of some garden variety "computer RAM" to a micro controller for use as external RAM?

Is there specific hardware used on computer motherboards that help interface the RAM with the rest of the system, or is it just as simple as finding timing/transaction information about the memory module and implementing/writing a driver somehow?

Best Answer

It is 'just' DRAM, so you can interface it exactly like you would interface any other DRAM. Note though, that parallel DRAM is significantly more I/O intensive and very tough on simple microcontrollers as compared to SRAM. Also, 'computer' DRAM always has multiple packages of multiple banks of many pages, so you need to implement a bank/package aware driver. Otherwise you will only be able to address one of the chips (inside one of the packages).

As for timings: that's really easy. There is an i2c EEPROM on every bank that stores the timing data in a fairly straightforward manner (see the DDRx specification and search for SPD).

I would like to note, though, that although it's a cool little project, it wouldn't really be useful in a practical design. Computer DRAM is significantly more expensive to use and way overspecced for any microcontroller platform. An overview of the cost:

  • DRAM socket ($2 in small quantities)
  • Immensely large microcontroller ($15+ on top of whatever you have to get enough I/Os)
  • Fast, fairly beefy 1.8V DC/DC converter ($2.50 for a switcher)
  • Termination regulator ($1 for a Richtek part)
  • quite a bit of board space for the module

If you really need gigabytes of RAM, this may be the only economical option. However, if you only need a couple (tens of) megabytes, there are some excellent PSRAM chips (e.g. https://octopart.com/is66wve4m16bll-70bli-issi-21833083) that work on (less than) 48 I/Os (i.e. small microcontroller package sizes), cost sub-$5, require almost no board space and still have ample performance for any microcontroller.