Author Topic: Using PC RAM with microcontrollers  (Read 6489 times)

0 Members and 1 Guest are viewing this topic.

Offline NiHaoMikeTopic starter

  • Super Contributor
  • ***
  • Posts: 9187
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Using PC RAM with microcontrollers
« on: November 06, 2011, 07:51:00 pm »
Recently, I managed to get a bag of old RAM for free. It had a few 30 pin and 72 pin SIMMs, lots of SDRAM and DDR DIMMs, and even a few small DDR2 DIMMs. Since none of them are usable (or worth using) in a modern PC, is it possible to use them with high end microcontrollers like a PIC24/dsPIC or ARM M4?
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13923
  • Country: gb
    • Mike's Electric Stuff
Re: Using PC RAM with microcontrollers
« Reply #1 on: November 06, 2011, 09:23:04 pm »
Forget DDR2 or later as they tend to have PLL clocks that require a minimum clock rate.
Standard SDRAM (unbuffered) can be interfaced fairly easily, either using onboard memory controllers on some of the higher end ARMs etc., or (slowly) via I/O ports.
If you want good info on the protocols check the Micron website - their datasheets are very clear and comprehensive.
SDRAM is also very easy to interface to FPGAs.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: pt
Re: Using PC RAM with microcontrollers
« Reply #2 on: November 06, 2011, 09:26:26 pm »
DRAM memories need a special controller to continuously refresh the memory cells. My guess is that this type of memory is not good for microcontrollers. SRAM type doesn’t have this problem.
Best regards,
johnmx
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13923
  • Country: gb
    • Mike's Electric Stuff
Re: Using PC RAM with microcontrollers
« Reply #3 on: November 06, 2011, 10:34:04 pm »
DRAM memories need a special controller to continuously refresh the memory cells. My guess is that this type of memory is not good for microcontrollers. SRAM type doesn’t have this problem.
If you can access the  RAM at reasonable speed, then refresh is a relatively easy task.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10187
  • Country: nz
Re: Using PC RAM with microcontrollers
« Reply #4 on: November 07, 2011, 03:41:25 am »
You won't be able to use external ram to extend the micros built in ram in order to have more variables etc.  unless external ram is a special feature of that micro.

But you can wire up the sram and write some code to read/write it yourself.
« Last Edit: November 07, 2011, 03:44:03 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13923
  • Country: gb
    • Mike's Electric Stuff
Re: Using PC RAM with microcontrollers
« Reply #5 on: November 07, 2011, 10:12:56 am »
You won't be able to use external ram to extend the micros built in ram in order to have more variables etc.  unless external ram is a special feature of that micro.
That's not necessarily true - some C compilers can support special variable types which are read and written via user-supplied routines, but can be accessed like normal variables.
For example the IAR AVR compiler supports an __eeprom type qualifier that allows eeprom data to be  used like any other variable. 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline sub

  • Regular Contributor
  • *
  • Posts: 107
  • Country: au
Re: Using PC RAM with microcontrollers
« Reply #6 on: November 07, 2011, 11:10:07 am »
You won't be able to use external ram to extend the micros built in ram in order to have more variables etc.  unless external ram is a special feature of that micro.
That's not necessarily true - some C compilers can support special variable types which are read and written via user-supplied routines, but can be accessed like normal variables.
For example the IAR AVR compiler supports an __eeprom type qualifier that allows eeprom data to be  used like any other variable.

Even without magic compiler directives, if you're willing to use C++ you could probably accomplish the effect with operator overloading.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf