[dorkbotpdx-blabber] Microcontroller + RAM.. recording/playback

Paul Stoffregen paul at pjrc.com
Tue Jul 28 12:22:34 EDT 2009


I just returned from a camping trip.  I wasn't ignoring you... and 
trying to forget past pain of working with DRAM.... really, honest!

> Paul: Don't pretend like PJRC hasn't interfaced with DRAM before.  :) 
> What are your thoughts on doing this?  I fear when it comes to DRAM 
> there are a bazillion variables...
>   

Long gone are the "easy" days of asynchronous DRAM, where you could 
control the RAS and CAS strobes at your leisure, as long as you didn't 
go faster than the minimum timing specs and you got enough refresh 
cycles performed every several milliseconds.  Nowadays DRAM comes in a 
synchronous DDR interface, which means you have to clock it really fast 
because there is a delay locked loop inside which only locks to a 
limited range of clock speeds.  The minimum speed is usually very fast.  
There are a lot of other complexities too, but working at 200 MHz is the 
killer.

SRAM with asynchronous interface is definitely the way to go, if you 
want RAM.  For example, Digikey 428-1981-5-ND is half a megabyte for $5 
at qty 1.  To interface with a Teensy++, you will need to add a latch 
like a 74HC373, which is controlled by the ALE signals, which isn't 
routed to any of the pads.  It does go to a tiny resistor on the board, 
so you could solder a wire there.  The SRAM interface of the AT90USB646 
chip would probably be most useful for accessing 32 kbyte banks, so 
you'd connect A15 through A18 to port pins.

As far as storing audio, SD flash cards might be a lot easier than 
SRAM.  There's only 4 signals instead of many dozen wires (by the time 
you add at least the latch).  Also, since there's so few signals, 
converting from 5 to 3 volts is a lot easier.  The trick with SD flash 
is working with the internal sector size.  I tried writing audio to SD 
once, in 512 byte sectors, and it just wasn't fast enough.  The native 
sector size really needs to be used.

Acquiring 44.1 kHz sampled stereo (or mono) audio also isn't easy, 
particularly due to the synchronous formats all the audio ADC/DAC/Codec 
chips use.  I have some thoughts on that, but perhaps best to talk about 
it at the next Monday meeting?


-Paul





More information about the dorkbotpdx-blabber mailing list