Flash Memory Cards, USB sticks and Excel


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    timmers's Avatar
    timmers Guest

    Default Flash Memory Cards, USB sticks and Excel

    Has anyone ever implemented a data logging routine accessible to Excel?

    The application is for a flight recorder to store data on a memory card or USB stick, in such a way as to allow import into Microsoft Excel as comma seperated variables (*.CSV) or similar. Collecting around 1200 bytes a second into a USB stick makes a very useful performance analyser and de-bugger.

    I think the hardest part is formatting the card in such a way as to make it PC compatible.

    Is there any usefull research material you could point me too.


    Tim.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default

    Writing to an USB stick may be a problem since the PIC is an USB-Slave, just as the USB stick. Writing to a SD-card or similar should be possible with PBP but there aren't any ready made "commands" to do so, you need to write the routines yourself.

    If you want to take an easier aproach you might have a look at modules like DOS-on-chip or the MicroDrive. They interface to your PIC via RS232 or SPI and handles all the reading/writing to the SD-card. There are other similar products but their names escape me at the moment.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Another possibility would be the FTDI Vinculum VDIP1. I have a couple on the bench and so far I like them. The only draw back I can see is the VDIP has to know EXACTLY how many bits are going to be written to it at a time.

    I am planning to use the VDPI for a data logger from a gps module.

    For the excel app, write the file as a CSV.

    BrianT put together a nice how to, to get started with the VDPI.
    http://www.picbasic.co.uk/forum/showthread.php?t=7700
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    To read a memory card directly on a PC, if needs to have a FAT file format as in the case of the DOSonChip. Note that the Microdrive, as mentioned in the second post does not have FAT so you cannot read the card directly on a PC.

    The simplest solution is to use a PIC18 to write directly to SD/MicroSD or Compact Flash using FAT16/32. You can create CSV files for reading by Excel. I would recommend going with SD or MicroSD (instead of compact flash) as the physical interface to the PIC is simpler (uses much fewer lines) and the cards are smaller and less expensive.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    In the past, I skipped the FAT16/32 step altogether. I save the data on the SD card (or CF card or whatever) according to the way I want it. When I need to retrieve the data, I just import it using the serial port on the PIC and Hyperterminal on a PC and save it to a file. Do some 'post-processing' on a PC with some VB instead of worrying about trying to reinvent the wheel and write a FAT16 filing system on a PIC.

  6. #6
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Yes, that is definitely a viable solution if it fits the needs of the end user/customer.

  7. #7
    Join Date
    Dec 2006
    Posts
    38


    Did you find this post helpful? Yes | No

    Default Different Compiler

    Try MikroBasic by mikroelectronica they have support ie library for connecting an sd card directly to a pic via a few resistors.

    There are plenty of examples on their forum. and fat is supported

    The interconnect is on post 4

  8. #8
    Join Date
    Nov 2005
    Posts
    51


    Did you find this post helpful? Yes | No

    Default

    Try Proton or sword fish they also include library's to do the job and I think that swordfisfh supports fat32

  9. #9
    Join Date
    Apr 2006
    Location
    Alberta Canada
    Posts
    166


    Did you find this post helpful? Yes | No

    Default

    ive been using a rogue robotics SD card writer for some data logging circuits. http://www.roguerobotics.com/products/electronics/ummc just write data to it with "," in between, and it will open in excel.

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