A weblog focused on interesting circuits, ideas, schematics and other information about microelectronics and microcontrollers.
Monster Memory - 512kB DRAM with AVR
Jesper Hansen's method to connecting DRAM with an AVR microcontroller.
A discussion recently on the mp3projects discussion board, about using DRAM memory with small 8-bit processors without DRAM controllers, got me to take up an old idea.
I thought it should be possible to hook up a DRAM to a small processor (in this case an Atmel 8515), and handle the RAS/CAS sequencing and refresh in software.
As DRAM is MUCH cheaper than SRAM, it would be possible to get a large (>500kB) memory at a reasonable price.
There would obviously be a speed penalty, but in some cases, this would be of no importance.
I had a bunch of Hitatchi M5M44800 DRAM's which I got dirt cheap, so I decided to give it a go with one of them. This is a 512k*8 DRAM.
It uses a 1024 cycle refresh (each 16 mS), and allows CAS-before-RAS refresh.
The refresh is handled by a periodic interrupt on Timer1. The count is set to -125 and with a prescaler value of fClk/1024 (8 MHz CPU), this gives an interrupt every 16 mS. On each interrupt, a loop is executed 1024 times, each iteration doing a CAS-before-RAS access. The loop takes total about 1.6 mS, to execute.