Using SD SPI directly without filesystem

I am going to get the microSD shield: microSD Shield Retail - RTL-09899 - SparkFun Electronics

And what I'd like to do is directly access data without a filesystem as if it were just external serial RAM. I need as much speed as possible. Can anybody clarify how to do this? I've never used SPI before. Is this easy to accomplish?

Thanks!

The problem is that SD cards are not very good memory. You need a file system to map out bad blocks and to do the error correction stuff that makes it look like it is reliable memory, which it isn't.

I see, that makes sense. Maybe a better choice would be getting a Mega 2560 with more I/O pins. I have some old 32 KB AS7C256 cache memory chips from an old 386 motherboard I could wire up directly and make a small access library for. It's CMOS static RAM.

How about 23LCV1024 SPI SRAM. 128K bytes, 2.5-5.6V volt supply, 20Mhz. Very easy to use and You can make it nonvolatile with a 1.5 volt battery.

groundfungus:
How about 23LCV1024 SPI SRAM. 128K bytes, 2.5-5.6V volt supply, 20Mhz. Very easy to use and You can make it nonvolatile with a 1.5 volt battery.

That's a better idea! Then I don't need to waste so much money when I don't need a Mega.

Also there is I2C EEPROM you can Easley use two tiny chips for 256K of storage.

Grumpy_Mike:
Also there is I2C EEPROM you can Easley use two tiny chips for 256K of storage.

These have a finite lifespan though, right? If so, I'll be wearing them out pretty quick unfortunately. What I need the memory for is allowing a 6502 emulator to use it, so there will be constant writes. Possibly millions in a minute!

In which case a SD card would be no good because these ware out faster than EEPROM .
Does it have to be non volatile?

Yeah the SD card was a stupid idea I know. :stuck_out_tongue: No, volatile is just fine. Preferred actually.

A friend of mine who is very good with hardware design (he created this awesome little thing Flea Systems - Flea86 ) just recommended this: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en559067

He doesn't have any Ardunio-specific experience though. This should be easy enough to interface with an Uno, right? Or if you have a better suggestion let me know please. Sorry if my questions sound a little noobish. I'm good with software/programming, but am far from a hardware pro.

That will give you 64K bytes of RAM.
Which back in the day was a lot of memory.

The Microchip SPI SRAM 23LC512 and 23LC1024 recommended in previous posts are great products.

I also have used the non-volatile versions, 23LCV512 and 23LCV1024, which supports battery backup with a 3V lithium cell using only 4 micro-amps. Here is an overview http://www.microchip.com/pagehandler/en-us/products/memory/serialSRAM/home.html.

SPI memory is slow when accessed at the byte level. You must send three or four extra bytes of overhead to specify an operation and address. The operation is one byte and the address is two bytes for 64 KB parts and three bytes for 128 KB parts.

The SPI library takes about two microseconds to transfer a bytes so access to a byte on a 64 KB part requires a four byte transfer and takes about eight microseconds.

Larger transfers in sequential mode are more efficient since there are three or four blocks of overhead for a block of data.