Go Down

Topic: Arduino uno audio delay project (Read 11617 times) previous topic - next topic

Kitax

what is the difference between SRAM and NV-RAM

and i know i know ROM doesn't work for me this time, but i am just curious, how does it work? is it only possible to write it once, or is it slower or more complicated to write in it?

AWOL

NV is "non-volatile", so it won't lose its content when the power goes off.
SRAM is static, as opposed to dynamic.
Static RAM cells are bigger than DRAM (dynamic) cells, so densities are lower, but they don't need to be refreshed.

Kitax


NV is "non-volatile", so it won't lose its content when the power goes off.
SRAM is static, as opposed to dynamic.
Static RAM cells are bigger than DRAM (dynamic) cells, so densities are lower, but they don't need to be refreshed.


so basically i need a SRAM or DRAM... i guess the coding will change between those two, and the SRAM i guess would be simpler. as for the nvRAM, it will be more expensive and i wont be using the feature anyways...

Kitax

#33
Dec 25, 2013, 05:34 pm Last Edit: Dec 25, 2013, 05:40 pm by Kitax Reason: 1
ok so i think, that i will use
http://ww1.microchip.com/downloads/en/DeviceDoc/21290D.pdf (for a/d convertion)
http://www.ece.uvic.ca/~ceng455/lab/MCP4922.pdf (for d/a conversion)
http://www.atmel.com/images/doc2543.pdf (for driving these two chips) using library -->  http://arduino.cc/en/Reference/SPI

can i use any ram to delay the signal, or should i choose a ram with spi? and what about the word length... i have 12 bit audio, does that mean i need a 12 bit word length? in that case i have to get something like 64k x 1 bit ram...
or maybe i can use ??k x 4bit ram and programm it so that every third bit starts a word, or will it be really complicated to make the code work properly?

Grumpy_Mike

Quote
so basically i need a SRAM or DRAM

No it is SRAM, because DRAM needs to be refreshed every few millisecond or so. This involves cycling through all the addresses in a special access mode. It means a whole lot of extra electronics in addition to the memory chip.

Quote
and what about the word length.

Most memory is organized as 1 or 8 bytes wide. As you need 12 bits your choice is either to use two bytes and waste a nibble, or put two samples into three bytes. That is efficient in terms of memory usasge but takes a bit of logic to fish out the samples from the bytes.

Kitax


Quote
so basically i need a SRAM or DRAM

No it is SRAM, because DRAM needs to be refreshed every few millisecond or so. This involves cycling through all the addresses in a special access mode. It means a whole lot of extra electronics in addition to the memory chip.

Quote
and what about the word length.

Most memory is organized as 1 or 8 bytes wide. As you need 12 bits your choice is either to use two bytes and waste a nibble, or put two samples into three bytes. That is efficient in terms of memory usasge but takes a bit of logic to fish out the samples from the bytes.


thats what i thought...

well its not that hard... i dont need to read specific bits of the saved samples, so i just have to start reading from any byte whose number divides by 3 after i have subtracted 1.

i guess i could start reading after one full cycle of writing has completed, and start reading from the same byte i am writing, right after i have written in it, and use some kind of switch to increase the delay. every tick of the switch decreases the byte number by 3 (and i should include the roll over of course)

Go Up