Announcement

Collapse
No announcement yet.

Setting the contrast in SGC

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

  • Setting the contrast in SGC

    Good afternoon,

    I'm using a Solomon Systech LCD SSD1963 controller to drive a 640x480 LCD reasonably successfully, however, I would like to be able to control the LCD brightness better than on or off.

    The SSD1963 controller requires the SET_PWM _CONF command with 6 parameters. Unfortunately, the parameter that changes the brightness is the 2nd parameter. Using the DISP tool I can set up a command sequence for Driving_Current1 with 6 preset parameters, and when I use the PICASO (via the FAT_Controller) to set the contrast level, I can see the PWM duty cycle change, so I know that I'm processing the correct command sequence.

    The DISP tool appears to only allow parameters to be appended. Is there a way of inserting the parameter in the 2nd position?
    I've tried putting a continuing dummy command on the next line, but DISPL complains about having no command to send.

    Regards,
    David

  • #2


    IIRC The trick is to only send the first 2 parameters, the other 4 wont be changed from what you initially set them to.
    Mark

    Comment


    • #3


      Tried that, without success. It needs at least the third value to turn on the PWM module.

      Comment


      • #4


        Sorry, I meant send all 6 (or whatever is needed to turn it on) in the 'initialization' code. Then just send 2 to adjust the brightness.
        Mark

        Comment


        • #5


          I already had the initialisation code (with 6 parameters) in the initialisation section.
          SET_PWM_CONF (0xBE) 0x0E 0x7F 0x01 0x00 0x00 0x00

          I then use
          SET_PWM_CONF (0xBE) 0x0E
          with append parameter and it does not recognise the command.

          If I use SET_PWM_CONF (0xBE) 0x0E 0xF0
          with append parameter, the PWM waveform changes depending on the value of bit 0 in the parameter (ie 1, 3, 5, 7 turn it on, 0 2, 4 turn it off).
          That was how I found it needed the third parameter, whilst trying various combinations.

          I using PmmC version 17.

          Comment


          • #6


            Hmm, ok, I'll do some testing to see what I can come up with.
            Mark

            Comment


            • #7


              I have confirmed that the third parameter is required.

              I will email you a 'special' PmmC, this PmmC sends a third parameter (0x01) when the Driving_Current1 command is sent.

              So in DISP for Driving_Current1 you should set as follows SET_PWM_CONFIG, 0x10, Yes, 4.

              So the contrast 0-15 will set the PWM to 0x00, 0x10 .... 0xE0, 0xF0.

              Could you please have a look at how this works and comment. We have concerns that some displays do not exhibit a linear brightness, you may feel you need a value less than 0x10 for the minimum value.

              Once we have worked out the best way to achieve this with the SSD1963 we will modify DISP and produce a PmmC to go with it.

              Can I ask which LCD you are using? Does it have Touch? (if so, how accurate is it?)
              Mark

              Comment


              • #8


                Success. Sending the contrast command changes the PWM signal.

                I need to have a look at the SSD1963 data as I'm only getting a 0.2V square wave out of the chip. I'm pretty sure it's not cooked and I have tried a pull up resistor without success, so I might have to ask Solomon. That means I can't comment on the linearity of the brightness yet. I was using the DCENB signal to control the backlight, but for these displays the sense is wrong, 0V is backlight on, >2.5V is backlight off. Once the PWM is corrected, this won't be an issue.

                I'm using/testing/evaluating two EDT displays, the ETQ570G2DH6 and the ETV570G2DHU, 5.7" QVGA and VGA respectively. Both have touch screen. The touch screen is quite accurate, although I am only driving them directly from the PICASO chip, but I have noticed that pressing a button causes the button to toggle on and off, whereas with the small uLCD-32032-P1T that didn't happen.
                A bit surprising since the terminal resistance is not that significantly different! A bit more investigation will take place soon.

                I was able to use the DISP calibration command on the QVGA screen, but not the VGA as I found some issues.

                The FAT Controller software doesn't recognise the VGA screen. The Picaso responds "01 10 17 FF FF" and the software complains with "Version command response does not contain resolution information and no valid 4D rom image loaded". I haven't particularly worried about it as I could load the pmmc and the display configuration and go off and use the display.

                On a separate issue I have noticed though, that once I load a pmmc file, I need to take out my uSD card in order to load a 4D device header file. I only need to do this the first time; once a device header is loaded, I can reload device headers at will.

                Comment


                • #9


                  Thanks for that, keep us informed about how you get on.

                  The FAT Controller software doesn't recognise the VGA screen. The Picaso responds "01 10 17 FF FF" and the software complains with "Version command response does not contain resolution information and no valid 4D rom image loaded". I haven't particularly worried about it as I could load the pmmc and the display configuration and go off and use the display.

                  The 'FF FF' is usually something that helps FAT Controller determine the screen size, it is not created for 'newer' resolutions. Simply Click on 'Settings' and point the 'Rom Image' to the 4DRom file created by DISP.

                  On a separate issue I have noticed though, that once I load a pmmc file, I need to take out my uSD card in order to load a 4D device header file. I only need to do this the first time; once a device header is loaded, I can reload device headers at will.
                  Strange, I'll check that scenario when I next get a chance.
                  Mark

                  Comment


                  • #10


                    OK, some progress, but unfortunately I think it's in your court.

                    1. FAT Controller software not recognising VGA screens.
                    I tried your suggestion with the 4D rom image and it works great.

                    2. The uSD card stopping writing of the device header file.
                    When I went back to ver 16, this problem went away, on both the VGA and the uLCD-32032-P1T.

                    3. Touch Screen inconsistencies when pressing buttons.
                    I went back to the uLCD-32032-P1T and tried again and it worked OK on SGC version 16. When I upgraded to SGC version 17, I get the same problem. Requesting the touch screen coordinates responds with the valid data about 80% of the time. The other times it returns a max value integer. This seems to be dependent on whether I'm moving the pointer on the screen, but I can't imagine why they would be related. So I backgraded my VGA screen to version 16, and hey presto, the touch screen works like a charm.

                    Sorry guys, but it looks like something broke between 16 and 17.

                    I have noticed though that between 16 and 17, the clear screen on the uLCD-32032-P1T in landscape mode now works correctly. Well done.

                    David

                    Comment


                    • #11


                      2. The uSD card stopping writing of the device header file.
                      When I went back to ver 16, this problem went away, on both the VGA and the uLCD-32032-P1T.

                      Sorry, cant recreate this, tried V17 with a uLCD-32032-P1T and another display, both with uSD cards installed. Loaded empty PmmC and used DISP to first load and then replace the header file. Worked every time.

                      What PmmC version are you using? What is the exact message?

                      3. Touch Screen inconsistencies when pressing buttons.
                      I went back to the uLCD-32032-P1T and tried again and it worked OK on SGC version 16. When I upgraded to SGC version 17, I get the same problem. Requesting the touch screen coordinates responds with the valid data about 80% of the time. The other times it returns a max value integer. This seems to be dependent on whether I'm moving the pointer on the screen, but I can't imagine why they would be related. So I backgraded my VGA screen to version 16, and hey presto, the touch screen works like a charm.
                      I can't recreate this either. V17 fixed the touch co-ordinates always being in Portrait mode, but other than that there were no changes in that area. Can you describe exactly how to recreate this on the uLCD-32032-P1T?
                      Mark

                      Comment


                      • #12


                        OK, I tried the uSD card again, after repartitioning as a full card and reformatting and it worked OK. I then retried with a 6MB FAT partition and the rest as unformatted and I had the same problem, although now it is only intermittent, sao I might look to using the FAT commands instead of RAW.

                        I've attached a document showing a capture of the program debug output. It shows the incoming serial data in hex on the right and the interpreted data in ascii on the left.

                        It appears that in version 17 the status command intermittently comes back with a 'no touch' in the middle of the moving. The debug output shown is slowed down a lot from the normal operation, but I have noticed that in ver 16 the status and coordinates command can respond with moving and the same coordinates between successive reads. However, on ver 17 I haven't seen the same thing. Is it possible that if the SGC sees that the position hasn't changed, then the status responds with a 0 status?

                        The touch sequence in 16 shows as none, press, moving, release, none, whereas the sequence in 17 can be none, press, moving, none, moving, release, none.

                        I can change my code to handle this if necessary.

                        Regards,
                        David

                        Attached files Touch_Changes.doc (40 KB)

                        Comment


                        • #13


                          I have sent another PmmC to you
                          Mark

                          Comment

                          Working...
                          X