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

Greg Grunest greg at grunest.com
Fri Jul 24 20:06:20 EDT 2009


Maybe I copied the wrong link.  I thought they had 400 or so on hand when I
looked at midnight.  (I was pretty tired.  Anything is possible)


I wasn't thinking shift registers.  I mean you could use shift registers but
that slows your write and read times down by a factor of (number of address
bits X Arduino clock cycles it takes to pulse the CLK line on the shift
register).  Instead I'd use a 74LS373 or 374.  Something like that.  There
are a dozen or so octal latch IC's that would work.  Then, you could tie
your 8 data I/O lines to the input side of the two latches and just use a CE
line to control the upper or lower 8 bits of the address being latched into
the specific latch.  Once your address is latched, you use the same 8 pins
on the Arduino to either read or write your data to/from the SRAM.

So, the total pin count on the Arduino would be:
1-8	: I/O lines D0-8, A0-8 and A9-15 (allows a max of 64K address space)
9	: CLK line on latch #1
10	: CLK line on latch #2
11	: R/W or WE line for the SRAM
12	: CE line on the SRAM (this *might* be unnecessary)

If you think you can get away with the latency of a serial shift register,
then you might just look at a serial SRAM chip.  They usually have a block
write mode so you can just feed them serial data and then not worry about
addressing them.  Also, they are often only 8 pin ICs.  Even an SD card
would work and they are dirt cheap.

If I remember right, Dallas Semiconductor used to sell a 2 pin IC that had
like 64K of serial SRAM and a RTC in it.  It was under $1.00 in quantities
and looked like a watch battery.  Pin 1 was VCC and pin 2 was the Data I/O
line.  You had to pulse the data line while leaving it connected to ground
through an open-collector input to send it commands and then monitor the
same pin to read the data.  Kind of messed up but it worked and was cool.

-greg

-----Original Message-----
From: dorkbotpdx-blabber-bounces at dorkbot.org
[mailto:dorkbotpdx-blabber-bounces at dorkbot.org] On Behalf Of Alex Norman
Sent: Friday, July 24, 2009 1:19 PM
To: 'A discussion list for dorkbot-pdx (portland, or)'
Subject: Re: [dorkbotpdx-blabber] Microcontroller + RAM.. recording/playback

> > Digikey sells Cypress Semiconductor 256Kbit(32K bytes) 45ns SRAM chips
in
> > dip form for $7.50
> >
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=STK14C88-3W

