Announcement

Collapse
No announcement yet.

ST7775R driver

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

  • ST7775R driver

    Hi,

    Do you have an example code for the driver ST7775R for using with Designer?

    I have the code for ST7735R, do you know if the drivers are too different?

    Thanks

  • #2
    The ST7735R is a 'low level' driver chip used on smaller displays, you don't need to know anything about this or any other driver to code in Designer, all that is taken care of for you in the PmmC.

    Mark

    Comment


    • #3
      So, If I have this ST7775R C++ code:
      void Display::begin()
      {
      writeWr(0x01, 0x011C);//Driver Output Control
      writeWr(0x02, 0x0100);//LCD Driving Control
      writeWr(0x03, 0x1030);//Entry Mode
      writeWr(0x08, 0x0808);//Display Control 2
      writeWr(0x0C, 0x0000);//RGB Display Interface Control 1
      writeWr(0x0F, 0x0E01);//Frame Market Position

      writeWr(0x10, 0x0A00);//Power Control 1
      writeWr(0x11, 0x1038);//Power Control 2
      writeWr(0xFF, 0x0003);//NVM Commamd Enable
      writeWr(0xB0, 0x1411);//Power Control 3
      writeWr(0xB1, 0x0202);//Power Control 4
      writeWr(0xB2, 0x0313);//Power Control 5

      writeWr(0x30, 0x0000);//Gate Scan Control
      writeWr(0x31, 0x00db);//Vertical Scroll Control 1
      writeWr(0x32, 0x0000);//Vertical Scroll Control 2
      writeWr(0x33, 0x0000);//Vertical Scroll Control 3
      writeWr(0x34, 0x00db);//Partial Driving Control 1
      writeWr(0x35, 0x0000);//Partial Driving Control 2
      writeWr(0x36, 0x00AF);//Horizontal Address End Position
      writeWr(0x37, 0x0000);//Horizontal Address Start Position
      writeWr(0x38, 0x00DB);//Vertical Address End Position
      writeWr(0x39, 0x0000);//Vertical Address Start Position

      writeWr(0xFF, 0x0003);//NVM Commamd Enable
      writeWr(0x50, 0x0000);//Gamma Control 1
      writeWr(0x51, 0x0300);//Gamma Control 2
      writeWr(0x52, 0x0103);//Gamma Control 3
      writeWr(0x53, 0x2011);//Gamma Control 4
      writeWr(0x54, 0x0703);//Gamma Control 5
      writeWr(0x55, 0x0000);//Gamma Control 6
      writeWr(0x56, 0x0400);//Gamma Control 7
      writeWr(0x57, 0x0107);//Gamma Control 8
      writeWr(0x58, 0x2011);//Gamma Control 9
      writeWr(0x59, 0x0703);//Gamma Control 10
      writeWr(0x20, 0x0000);//Horizontal DRAM Address set
      writeWr(0x21, 0x0000);//Vertical DRAM Address set
      writeWr(0x07, 0x1017);//Display Control 1
      }

      In my Designer Code, Do I have to write some thing like this?
      //Initialization for the ST7775R
      #DATA
      byte INIT_tbl

      _DISPLAY_X_MAX, //width:135
      _DISPLAY_Y_MAX,//height:220
      ST7775_GRAM, //write access register
      ST7775_GRAM,//read access register

      1,0x01, 0x011C,//Driver Output Control
      1,0x02, 0x0100,//LCD Driving Control
      ...
      ...


      I am really don't know if I have to write:
      1,0x01, 0x011C,//Driver Output Control
      or
      2,0x01, 0x01,0x1C,//Driver Output Control
      or
      2,0x01, 0x1C,0x01,//Driver Output Control

      Comment


      • #4
        Since the ST7735R is inherently byte oriented you should be using something like

        2,0x01, 0x01,0x1C,//Driver Output Control

        Are you starting with the uLCD-144-G2-A-R26 PmmC? The ST7735R has quirks with its readpixel code that require that PmmC for it to work. Note also that many displays using this driver have x and/or y offsets, so check that a gfx_Rectangle(0,0,peekB(GFX_XMAX),peekB(GFX_YMAX)) is visible on all 4 sides.
        Mark

        Comment


        • #5
          Hi,

          I have to write the driver for ST7775R, not for ST7735R. More or less I have the same problem that I had previously here:
          http://forum.4dsystems.com.au/forum/...r-for-goldelox

          Have I to create a new product in Workshop in order to be able to program my new circuit?
          I am writting the code for the driver ST7775R, What PmmC shall I use?
          A previous time, I had to create a new PmmC, Do I have to do the same?
          My TFT is: driver ST7775R, number of dots 134RGBx220, module area 30x50mm, MCU interface 80-8bits

          Comment


          • #6
            All the problems in that thread ended up resolved, so I can't understand what you mean by "More or less I have the same problem that I had previously"

            The 'blank' PmmC is Goldelox_G2_R26, so try that as a starting point.

            It's the PmmC that's in workshop, so you should be able to use Workshop 'as is'.

            If you want to use ViSi and thus need a 'larger' screen size, then we will need to show you how to do that, but let's leave that for later
            Mark

            Comment


            • #7
              Help for the driver ST777 Click image for larger version

