Jump to content

interface to common memory card


wonder

Recommended Posts

SD and MMC cards also use the SPI protocol, so you could optionally use that as well (depending on the pins you have available on the PIC, I suppose).

Encoding / decoding the FAT filesystem is the real overhead in the whole thing.  If you're using the PIC to store and read all the data and the card is never going into a PC, then you should just be able to use it as a large flat memory space and the implementation becomes much easier.

Link to comment
Share on other sites

I doubt, you can read/write raw data so easily without a file system on a computer. To gain access for "normal" applications when using with a cardreader, the medium has to be formatted to be accessible as a volume, so that the PC knows where to write it's raw-data!

Else you have to use very specialized software to gain access; I don't know of any (for the mac) right now; and I think this might be also some work to program such software, because it would mean to handle some very basic low-level stuff, that might be as complicated as writing a FAT-(or other fs)-driver for the pic...

I could think of reading/writing to the card via the mbhp-midi-device itself; so that your application (MIOS-application) has a "thru-mode" where you can access the data on the card via SPI protocol.

However, I think a proper implementation with rw-access for computers would be the right way to go, esp. if you want to store MegaBytes of Data. There are plenty of mp3-DIY projects, finding the right sources for a driver should be a solveable problem.

Link to comment
Share on other sites

Oh, that reminds me!  I just noticed this the other day - http://www.sparkfun.com/commerce/product_info.php?products_id=7955

It's a module that uses SD cards to load/read data, and handles all the overhead of the FAT filesystem.  I have no idea whether it's any good, but it should be useful for applications that want to do simple file manipulations without all the hassle of dealing with FAT itself.

Link to comment
Share on other sites

wow, that sounds like a great product.

but this version is nearly 40$ and the product sheet sais:

I2C/SMBus (currently unavailable)

but this one here ( http://www.sparkfun.com/commerce/product_info.php?products_id=7956 ) is just 12$ and sais:

I2C/SMBus (available soon)

I would definitely wait for the IIC Feature. Communicating via serial protocol would mean having to build another PIC16 based module. IIC would be super-easy, as it's already implemented in MBHP/MIOS...

best regards,

Michael

Link to comment
Share on other sites

mikroElektronika makes both CF and MMC/SD dev boards which hang straight off their dev boards. I believe they connect straight to some of the IO lines made available via a header, and come with example apps for everything.

I've actually got the CF board on order, along with an RTC, network controller, and v4 of their PIC dev board though Circuit-Ed so I can finally get going on a Nixie clock (among other things). Might want to look into picking one up so you can make something similar?

-Steve

Link to comment
Share on other sites

The good thing of some card types is that they use standard serial interface types. Parallel ATA would be possible (I´ve seen some MP3 player projects that use HDs) but uses a lot of port lines. PATA has the advantage of the old and slow compatibility modes, but for SATA you´d surely need extremely fast timings.

Anyway, except for Video or WAV streaming, I don´t see the need for hard drives anymore. In the meantime you can get 1 GB SD cards for around 20 Euros. They are small, cheap, mechanically reliable and have a simple interface - and 1 or 2 GB is sooo HUGE compared to a BankStick, so I doubt it´s really worth the effort to develop a HD interface.

some links for inspiration:

http://www.mikrocontroller.net/articles/Projekt_Mr.MIDI_-_Midi_Rekorder_mit_MMC/SD-Karte(german)

http://www.ulrichradig.de/home/index.php/avr/mmc-sd(german)

http://www.roland-riegel.de/sd-reader/

Seppoman

Link to comment
Share on other sites

Just a thought.... If you're going to make a hardware module which will take care of FAT for a CF card, why not just go straight to a hard drive?

Because it's overkill?

The best case I could think of for a CF/MMC memory unit for the MIDIbox stuff would reuse old 8MB / 16MB demo cards which came with many cameras. Still, that'd even be overkill for most uses.

(Then again, I'm the kind of person who thinks that one should shove all the memory they want in the box itself. I don't see a need for swappable memory. It's just another point of failure / inconvenience.)

Link to comment
Share on other sites

Just a thought.... If you're going to make a hardware module which will take care of FAT for a CF card, why not just go straight to a hard drive?

... because of uncle noise? - On the other hand: I then could complain about this f...ing noisy Harddrive and would be happy with cheap Mic-Pres because I wouldn't hear the "schhhschhhschhh...." anymore.  ;D

Greets, Roger

Link to comment
Share on other sites

  • 1 year later...

The good thing of some card types is that they use standard serial interface types. Parallel ATA would be possible (I´ve seen some MP3 player projects that use HDs) but uses a lot of port lines. PATA has the advantage of the old and slow compatibility modes, but for SATA you´d surely need extremely fast timings.

Anyway, except for Video or WAV streaming, I don´t see the need for hard drives anymore. In the meantime you can get 1 GB SD cards for around 20 Euros. They are small, cheap, mechanically reliable and have a simple interface - and 1 or 2 GB is sooo HUGE compared to a BankStick, so I doubt it´s really worth the effort to develop a HD interface.

some links for inspiration:

http://www.mikrocontroller.net/articles/Projekt_Mr.MIDI_-_Midi_Rekorder_mit_MMC/SD-Karte(german)

http://www.ulrichradig.de/home/index.php/avr/mmc-sd(german)

http://www.roland-riegel.de/sd-reader/

Seppoman

More SD Midi Controller links...

http://www.lehmayr.de/e_mrmidi.htm (english)

http://www.sdmidicontroller.com/self-assembly-pcb-kit/default.htm (Kit)

Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

I've very little programing skills in languages other then PHP - touched C++ and Python - so I can't help in MC module development.

But I've hope, that it's possible to mobilise some more experienced guys from this forum ;)

8x 512kilobits eeproms costs about 2x8=16 Euro (still don't know how to write Euro sign ;)) Small (64MiB) SD card costs about 3 Euro. Is there any difference? For 13 Euro it's possible to buy additional PIC to handle it...

Link to comment
Share on other sites

  • 4 weeks later...

You may want to consider the Microchip FAT16 file system. The code is freely available at the Microchip web site (see app note AN1045).

I have used this code with both SD and MMC cards (on a PIC24H MCU) without problems. The full featured code for a PIC18F MCU takes around 55K of program memory and under 2K data memory. You could easily use a PIC18F2620 chip to implement the file system and interface it to MIOS via I2C.

Hope this helps...

Regards,

Synapsys

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...