Not stocked :(

-Alex

On  0, Alex Norman <alex at x37v.info> wrote:
> On  0, Greg Grunest <greg at grunest.com> wrote:
> > IMHO, DRAM is a real pain to deal with.  Unless you want to deal with
> > implementing your own DRAM controller or you really *need* the speed /
> > density / price that DRAM can offer I tend to avoid it.  The refresh
> > circuitry and RAS / CAS timing will drive a sane man to drink.  You also
> > have to deal with issues like pipelining, precharge, CAS latency and
> > bursting.  SRAM on the other hand is much easier.  You put an address on
the
> > address pins and then either read or write data on the data pins.
That's
> > it.  It always just kind of works whereas I've spent a ton of time
debugging
> > DRAM timing and commands in the past.
> 
> Thanks for the advice!
> 
> > 
> > You should be able to implement a 64KB SRAM chip with just two latches
using
> > 11 or 12 pins on an Arduino and it's really straight forward. Adding
> > additional 64K SRAM chips (128K, 192K, 256K etc...) is as easy as
peeling
> > off another pin from the Arduino and tying it to the chip select of the
> > additional SRAM chip (or you could mux it).
> 
> Sounds like a plan.  I'm assuming you'd tie the data I/O directly to the
> micro-controller, drive the address pins with shift registers, and drive
the
> ~CE, ~WE, ~OE directly?
> 
> I guess the ~CE could be used as an address bit.. so these could be driven
by
> the shift regs.
> 
> The nonvolatile store feature is pretty neat.
> 
> > 
> > Also, you should be able to easily outperform your data write
requirements
> > for storing audio with any available SRAM chip and an Arduino using this
> > approach. 
> > 
> > Will the Arduino DAC conversion rate and the bit depth deal well with
sound?
> > Especially if you're looking for a 44.1khz sampling rate (CD quality).
I
> > tried to do the math on this but my brain stopped working about an hour
> > ago.(All I can do now is blabber and type.)
> 
> I have 8-bit 44.1Khz output with a teensy++ working well right now, though
who
> knows what will happen once I add input..
> I'm currently storing my audio in program memory..
> 
> -Alex
> 
> > 
> > Regarding SRAM being too expensive, I'd agree compared to the density
(cost
> > per cell) for DRAM but unless you're building 1000  or more of
something,
> > I'd argue that you'll spend more money, time and effort getting a DRAM
> > solution to work.  Especially for building 1-off solutions.
> > 
> > Digikey sells Cypress Semiconductor 256Kbit(32K bytes) 45ns SRAM chips
in
> > dip form for $7.50
> >
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=STK14C88-3W
> > F45-ND
> > If you don't need the dip packaging, they get much cheaper with higher
> > densities.  1Mbit(128K bytes) 45ns for $2.50
> >
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=428-2066-ND
> > 
> > Granted, in comparison DRAM chips are 4M at 35ns for $1.60 and 16M for
$3.50
> > (but they suck!!!)
> > 
> > -greg
> > 
> > -----Original Message-----
> > From: dorkbotpdx-blabber-bounces at dorkbot.org
> > [mailto:dorkbotpdx-blabber-bounces at dorkbot.org] On Behalf Of Jason Plumb
> > Sent: Thursday, July 23, 2009 10:44 PM
> > To: A discussion list for dorkbot-pdx (portland, or)
> > Subject: Re: [dorkbotpdx-blabber] Microcontroller + RAM..
recording/playback
> > 
> > Alex Norman wrote:
> > > I'm looking to build a very simple audio/control voltage
> > recorder/"sampler" with
> > > a micro-controller.  I realize a DSP might be the best thing for this
but
> > I'm
> > > curious if I can do it with a micro-controller for cheap.
> > 
> > So this has been a desire of mine for a while now too.  I'd love to be 
> > able to do a few seconds at 44.1kHz mono (ideally up to like 60 or 120 
> > seconds!!).  I think that DSP is probably overkill for this application 
> > tho....there's very little *processing* involved, most of the work is on

> > the bus.
> > 
> > > Basically, the piece that is the major problem is finding a reasonably
> > large 
> >  > memory device which I can quickly read and write single bytes at a
> >  > time.
> > 
> > This really is the core issue...finding a sweet spot for complexity 
> > versus price versus capacity.  DRAM is so damn cheap now that it seems 
> > the way to go...but none of the popular MCUs interface with any out of 
> > the box.  You'd end up using a controller or rolling your own, the 
> > price/complexity of either is kinda cost prohibitive (I suspect).
> > 
> > In my experience, it's hard to find static RAM or serial RAM that are 
> > big, fast, and cheap enough for this application.
> > 
> > > I've been thinking that I could actually do this with eeprom if I make
it
> > so
> > > that the device doesn't 'record' and 'playback' at the same time.. but
it
> > would
> > > be ideal if I could do both..
> > 
> > Would eeprom really be fast enough?
> > 
> > What's in the guts of the Line 6 or Echoplex devices?
> > 
> > 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...
> > 
> > -jason
> > http://noisybox.net
> > _______________________________________________
> > dorkbotpdx-blabber mailing list
> > dorkbotpdx-blabber at dorkbot.org
> > http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber
> > 
> > _______________________________________________
> > dorkbotpdx-blabber mailing list
> > dorkbotpdx-blabber at dorkbot.org
> > http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber
> > 
> _______________________________________________
> dorkbotpdx-blabber mailing list
> dorkbotpdx-blabber at dorkbot.org
> http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber
> 
_______________________________________________
dorkbotpdx-blabber mailing list
dorkbotpdx-blabber at dorkbot.org
http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber



More information about the dorkbotpdx-blabber mailing list