Announcement

Collapse
No announcement yet.

R20.pmmc

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

  • R20.pmmc

    What has changed since 1.08 for the picaso gfx? I downloaded the ulcd-32032-P1TGFX-R20 pmmc file but it was not a zip containing a readme of the changes. Is there a document somewhere?

    UPDATE: I downloaded WS 3.1.0.4 and the above pmmc file. The pmmc file will load into the uLCD-32032-P1T just fine but my application has errors now. Apparently the Workshop no longer knows the constants FONT4, TOUCH_PRESS and TOUCH_RELEASE. I'm sure there are others.
    The audio playback suddenly sounds like complete garbage as well and I get an error 21 if I screen save by turning it on and off using gfx_Set (9,1) and (9,0).

    Thanks,
    Thad
    If email spam were the edible Spam, there would be no world hunger.

  • #2


    FONT4 was dropped to make more room for code space
    to use FONT4, just include it in your program using:-
    #inherit "FONT4.FNT"

    then it can be used with
    txt_FontID(FONT4);
    or
    txt_Set(FONT_ID, FONT4);

    This gives the flexibility of adding whatever fonts you require by using the font tool.

    TOUCH_PRESS has changed to TOUCH_PRESSED
    TOUCH_RELEASE has changed to TOUCH_RELEASED

    Numeric values for gfx_Set and txt_Set should be abandoned, use the constants provided.
    There are now error codes to indicate bad constant values, eg:-
    error 21 indicates wrong values for gfx_Set

    eg for:-

    gfx_Set(9,1) // set contrast to 1, turns dispay on
    and gfx_Set(9,0); // set contrast to 0, turns dispay off

    should be changed to formal values

    gfx_Set(CONTRAST, OFF);
    and
    gfx_Set(CONTRAST, ON); // ON=1, turns on LCD, for AMOLED, this would be a contrast value

    there is also short-cuts for gfx_Set and txt_Set functions, eg for contrast

    gfx_Contrast(value);

    Shortcuts are provided to improve code visibility, and also makes a saving of 1 parameter, reducing code size.

    //------------------------------------------------------------------------------
    //gfx_Set() related constants
    //------------------------------------------------------------------------------
    #CONST
    PEN_SIZE 16 // not necessary to use (legacy mode)
    BACKGROUND_COLOUR 17
    OBJECT_COLOUR 18 // line / circle / rectangle generic colour
    CLIPPING 19 // clipping ON / OFF
    TRANSPARENT_COLOUR 20 // (only on displays with specific hware feature)
    TRANSPARENCY 21 // 0 = OFF, 1 = ON (only on displays with specific hware feature)
    FRAME_DELAY 22 // legacy mode, see pokeB(IMAGE_DELAY, n);
    SCREEN_MODE 23 // LANDSCAPE, LANDSCAPE_R, PORTRAIT, PORTRAIT_R
    OUTLINE_COLOUR 24 // if not BLACK (0) , used for outline around circles,rectangles and filled polygons
    CONTRAST 25 // for OLED,cahnge contrast, for LCD on or off only
    LINE_PATTERN 26 // used for patterned lines, 16bit value (0 = no pattern, '1's = pattern)
    COLOUR_MODE 27 // select 8 or 16 bit colour mode
    BEVEL_WIDTH 28 // button bevel width
    BEVEL_SHADOW 29 // button bevel shadow depth
    X_ORIGIN 30 // display position X offset
    Y_ORIGIN 31 // display position X offset
    #END

    //------------------------------------------------------------------------------
    //txt_Set() related constants
    //------------------------------------------------------------------------------
    #CONST
    TEXT_COLOUR 0 // text foreground colr
    TEXT_BACKGROUND 1 // text background colr
    TEXT_HIGHLIGHT 1 // text background colr
    FONT_ID 2 // default 0, else points to data statement font
    FONT_SIZE 2 // compatibility
    TEXT_WIDTH 3 // text width multiplier
    TEXT_HEIGHT 4 // text height multiplier
    TEXT_XGAP 5 // horizontal text gap (default 1)
    TEXT_YGAP 6 // vertical text gap (default 1)
    TEXT_PRINTDELAY 7 // for 'teletype' like effect when printing
    TEXT_OPACITY 8 // text mode flag, TRANSPARENT or OPAQUE
    TEXT_BOLD 9 // embolden text (auto reset)
    TEXT_ITALIC 10 // italicize text (auto reset)
    TEXT_INVERSE 11 // invert text (auto reset)
    TEXT_UNDERLINED 12 // underline text (auto reset)
    TEXT_ATTRIBUTES 13 // controls BOLD/ITALIC/INVERSE/UNDERLINE simultaneously
    TEXT_WRAP 14 // Sets the pixel position where text wrap will occur at RHS

    #END

    Shortcut values for gfx_Set and txt_Set

    //==================================================//
    // Single parameter short-cuts //
    // for the gfx_Set functions //
    // These functions return the existing value before //
    // the change is made. //
    //==================================================//
    func gfx_PenSize("mode"), 1; // 0 graphics pen size, SOLD or OUTLINE
    func gfx_BGcolour("colour"), 1; // 1 graphics background colour
    func gfx_ObjectColour("colour"), 1; // 2 graphics object colour
    func gfx_Clipping("mode"), 0; // 3 graphics clipping ON/OFF
    func gfx_TranparentColour("colour"), 1; // 4 graphics image transparent mask colour
    func gfx_Tranparency("mode"), 1; // 5 graphics image transparent mode ON/OFF
    func gfx_FrameDelay("milliseconds"), 1; // 6 graphics animation frame delay
    func gfx_ScreenMode("mode"), 1; // 7 graphics orientation LANDSCAPE, LANDSCAPE_R, PORTRAIT, PORTRAIT_R
    func gfx_OutlineColour("colour"), 1; // 8 graphics rectangle/circle outline colour
    func gfx_Contrast("value"), 1; // 9 graphics hardware value 0 to 9, 0=off, 1=lowest, 8=highest (only for AMOLED devices)
    func gfx_LinePattern("value"), 1; // 10 graphics line draw tesselation pattern (16 linear bits, 1=pixel off)
    func gfx_ColourMode("mode"), 1; // 11 graphics colour mode COLOUR8 or COLOUR16 (default colour 16)
    func gfx_BevelWidth("mode"), 1; // 12 graphics button bevel width
    func gfx_BevelShadow("value"), 1; // 13 graphics button bevel shadow depth
    func gfx_Xorigin("offset"), 1; // 14 graphics X origin
    func gfx_Yorigin("offset"), 1; // 15 graphics Y origin


    //==================================================//
    // Single parameter short-cuts //
    // for the txt_Set functions //
    // These functions return the existing value before //
    // the change is made. //
    //==================================================//
    func txt_FGcolour("colour"), 1; // 0 text foreground colour
    func txt_BGcolour("colour"), 1; // 1 text background colour
    func txt_FontID("id"), 1; // 2 text font ID (0 = system font)
    func txt_Width("multiplier"), 1; // 3 text width multiplier
    func txt_Height("multiplier"), 1; // 4 text height multiplier
    func txt_Xgap("pixelcount"), 1; // 5 text gap between characters
    func txt_Ygap("pixelcount"), 1; // 6 text gap between lines
    func txt_Delay("millisecs"), 1; // 7 text printing delay factor
    func txt_Opacity("mode"), 1; // 8 text OPAQUE or TRANSPARENT
    func txt_Bold("mode"), 1; // 9 text bold ON/OFF
    func txt_Italic("mode"), 1; // 10 text italic ON/OFF
    func txt_Inverse("mode"), 1; // 11 text inverse ON/OFF
    func txt_Underline("mode"), 1; // 12 text underline ON/OFF
    func txt_Attributes("value"), 1; // 13 text combined bold|italic|inverse|underline
    func txt_Wrap("value"), 1; // 14 text set text wrap position
    func _1F(), 0; // 15 text (reserved DO NOT REMOVE)
    Regards,
    Dave

    Comment


    • #3


      There are some changes made in the name of some functions. all uSD_functions are now media_functions. 
      The Font4 can be loaded via #inherit "FONT4.fnt".

      In my projects i had an semicolon after each 'endif'. this now produces an error.
      The best would be to read the new documentation 


      http://www.4dsystems.com.au/downloads/4DGL-Docs/4DGL-Programmers-Reference-Manual-rev2.pdf

      and http://www.4dsystems.com.au/downloads/Semiconductors/PICASO-GFX2/Docs/PICASO-GFX2-4DGL-Internal-Functions-rev1.pdf

      Comment


      • #4


        Thank you for the replies. I do have some concerns about the documentation. It is not very cohesive. For instance the pdf document referenced above does not include any of the constants mentioned further above. There is no mention anywhere of what happened to the audio. It sounds blown out even at low volumes. My samples are 22K and sound fine with pmmc 1.08. The brightness of the screen on my uLCD 32032 is actually dimmer using the new r20 pmmc as well. Why??

        Thad
        If email spam were the edible Spam, there would be no world hunger.

        Comment


        • #5


          Hi Thomas, not sure how your display could be dimmer with new PmmC, the graphics driver is essentially the same. With regard to audio, the amplifier drive is now a lot harder, so it may be necessary to reduce the volume level if your audio samples appear to be clipping. try changing the sound level to snd_Volume(30) which should give you about the same sound level that you would have been getting before (with old PmmC) Also, please try and provide more info on your finding of 'old PmmC brighter than 'new PmmC' and we'll try and figure out what the problem may be.
          Regards,
          Dave

          Comment


          • #6


            Sorry for the delay in the response to this. The display for the same program is essentially 30% dimmer than the previous PmmC would display. I'm not sure why this change occurred. I am displaying a picture from the SD card and the display has a marked brightness change from the old to the new PmmC. I'm not sure if it is a brightness change as much as a contrast change. The overall picture is darker but the white areas seem just as white. Old PmmC rev being uLCD-32032-P1T-4DGL-rev1_08.PmmC new being uLCD-32032-P1TGFX-R20.PmmC. It is quite noticable. The part number on the back is uLCD-32032-P1 Rev-2. It is the touch version. If you need my files to reproduce the problem, just let me know.
            The sound problem was not corrected by changing the volume to 30 it is just quieter noise now. It still sounds clipped or distorted. Should I be loading the sounds using some other method than the " file_PlayWAV("207.wav"); " method? What is the optimal samples per second to use with the new PmmC? I am using 22K samples. I read that you drastically changed the playback routines. They don't seem better from my standpoint but I do like the fact that it turns off the amp when finished playing. The back of the board is noticeably cooler around the speaker area. Sometimes when I playback sounds the uLCD locks up whining and the screen goes blank. Other times I can play the same sound without the lock up. The volume doesn't seem to effect the severity of the issue, the length of the file does though.


            Thad
            If email spam were the edible Spam, there would be no world hunger.

            Comment


            • #7


              Hi Thad,
              the PWM frequency was increased and also the PWM resolution was increased - this had the effect of boosting the volume considerably which also on the negative side allows the amp to be driven harder right up to clipping point but as you have said even at volume 30 the problem persists.
              Q1] Does there seem to be any difference between your own samples and the demo samples?
              Q2] Have you been able to go back to the old PmmC to verify things are ok there to eliminate the possibility that the module has become faulty?

              We will set up some tests for both issues and see what the problem could be and get back to you asap.
              Regards,
              Dave

              Comment


              • #8


                Hi, I haven't tried the demo samples yet, I will do that and get back with you. I have gone back to the old PmmC and things work fine there.

                Update: The demo sounds are garbled as well. I also happened to have three of these modules for a project and they all have the same problems with the new PmmC.

                Thad
                If email spam were the edible Spam, there would be no world hunger.

                Comment


                • #9


                  Any News?
                  Have you been able to re-create the problem??
                  If email spam were the edible Spam, there would be no world hunger.

                  Comment


                  • #10


                    Hello??? 2 weeks and no response??
                    If email spam were the edible Spam, there would be no world hunger.

                    Comment


                    • #11


                      Is there any resolution forthcoming on this issue? I haven't heard anything for almost 2 months.

                      Thad
                      If email spam were the edible Spam, there would be no world hunger.

                      Comment


                      • #12


                        We are still working on it (and a few other issues as well, of course). Sorry it's taking so long.
                        Mark

                        Comment

                        Working...
                        X