Name:	IMG_20171130_135602.jpg
Views:	77
Size:	682.4 KB
ID:	60780 5R:

              After reading the ST7775R manual I have writen this for this TFT2P2597-E:
              But the screen it still is white:
              The pmmc used is GOLDELOX-GFX2

              Help please!Click image for larger version

Name:	IMG_20171130_135602.jpg
Views:	126
Size:	682.4 KB
ID:	60779

              Code:
              #platform "GOLDELOX"
              #inherit "4DGL_16bitColours.fnc"
              
              //=============================================
              //=============================================
              // 4D Systems
              // GOLDELOX-GFX2
              // display specifics for ST7775R
              // Version 1.0
              // 30/11/2017
              //=============================================
              //=============================================
              #constant _DISPLAY_X_MAX 175 //width
              #constant _DISPLAY_Y_MAX 219 //heigTh
              
              //=============================================
              // write device state machine constants
              // The values are fixed, do not change.
              // used in GRAM state machine tables
              //=============================================
              #CONST
              WRITE_CONTROL_CONSTANT 0
              WRITE_DATA_CONSTANT 1
              WRITE_CONTROL_BYTE 2
              WRITE_DATA_BYTE 3
              WRITE_EXIT 0xFF
              #END
              
              //=============================================
              // GRAM rectangle control register addresses
              // the values represent the addresses of the
              // internal register address holding register
              // and are fixed.
              //=============================================
              #CONST
              _VX1 0x37//Horizontal Address Start Position
              _VY1 0x39//Vertical Address Start Position
              _VX2 0x36//Horizontal Address End Position
              _VY2 0x38//Vertical Address End Position
              #END
              
              //=============================================
              // ST7775R Registers
              //=============================================
              #CONST
              // ST7775R LCD Controller Commands
              ST7775_DRAM_H 0x20//Horizontal DRAM Address set
              ST7775_DRAM_V 0x21//Vertical DRAM Address set
              ST7775_GRAM 0x22//Write\read data to\from GRAM
              #END
              //=============================================
              // fin
              //=============================================
              
              
              //===========================================================
              // GRAM state machine for ST7775R
              // using 13 bytes
              //===========================================================
              #DATA
              byte GRAM_sm
              WRITE_CONTROL_CONSTANT, ST7775_DRAM_H,
              WRITE_DATA_BYTE, 0x00,
              WRITE_DATA_BYTE, _VX1,
              WRITE_DATA_BYTE, 0x00,
              WRITE_DATA_BYTE, _VX2,
              WRITE_CONTROL_CONSTANT, ST7775_DRAM_V,
              WRITE_DATA_BYTE, 0x00,
              WRITE_DATA_BYTE, _VY1,
              WRITE_DATA_BYTE, 0x00,
              WRITE_DATA_BYTE, _VY2,
              WRITE_EXIT
              #END
              
              //===========================================================
              // initialization for the ST7775R
              // using 33 bytes
              //===========================================================
              #DATA
              byte INIT_tbl
              
              // first 4 bytes of table hold
              // display access information
              _DISPLAY_X_MAX, // width: 134-1
              _DISPLAY_Y_MAX, // height: 220-1
              ST7775_GRAM, // write access register 0x22=GRAM Read/Write Port
              ST7775_GRAM, // read access register
              // now the display initialization table
              INIT_TABLE_DELAY, 150,//0xFE, delay 150ms
              2,0x01, 0x01,0x1C,//Driver Output Control
              2,0x02, 0x01,0x00,//LCD Driving Control
              2,0x03, 0x10,0x30,//Entry Mode
              2,0x08, 0x08,0x08,//Display Control 2
              2,0x0C, 0x00,0x00,//RGB Display Interface Control 1
              2,0x0F, 0x0E,0x01,//Frame Market Position
              2,0x10, 0x0A,0x00,//Power Control 1
              2,0x11, 0x10,0x38,//Power Control 2
              2,0xFF, 0x00,0x03,//NVM Commamd Enable
              2,0xB0, 0x14,0x11,//Power Control 3
              2,0xB1, 0x02,0x02,//Power Control 4
              2,0xB2, 0x03,0x13,//Power Control 5
              2,0x30, 0x00,0x00,//Gate Scan Control
              2,0x31, 0x00,0xdb,//Vertical Scroll Control 1
              2,0x32, 0x00,0x00,//Vertical Scroll Control 2
              2,0x33, 0x00,0x00,//Vertical Scroll Control 3
              2,0x34, 0x00,0xdb,//Partial Driving Control 1
              2,0x35, 0x00,0x00,//Partial Driving Control 2
              2,0x36, 0x00,0xAF,//Horizontal Address End Position
              2,0x37, 0x00,0x00,//Horizontal Address Start Position
              2,0x38, 0x00,0xDB,//Vertical Address End Position
              2,0x39, 0x00,0x00,//Vertical Address Start Position
              2,0xFF, 0x00,0x03,//NVM Commamd Enable
              2,0x50, 0x00,0x00,//Gamma Control 1
              2,0x51, 0x03,0x00,//Gamma Control 2
              2,0x52, 0x01,0x03,//Gamma Control 3
              2,0x53, 0x20,0x11,//Gamma Control 4
              2,0x54, 0x07,0x03,//Gamma Control 5
              2,0x55, 0x00,0x00,//Gamma Control 6
              2,0x56, 0x04,0x00,//Gamma Control 7
              2,0x57, 0x01,0x07,//Gamma Control 8
              2,0x58, 0x20,0x11,//Gamma Control 9
              2,0x59, 0x07,0x03,//Gamma Control 10
              2,0x20, 0x00,0x00,//Horizontal DRAM Address set
              2,0x21, 0x00,0x00,//Vertical DRAM Address set
              2,0x07, 0x10,0x17,//Display Control 1
              INIT_TABLE_DELAY, 10,//0xFE, delay 10ms
              INIT_TABLE_END // 0xFF,dont forget this !
              #END
              
              var combuf[10];
              
              func main()
              var value:=0;
              setbaud(BAUD_9600);
              com_Init(combuf,7,0);
              disp_Init(INIT_tbl, GRAM_sm); // initialize the display
              while(!media_Init()) // initialize the SD Card
              putstr("Drive not mounted...");
              pause(1000);
              gfx_Cls();
              pause(100);
              wend
              repeat

              Comment


              • #8
                I attach the documente that the manufacturer sent me for the initialitation:
                I think that my mistake is in "byte GRAM_sm"

                #platform "GOLDELOX"
                #inherit "4DGL_16bitColours.fnc"

                //=============================================
                //=============================================
                // 4D Systems
                // GOLDELOX-GFX2
                // display specifics for ST7775R
                // Version 1.0
                // 30/11/2017
                //=============================================
                //=============================================
                #constant _DISPLAY_X_MAX 175 //width
                #constant _DISPLAY_Y_MAX 219 //heigTh

                //=============================================
                // write device state machine constants
                // The values are fixed, do not change.
                // used in GRAM state machine tables
                //=============================================
                #CONST
                WRITE_CONTROL_CONSTANT 0
                WRITE_DATA_CONSTANT 1
                WRITE_CONTROL_BYTE 2
                WRITE_DATA_BYTE 3
                WRITE_EXIT 0xFF
                #END

                //=============================================
                // GRAM rectangle control register addresses
                // the values represent the addresses of the
                // internal register address holding register
                // and are fixed.
                //=============================================
                #CONST
                _VX1 0x80//Horizontal Address Start Position
                _VY1 0x81//Vertical Address Start Position
                _VX2 0x82//Horizontal Address End Position
                _VY2 0x83//Vertical Address End Position
                #END

                //=============================================
                // ST7775R Registers
                //=============================================
                #CONST
                // ST7775R LCD Controller Commands
                ST7775_DRAM_H 0x20//Horizontal DRAM Address set
                ST7775_DRAM_V 0x21//Vertical DRAM Address set
                ST7775_GRAM 0x22//Write\read data to\from GRAM
                #END
                //=============================================
                // fin
                //=============================================


                //===========================================================
                // GRAM state machine for ST7775R
                // using 13 bytes
                //===========================================================
                #DATA
                byte GRAM_sm
                WRITE_CONTROL_CONSTANT, 0x00,
                WRITE_CONTROL_CONSTANT, ST7775_DRAM_H,
                WRITE_DATA_BYTE, 0x00,
                WRITE_DATA_BYTE, _VX1,
                WRITE_DATA_BYTE, 0x00,
                WRITE_DATA_BYTE, _VX2,
                WRITE_CONTROL_CONSTANT, 0x00,
                WRITE_CONTROL_CONSTANT, ST7775_DRAM_V,
                WRITE_DATA_BYTE, 0x00,
                WRITE_DATA_BYTE, _VY1,
                WRITE_DATA_BYTE, 0x00,
                WRITE_DATA_BYTE, _VY2,
                WRITE_EXIT
                #END

                //===========================================================
                // initialization for the ST7775R
                // using 33 bytes
                //===========================================================
                #DATA
                byte INIT_tbl

                // first 4 bytes of table hold
                // display access information
                _DISPLAY_X_MAX, // width: 137-1
                _DISPLAY_Y_MAX, // height: 220-1
                0x00,
                ST7775_GRAM, // write access register 0x22=GRAM Read/Write Port
                0x00,
                ST7775_GRAM, // read access register
                // now the display initialization table
                2,0x01, 0x01,0x1C,//Driver Output Control
                2,0x02, 0x01,0x00,//LCD Driving Control
                2,0x03, 0x10,0x30,//Entry Mode
                2,0x08, 0x08,0x08,//Display Control 2
                2,0x0C, 0x00,0x00,//RGB Display Interface Control 1
                2,0x0F, 0x0E,0x01,//Frame Market Position

                2,0x20, 0x00,0x00,//Horizontal DRAM Address set
                2,0x21, 0x00,0x00,//Vertical DRAM Address set
                2,0x10, 0x0A,0x00,//Power Control 1
                2,0x11, 0x10,0x00,//Power Control 2
                INIT_TABLE_DELAY, 10,//0xFE, delay 10ms
                2,0x30, 0x00,0x00,//Gate Scan Control
                2,0x31, 0x00,0xdb,//Vertical Scroll Control 1
                2,0x32, 0x00,0x00,//Vertical Scroll Control 2
                2,0x33, 0x00,0x00,//Vertical Scroll Control 3
                2,0x34, 0x00,0xdb,//Partial Driving Control 1
                2,0x35, 0x00,0x00,//Partial Driving Control 2
                2,0x36, 0x00,0x85,//Horizontal Address End Position
                2,0x37, 0x00,0x00,//Horizontal Address Start Position
                2,0x38, 0x00,0xdb,//Vertical Address End Position
                2,0x39, 0x00,0x00,//Vertical Address Start Position
                INIT_TABLE_DELAY, 10,//0xFE, delay 10ms
                2,0xFF, 0x00,0x03,//NVM Commamd Enable
                2,0x50, 0x02,0x03,//Gamma Control 1
                2,0x51, 0x0a,0x09,//Gamma Control 2
                2,0x52, 0x00,0x05,//Gamma Control 3
                2,0x53, 0x10,0x21,//Gamma Control 4
                2,0x54, 0x06,0x02,//Gamma Control 5
                2,0x55, 0x00,0x03,//Gamma Control 6
                2,0x56, 0x07,0x03,//Gamma Control 7
                2,0x57, 0x05,0x07,//Gamma Control 8
                2,0x58, 0x10,0x21,//Gamma Control 9
                2,0x59, 0x07,0x03,//Gamma Control 10
                2,0xB0, 0x23,0x01,//Power Control 3
                //2,0xFF, 0x00,0x00,//NVM Commamd Enable
                2,0x07, 0x10,0x17,//Display Control 1
                2,0x10, 0x00,0x00,//Power Control 1
                INIT_TABLE_DELAY, 50,//0xFE, delay 10ms
                INIT_TABLE_END // 0xFF,dont forget this !
                #END

                func main()
                disp_Init(INIT_tbl, GRAM_sm); // initialize the display
                while(!media_Init()) // initialize the SD Card
                putstr("Drive not mounted...");
                pause(1000);
                gfx_Cls();
                pause(100);
                wend
                repeat

                // Movie - "3
                media_SetSector(0x0000, 0x2C11);
                media_Video(0,0);

                forever

                endfunc
                Attached Files

                Comment


                • #9
                  help! help!

                  Comment


                  • #10
                    Sorry, I'm traveling atm, so you will need to hand on for a few more days before I can have a proper look.

                    But since you thing the sm is the issue, here's a typical one for the ST7735 (I think)

                    Code:
                    #DATA
                    byte GRAM_sm
                        WRITE_CONTROL_CONSTANT, CASET,
                        WRITE_DATA_CONSTANT,     0,
                        WRITE_DATA_BYTE, _VX1,
                        WRITE_DATA_CONSTANT,     0,
                        WRITE_DATA_BYTE, _VX2,
                        WRITE_CONTROL_CONSTANT, RASET,
                        WRITE_DATA_CONSTANT,     0,
                        WRITE_DATA_BYTE, _VY1,
                        WRITE_DATA_CONSTANT,     0,
                        WRITE_DATA_BYTE, _VY2,
                        WRITE_EXIT
                    #END
                    Mark

                    Comment


                    • #11
                      Hi,
                      I have tested many combinations, and I don't know what do....
                      I am using the platforn "GOLDELOX" but I have using the GOLDELOX-GFX2" pmmc file... If I triend to write /#platform "GOLDELOX-GFX2", the compilation fails

                      A similar code I have tried before:
                      Code:
                      #platform "GOLDELOX"   
                      //#platform "GOLDELOX-GFX2"
                      #inherit "4DGL_16bitColours.fnc"
                      
                      //=============================================
                      //=============================================
                      // 4D Systems
                      // GOLDELOX-GFX2
                      // display specifics for ST7775R
                      // Version 1.0
                      // 30/11/2017
                      //=============================================
                      //=============================================
                      #constant _DISPLAY_X_MAX 175 //width
                      #constant _DISPLAY_Y_MAX 219//heigTh
                      
                      //=============================================
                      // write device state machine constants
                      // The values are fixed, do not change.
                      // used in GRAM state machine tables
                      //=============================================
                      #CONST
                          WRITE_CONTROL_CONSTANT  0
                          WRITE_DATA_CONSTANT     1
                          WRITE_CONTROL_BYTE      2
                          WRITE_DATA_BYTE         3
                          WRITE_EXIT              0xFF
                      #END
                      
                      
                      //=============================================
                      // GRAM rectangle control register addresses
                      // the values represent the addresses of the
                      // internal register address holding register
                      // and are fixed.
                      
                      //=============================================
                      #CONST
                          _VX1                    0x80//rizontal Address Start Position
                          _VY1                    0x81//rtical Address Start Position
                          _VX2                    0x82//rizontal Address End Position
                          _VY2                    0x83//rtical Address End Position
                      #END
                      
                      //=============================================
                      // ST7775R Registers
                      //=============================================
                      #CONST
                          // ST7775R LCD Controller Commands
                          ST7775_DRAM_H             0x20//Horizontal DRAM Address set    ,Datasheet said: 0x0020
                          ST7775_DRAM_V             0x21//Vertical DRAM Address set      ,Datasheet said: 0x0021
                          ST7775_GRAM               0x22//Write\read data to\from GRAM   ,Datasheet said: 0x0022
                      #END
                      //=============================================
                      // fin
                      //=============================================
                      
                      
                      //===========================================================
                      // GRAM state machine for ST7775R
                      // using 13 bytes
                      //===========================================================
                      #DATA
                      byte GRAM_sm
                          WRITE_CONTROL_CONSTANT, ST7775_DRAM_H,
                          WRITE_DATA_BYTE, 0x00,
                          WRITE_DATA_BYTE, _VX1,
                          WRITE_DATA_BYTE, 0x00,
                          WRITE_DATA_BYTE, _VX2,
                          WRITE_CONTROL_CONSTANT, ST7775_DRAM_V,
                          WRITE_DATA_BYTE, 0x00,
                          WRITE_DATA_BYTE, _VY1,
                          WRITE_DATA_BYTE, 0x00,
                          WRITE_DATA_BYTE, _VY2,
                          WRITE_EXIT
                      #END
                      //===========================================================
                      // initialization for the ST7775R
                      // using 33 bytes
                      //===========================================================
                      #DATA
                      byte INIT_tbl
                      // first 4 bytes of table hold
                      // display access information
                      _DISPLAY_X_MAX, // width: 137-1
                      _DISPLAY_Y_MAX, // height: 220-1
                      ST7775_GRAM, // write access register 0x0022=GRAM Read/Write Port
                      ST7775_GRAM, // read access register
                      // now the display initialization table
                      INIT_TABLE_DELAY, 10,//0xFE, delay 10ms
                      2,0x01,     0x01,0x1C,//Driver Output Control
                      //DOT inversion
                      2,0x02,     0x01,0x00,//LCD Driving Control
                      2,0x03,     0x10,0x30,//Entry Mode
                      2,0x08,     0x08,0x08,//Display Control 2
                      //RGB interface control
                      2,0x0C,     0x00,0x00,//RGB Display Interface Control 1
                      //Oscillator on/off
                      2,0x0F,     0x00,0x01,//Oscillator control
                      //AC pointer set
                      2,0x20,     0x00,0x00,//Horizontal DRAM Address set
                      2,0x21,     0x00,0x00,//Vertical DRAM Address set
                      INIT_TABLE_DELAY, 10,//0xFE, delay 10ms
                      //step up circuit
                      2,0x10,     0x00,0x00,//Power Control 1
                      2,0x11,     0x10,0x00,//Power Control 2
                      INIT_TABLE_DELAY, 50,//0xFE, delay 10ms
                      //display control
                      2,0x30,     0x00,0x00,//Gate Scan Control
                      2,0x31,     0x00,0xdb,//Vertical Scroll Control 1
                      2,0x32,     0x00,0x00,//Vertical Scroll Control 2
                      2,0x33,     0x00,0x00,//Vertical Scroll Control 3
                      2,0x34,     0x00,0xdb,//Partial Driving Control 1
                      2,0x35,     0x00,0x00,//Partial Driving Control 2
                      //set NVM
                      2,0xFA,     0x00,0x40,//NVM Enable
                      2,0xFF,     0x00,0x03,//NVM Commamd Enable
                      2,0xD9,     0x00,0x40,//NVM Commamd Enable
                      //vcom set
                      2,0xB0,     0x17,0x01,//Power Control 3 //VCOM=-1
                      //set AVDD
                      2,0xB2,     0x06,0x16,//Power Control 5 //AVSS=5.1v AVLC=-5,1V
                      //set gamma
                      2,0x50,     0x05,0x07,//Gamma Control 1
                      2,0x51,     0x09,0x0a,//Gamma Control 2
                      2,0x52,     0x02,0x07,//Gamma Control 3
                      2,0x53,     0x19,0x41,//Gamma Control 4
                      2,0x54,     0x07,0x05,//Gamma Control 5
                      2,0x55,     0x06,0x07,//Gamma Control 6
                      2,0x56,     0x07,0x08,//Gamma Control 7
                      2,0x57,     0x02,0x07,//Gamma Control 8
                      2,0x58,     0x19,0x41,//Gamma Control 9
                      2,0x59,     0x06,0x05,//Gamma Control 10
                      //windows size set
                      2,0x36,     0x00,0xaf,//Horizontal Address End Position
                      2,0x37,     0x00,0x00,//Horizontal Address Start Position
                      2,0x38,     0x00,0xdb,//Vertical Address End Position
                      2,0x39,     0x00,0x00,//Vertical Address Start Position
                      INIT_TABLE_DELAY, 10,//0xFE, delay 10ms
                      //frame rate set
                      2,0x0b,     0x00,0x04,//Frame cycle control
                      //display on
                      2,0x07,     0x10,0x17,//Display Control 1
                      INIT_TABLE_DELAY, 50,//0xFE, delay 10ms
                      INIT_TABLE_END // 0xFF,dont forget this !
                      #END
                      
                      func main()
                          com_Init(combuf,7,0);
                          disp_Init(INIT_tbl, GRAM_sm); // initialize the display
                      My displays blinks with the delays and frame refresh, but the screen is white....
                      I attach another document that TRULY provides me. The initialization table is clear to me but some byte must be wrong....
                      Attached Files

                      Comment


                      • #12
                        What have you got the IMx bits set to on the hardware?

                        The app note you have attached shows an SPI configuration (because IM2=gnd), it needs to be configured for 80 series 8bit parallel.
                        Mark

                        Comment


                        • #13
                          Hi
                          My configuration is 8080-8bits because de document said:
                          Click image for larger version

