No announcement yet.

uSDHC card with uLCD-32PT(GFX)

  • Filter
  • Time
  • Show
Clear All
new posts

  • uSDHC card with uLCD-32PT(GFX)

    I have several 4GB uSDHC cards. What do I need to do to be able to use them with a uLCD-32PT(GFX). I have tried full formatting them to FAT under Win7 but when running RUNDEMOS.4xe, it almost always says "Mount Failed!". Even when it says "Disk Mounted", it does not execute called program. Seems like the following code never executes:
    HTML Code:
    file_Run("4DTETRIS.4XE",0);                    // just run the prog, no args
    goto redo;

  • #2

    I have a sneaky suspicion Win7 is formatting the drive as FAT32.

    Do a CHKDSK on it from the command prompt to see what it is formatted as.

    If that's the problem try formatting as FAT using the command line format command, that (at least it did in XP) allows you to format a 4gb card as FAT16


    • #3

      I did a CHKDSK under Win7 and it said that the disk format is FAT. I then did a FORMAT g: in the command prompt - still the same problem as before.

      Next, I formatted it with FORMAT e: in the command prompt on an older computer which is WinXP - still would not work. I even commented out the if (res==1)//endif lines to make it run 4DTERIS.4xe - same problem, it kept saying "mount failed" and won't run the program. Must be something else.


      • #4

        just formatted a Sandisk 4gb card to FAT, 64k allocation units. Ran all the demo programs and all works ok. Have not had any similar reports of problem.

        Q1] Have you tried running the exact same setup on another brand of card?

        Q2] What brand are the cards you are using, if we have one here we can test?


        • #5
          Thanks for your answer. I have only 2 uSDHC cards and they are both AData brand. They both work fine on Win7 and WinXP in FAT and FAT32 modes. They also work in a Samsung cell phone and an Android tablet.

          I tried another thing - wrote a short program to see if the card will initialize:
          func main()gfx_Cls();txt_Set(FONT_SIZE, FONT3);print("   Memory available = ",mem_Heap(),"\n");if( !file_Mount() )repeatpause(300);until( file_Mount() );endifprint("FAT16 Services Started");//file_Run("4DTETRIS.4XE",0);repeatforeverendfunc
          It never gets to the line where it should print "FAT16 Services Started". Looks like it is stuck in the repeat/until loop.


          • #6

            How are you powering this display?


            • #7

              I am powering the display from a USB (powered) hub. After reading your last response, I added another USB connection and now it works mostly (it is still intermittent but at least it works about 60% of the time). So it is just a power supply issue requiring a solid 5V with sufficient current drive?


              • #8

                Well, it's beginning to look like that in your case.

                Most PCs supply enough current through their USB ports.

                Are you using a CE5 or an MB5? If it's an MB5 check here


                • #9

                  I spent hours trying to get the uSD card operations to work on my uLCD-32PT (SGC). Turned out that my uSD card did not support the SPI protocol (SPI is an optional requirement of the uSD standard).

                  Evidently the uLCD-32PT requires a SPI capable uSD card. But it is hard to tell if the card you have in hand does support SPI. I finally got a SanDisk 2G to work. It would be nice to have a list of cards that play well with the various 4D devices. For example, the uSD reader works fine with the card that confused the uLCD-32PT.

                  Also, when I hooked the logic analyzer up to the serial lines, I discovered that there is an undocumented Picaso SGC command 0x7A sent by FAT controller (then I noticed that FAT controller mentions a status command when it is performing operations) The command gets 1 byte back of status information that looks like info about the SD card and its format. I could not find the 0x7A command in the picasso documentation.

                  Any one at 4D care to enlighten us as to how to interpret the response?
                  Prof. Jim Hoover
                  Dept. of Computing Science
                  University of Alberta


                  • #10

                    I discovered that there is an undocumented Picaso SGC command 0x7A sent by FAT controller
                    The reason it's undocumented is because the only useful purpose it performs is to tell FAT Controller a few things so that it can adjust its menus accordingly. You will / should already know most of the things it contains.

                    but, since you asked, it contains bits as follows.

                    0x80 A uSD card is present
                    0x40 The uSD card contains a FAT partition
                    0x20 The uSD card contains a RAW partition
                    0x10 The FAT partition is protected
                    0x08 The Display is in 'old' image format.