mamurtaza 0 Posted January 8, 2015 Share Posted January 8, 2015 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 Quote Link to post Share on other sites
roadrunner84 466 Posted January 8, 2015 Share Posted January 8, 2015 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. mamurtaza 1 Quote Link to post Share on other sites
mamurtaza 0 Posted January 8, 2015 Author Share Posted January 8, 2015 Thanks for the information. I suppose it will solve my problem. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.