Name:	IM03.png
Views:	70
Size:	57.0 KB
ID:	60832
                          The squematic in the previous doc is not my circuit. It looks like the displays is initializated but some params must be wrong because it only displays with color.
                          Click image for larger version

Name:	displayST7775.png
Views:	83
Size:	103.3 KB
ID:	60830
                          Click image for larger version

Name:	GOldelox.png
Views:	84
Size:	80.7 KB
ID:	60833
                          Attached Files

                          Comment


                          • #14
                            According to this code for ST7775R:
                            Code:
                            void Display::setWindow(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2) {
                                    writeWr(0x37, x1);
                                    writeWr(0x36, x2);
                                    writeWr(0x39, y1);
                                    writeWr(0x38, y2);
                                    writeWr(0x20, x1);
                                    writeWr(0x21, y1);
                                }
                            
                                void Display::drawPixel(int16_t x, int16_t y, uint16_t color) {
                                    setWindow(x, y, x, y);
                                    writeWr(0x22, color);
                                }
                            
                                void Display::begin() {
                                    writeWr(0x01, 0x011C);
                                    writeWr(0x02, 0x0100);
                                    writeWr(0x03, 0x1030);
                                    writeWr(0x08, 0x0808);
                                    writeWr(0x0C, 0x0000);
                                    writeWr(0x0F, 0x0E01);
                            
                                    writeWr(0x10, 0x0A00);
                                    writeWr(0x11, 0x1038);
                                    writeWr(0xFF, 0x0003);
                                    writeWr(0xB0, 0x1411);
                                    writeWr(0xB1, 0x0202);
                                    writeWr(0xB2, 0x0313);
                            
                                    writeWr(0x30, 0x0000);
                                    writeWr(0x31, 0x00db);
                                    writeWr(0x32, 0x0000);
                                    writeWr(0x33, 0x0000);
                                    writeWr(0x34, 0x00db);
                                    writeWr(0x35, 0x0000);
                                    writeWr(0x36, 0x00AF);
                                    writeWr(0x37, 0x0000);
                                    writeWr(0x38, 0x00DB);
                                    writeWr(0x39, 0x0000);
                            
                                    writeWr(0xFF, 0x0003);
                                    writeWr(0x50, 0x0000);
                                    writeWr(0x51, 0x0300);
                                    writeWr(0x52, 0x0103);
                                    writeWr(0x53, 0x2011);
                                    writeWr(0x54, 0x0703);
                                    writeWr(0x55, 0x0000);
                                    writeWr(0x56, 0x0400);
                                    writeWr(0x57, 0x0107);
                                    writeWr(0x58, 0x2011);
                                    writeWr(0x59, 0x0703);
                                    writeWr(0x20, 0x0000);
                                    writeWr(0x21, 0x0000);
                                    writeWr(0x07, 0x1017);
                            }
                            My GRAM part should be like this:

                            Code:
                            #DATA
                            byte GRAM_sm
                            WRITE_CONTROL_CONSTANT, _VX1,
                            WRITE_DATA_BYTE, 0x00,
                            WRITE_CONTROL_CONSTANT, _VX2,
                            WRITE_DATA_BYTE, 0xAF,
                            WRITE_CONTROL_CONSTANT, _VY1,
                            WRITE_DATA_BYTE, 0x00,
                            WRITE_CONTROL_CONSTANT, _VY2,
                            WRITE_DATA_BYTE, 0xDB,
                            WRITE_CONTROL_CONSTANT, ST7775_DRAM_H,
                            WRITE_DATA_BYTE, 0x00,
                            WRITE_CONTROL_CONSTANT, ST7775_DRAM_V,
                            WRITE_DATA_BYTE, 0x00,
                            WRITE_CONTROL_CONSTANT, ST7775_GRAM,
                            WRITE_EXIT
                            #END
                            However, it still doesn't work...

                            Comment


                            • #15
                              Err, trying again whilst looking at the correct datasheet

                              It seems this chip needs 16bit transfers for everything, so you will need to put extra 0s everywhere.

                              Not just the state machine but even the init codes. (and what you have is closer, but still inadequate)

                              But that isn't really feasible as the init codes assume the first byte is the command code, not the first two bytes.

                              What a waste of 'data', so you have to wonder if the datasheet is NQR

                              In post #7 and other places you say "the screen it still is white", in post #13 you say "It looks like the displays is initializated but some params must be wrong because it only displays with color." The display being white tends to indicate it is not being initialized at all, it's just the backlight coming on. Whe you say 'displays with color' what exactly do you mean?

                              Let me look into this further

                              P.S. Why the torture changing displays all the time?
                              Mark

                              Comment

                              Working...
                              X