Announcement

Collapse
No announcement yet.

writing data from PC to µSD card

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • writing data from PC to µSD card

    Hi, I am quite new to workshop. Looking for help.
    I got uoLED Goldelox module. I need to read data on serial port and write it to µSD card attached to module. What is a good way to do it?

  • #2
    Perhaps look at the bigdemo app, it is available for several sifferent platforms beneath this folder after you have installed workshop

    C:\Users\Public\Documents\4D Labs\Goldelox Serial
    Mark

    Comment


    • #3
      Thanks! That helped!

      My target - To read image data from serial port and to save it into uSD card and then to display image on device reading same data from uSD card.

      Now, I have reached a level, where I can read data from serial port and write it to uSD card (provided data is less than 126 bytes). I used media_setSector() to set address and media_writebyte() to write data into uSD card. (My experience, media_setAdd() behaves randomly, so refraining myself from using it.)

      Coming to my question -

      I am expecting byte stream on serial port which is in KBs. I am receiving data in chunks of 122 bytes (since we can not use combuf of more than 126 bytes with com_init(), serin()). I want to save those chunks sequentially in memory. How can I achieve that without using media_setAdd()? (Storing 122 byte chunks sequentially can not be achieved by setting address with media_setSector(). As it doesn't allow us to specify a memory location inside a sector of 512 bytes to store data. I want to store chunk immediately after the last byte of previous chunk.)
      Last edited by Digvijay; 7th November 2014, 01:03 AM.

      Comment


      • #4
        media_SetAdd() should work just fine, not sure why you are having issues, perhaps read the manual again, it is the byte address on the uSD rather than the sector address.

        Once you have set the sector or address just keep writing and the 'pointer' to the uSD will keep 'incrementing'. Once you have finished use media_Flush() to write out the data in the last sector.
        Mark

        Comment


        • #5
          Thanks for your reply!

          Comment

          Working...
          X