Jump to content
Sign in to follow this  
mamurtaza

Storing ADC data on FatFS SD Card

Recommended Posts

Hi,

 

I had interface MSP430F5529 launchpad with FatFS Sd card. I was trying to store value from ADC into SD card and I found that I cannot store the value on SD Card, unless I do "sprintf" or equivalent printf of the data, only then I was able to store the value on SD card. However, sprintf is expensive command and takes more cycle then ADC output i.e some of the data is lost from ADC in doing sprintf. Is there a better alternative than sprintf or something like if I store raw value and later post process it?

 

Any help will be highly appreciated.

 

Thanks

Share this post


Link to post
Share on other sites

You only need sprintf if you want to use printf's formatting options. You could instead not do this and store data in raw 16 bit binary format. A compromise could be to use an integer to ascii function like itoa(), which is much faster than sprintf.

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...