Shop OBEX P1 Docs P2 Docs Learn Events
Reading and writing to a CF Card. — Parallax Forums

Reading and writing to a CF Card.

stuart_wstuart_w Posts: 3
edited 2006-10-25 03:02 in General Discussion
Hello,

I am new to the list, and, am not completly sure on the protocol regarding creating new topics and such. That said,
I have been doing some research on reading/writing to a CF Card and have drawn a blank.

Does anyone here have experience doing this? If so, could you please share your expierience. what's involved?

Thanks in advance.

Comments

  • BeanBean Posts: 8,129
    edited 2006-10-24 11:59
    Stuart,
    I have worked with SD cards, basically they are serial and CF cards are parallel.
    If you just want to store data and get it back, they are not too hard to use.
    If you want to create files that are readable from a PC (FAT) then that is quite a bit harder.
    Do a google search and I'm sure you will find some ideas.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
    ·
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-10-24 12:39
    As said, CF-cards are parallel, and in fact uses a subset of the IDE-interface used in Harddrives.
    They are therefore not that easy to work from a microcontroller(you don't mention which one you're planning to use), and you may find that you run out of available pins...

    You can download the complete specification here: Compactflash.org

    The easiest solution is to go for a SD-card and something like this:

    Sprarkfun



    Edit: Farked up links...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...

    Post Edited (Gadgetman) : 10/25/2006 7:12:37 AM GMT
  • stuart_wstuart_w Posts: 3
    edited 2006-10-24 16:11
    Bean,

    Interesting, I hadn't even thought about using SD cards. I will probably settle on the simplest method possible, ie no real FS to speak of.
    What MCU did you use?

    Gadget,

    I haven't decided on which MCU to use yet. I have SX chips 28/48, basic stamps, a Prop chip,.. I'
    m open to suggestions.

    Thanks for the link. I'll check it out.
  • BeanBean Posts: 8,129
    edited 2006-10-24 23:50
    stuart_w said...
    Bean,
    What MCU did you use?
    Stuart, LOL I used the SX48 of course, look below in my signature. Click on www.sddatalogger.com

    If you aren't interested in doing a file system, I could probably share some of my code that does the communication with the SD card. You will need some kind of RAM chip too because the SD cards read and write in 512 byte sectors. The SX48 does not have enough RAM to hold a whole sector at one time.

    I have attached a picture of the bottom of the data logger. You can see the SX48 and the 32K·SRAM IC·above it.

    Bean.
    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin


    Post Edited (Bean (Hitt Consulting)) : 10/24/2006 11:59:44 PM GMT
    509 x 663 - 54K
  • stuart_wstuart_w Posts: 3
    edited 2006-10-25 03:02
    Bean,

    A filesystem would be nice but it's not critical. The goal is to log data. That would be awesome if you'd share code you've written to access sd cards.


    Thanks
Sign In or Register to comment.