No announcement yet.

uSD Card Issue

  • Filter
  • Time
  • Show
Clear All
new posts

  • uSD Card Issue

    I have been away for a long time and all of my gear has been sitting in a toolbox. I pulled out my 144 today and am trying to get it to display images. I can't get anything to display. This is using the same uSD card I used in the past and it worked fine. Since then I have restored my PC so I have had to go back and re-install everything.

    I have updated the port speed. I can program the display with no issues. The display initializes the uSD with no issues. However, that's all I get. I would like to stress again that this uSD has worked in the past.

    Using the following code I found on another post, I get the card initialized successfully but then I get a string of all 00000000. I have verified that I am writing to the card on Raw with a specified offset of 0.
    #platform "GOLDELOX-GFX2"#inherit "4DGL_16bitColours.fnc"func main()var r, i, j ;r := media_Init();                    // initialize uSD cardif (!r)print("media_Init failed\n" ) ;print("Possible reasons\ninclude:-\n\n"  )   ;print("No uSD card inserted\n" ) ;print("uSD does not support\nSPI\n" )  ;print("Insufficient Power\navailable\n" )  ;print("(if using battery or\n MB5)\n" )  ;print("Faulty card\n" ) ;repeatforeverendifprint("media_Init sucessful\n" ) ;pause(1000);gfx_Cls();gfx_ScreenMode(4);media_SetSector(0x0000, 0x0000);        // set stream sector addressmedia_Image(0,0 );pause(1000);for (i := 0; i < 112; i++)j := media_ReadByte();print([HEX2] j) ;if (!((i+1) % 4)) print(" " ) ;if (!((i+1) % 8)) print("\n" ) ;nextrepeatforeverendfunc
    Is it possible that the data simply isn't being written to the card? If so, is there any other way to check the data on the card?

  • #2

    How are you 'writing to the card on RAW'?

    What options, what software?

    What's your Operating system?


    • #3

      I'm on an XP SP3 system.

      I am using Graphics Composer version 3. I am loading only two images, they are both 128 x 128 or smaller to avoid clipping issues. I build to the RAW with offset option with the offset set to 0.

      I have a second identical card that is FAT formatted for use on a different project. When using RMPET, this card shows up as a 4gb card in two partitions. The card I am having issues with shows up as a 30MB card. So while this seems to point to a possible problem, I have also tried to write to the other card in the RAW partition and read it off to no avail.

      The GC file is created correctly with the sector addresses. The display simply won't display them. I even went so far as to create a .bmp file that was only 50 x50 and placed it at 10,10 so I would have no clipping issues. Still nothing.

      Everything seems to point to the data not getting to the card correctly. However, I also ran the screensaver sample and I got nothing back. I then ran the USD check sample that writes a series of random numbers and then reads them back. It fails on the first read with all 0000 again.

      I've checked the traces on the board and can't find anything obviously wrong. I really don't want to reformat the other card since it doesn't seem to be working either.


      • #4

        You should be building to "4DGL, SGC Picaso - uSD Raw - GCI at Specified Offset" and not "SGC - uSD Raw".

        A 4gb card that is partitioned will show 30mb if the first partition is only 30mb. IF you write raw to this card you must add the RAW partition offset to the sector address, otherwise you will be trying to read sector 0 in the FAT partition.

        I'm not sure which 'USD check sample' you are referring to.

        How reliable and stable is your power supply? The uSD card will be the first thing to play up if your power supply is not up to scratch


        • #5

          I have done it both ways. I knew that the offset option was correct but I tried it the other way just in case.

          I am running direct from the USB port and have boosted the current output.

          The card is not partitioned at all. But I also can't seem to partition it using the RMPET tool.

          I just tried to format it through windows and it failed. So I either have a port issue or a bad card it seems. If I put the other card in, since it has a partition, I can explore it through windows like normal. This would seem to indicate that the port is fine.


          • #6

            It is the card. I wrote to the FAT formatted card and I had no problems at all. Luckily I got the cards for $6 USD last year at Christmas.