Writing to an SD Card/PIC18F2480


Closed Thread
Results 1 to 7 of 7
  1. #1
    divisionbyzorro's Avatar
    divisionbyzorro Guest

    Question Writing to an SD Card/PIC18F2480

    Hello all!

    I'm an uber newbie here, so bear with me. For my senior design project at Texas A&M University, we're trying to build a circuit that will receive messages from a CAN network and write those messages to some sort of external device which can be interfaced with a PC. We're currently trying to write to an SD card, but we're having pretty much zero luck with it so far.

    So I'm looking for any help I can with writing a program that will write files to an SD card in a FAT16 or FAT32 file system so that I can simply plug it into my SD card reader and get the information to my PC. I'd also like any information on how to build the circuit to do this; can I simply connect my PIC outputs to the SD card leads and use SPI to talk to the card? Or will I need some sort of external device to aid in this interface?

    Thanks,
    Sam

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by divisionbyzorro View Post
    Hello all!

    I'm an uber newbie here, so bear with me. For my senior design project at Texas A&M University, we're trying to build a circuit that will receive messages from a CAN network and write those messages to some sort of external device which can be interfaced with a PC. We're currently trying to write to an SD card, but we're having pretty much zero luck with it so far.

    So I'm looking for any help I can with writing a program that will write files to an SD card in a FAT16 or FAT32 file system so that I can simply plug it into my SD card reader and get the information to my PC. I'd also like any information on how to build the circuit to do this; can I simply connect my PIC outputs to the SD card leads and use SPI to talk to the card? Or will I need some sort of external device to aid in this interface?

    Thanks,
    Sam
    Oh boy....another 'SENIOR PROJECT'....

    For starters...what other projects have you built...that have worked? Give me an idea of what you know or rather...what you don't know...'cause I can think of 3 different ways to handle this...1 not so easy, and the other 2 relatively hard...

    Interfacing with CAN is NOT a newb project...nor is interfacing with an SD card. Flashing an LED is a newb project...

  3. #3
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default You can use an external serial EEPROM

    Hi,
    Interfacing to the CAN is not a newbie project. So you must concentrate on the CAN part.
    When done with the CAN controller part then I suppose you are through with the learning curve. To make your task easier you can use a 128 bytes array on your PIC and periodically dump it to an external eeprom rather than using a SD Card. This would be an advantage using the page write funtion of the EEPROM say a 24C512. Then you can have a routine that formats (puts strings, linefeed, Bin2ASCII etc) and dump on the PC via serial port. However I am not discouraging the use of an SD card. It is only limited by the project timeline you have. As MisterE says "Learning Oppertunities". Hey Steve thanks this has always inspired me.
    Regards

    Sougata

  4. #4
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default SD info

    THIS site seems to have some good information to get you started. They also have FAT16 code you can purchase at a reasonable price.... Although, since this is for a school project I'd strongly discourage you from buying a solution. There's some good information at the bottom of the page.
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  5. #5
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hello,

    Here is another site that sells an SD recorder that takes input from RS232 devices. www.roguerobotics.com/products/electronics/ummc. Seems reasonably priced. But like the earlier replies, this will be a complicated project if you haven't done anything like this before.

    HTH,

    BobK

  6. #6
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    HERE'S a hardware solution I've been wanting to try.
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Hi-
    There is a 2 part article on the use of multimedia cards in the Nov and Dec issues of everyday Practical Electronics (www.epemag.com). You can buy the back issues as PDF files. They even have demo files.

    Hope you come right with your project

    regards

    Angus Anderson

Similar Threads

  1. SD Card file attributes with SDFS3 ?
    By Chris Barron in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 27th March 2009, 09:18
  2. Writing to SD card
    By dhouston in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 9th November 2007, 11:23
  3. Sd interface board
    By T_J_W in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th August 2007, 12:00
  4. Problem on writing EEPROM in Winpic800 with picbasic pro
    By selimkara in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th May 2007, 16:33
  5. pic + alfat sd
    By ranaz in forum General
    Replies: 0
    Last Post: - 27th July 2006, 06:08

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts