BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - jmribera

Pages: [1]
1
Hi, thank you all for your help.

you have reason, I had a mistake into the next function, so I wrote a wrong address register:

Quote
void FT813_memWrite16(u32 ftAddress, u16 ftData16) {
   s32   i;
   u8 cTempAddr[3], cTempData[2];
   HAL_StatusTypeDef estat;

   cTempAddr[2] = (u8)(ftAddress >> 16) | MEM_WRITE;   // Compose the command and address to send
   cTempAddr[1] = (u8)(ftAddress >> 8);            // middle byte
   cTempAddr[0] = (u8)(ftAddress);                  // low byte
   
   cTempData[1] = (u8) (ftData16 >> 8);            // Compose data to be sent - high byte
   cTempData[0] = (u8) (ftData16);                  // low byte
   
   FT813_CS_ON;
   for (i=2;i>=0;i--) HAL_SPI_Transmit(&FT813_SPI_H,&cTempAddr,1,FT813_SPI_TO);    // Send Memory Write plus high address byte
   for (i=0;i<2;i++) estat=HAL_SPI_Transmit(&FT813_SPI_H,&cTempData,1,FT813_SPI_TO);    // Send data bytes
   FT813_CS_OFF;   

   }
Now, all is correct.

Thank you

2
Thank you for your help Rudolph! I have my code like this, but the result is exactly the same:

        HAL_Delay(200);
   FT813_PDN_OFF; //Fem un reset del controlador
   HAL_Delay(20);
   FT813_PDN_ON; //Activa Power Down
   HAL_Delay(20); //Requerit
   
   
   FT813_cmdWrite(FT813_CMD_CLKEXT);      // clock extern
   
   HAL_Delay(20);
   
   FT813_cmdWrite(FT813_CMD_ACTIVE);      // activa el chip
   
   HAL_Delay(500); //WAIT 500 ms
   
   while(FT813_memRead8(REG_ID) != 0x7C) {}   // espera a identificar el xip
      
   while (FT813_memRead8(REG_CPURESET) != 0x00) {} // Ensure CPUreset register reads 0 and so FT8xx is ready
      
      
      // WQVGA display parameters
      FT813_memWrite16(REG_HCYCLE,  928);      // Total number of clocks per line
      FT813_memWrite16(REG_HOFFSET, 88);      // Start of active line
      FT813_memWrite16(REG_HSYNC0,  1);      // Start of horizontal sync pulse
      FT813_memWrite16(REG_HSYNC1,  48);      // End of horizontal sync pulse
      FT813_memWrite16(REG_VCYCLE,  525);      // Total number of lines per screen
      FT813_memWrite16(REG_VOFFSET, 32);      // Start of active screen
      FT813_memWrite16(REG_VSYNC0,  0);      // Start of vertical sync pulse
      FT813_memWrite16(REG_VSYNC1,  3);      // End of vertical sync pulse
      FT813_memWrite8(REG_SWIZZLE,  0);      // Define RGB output pins
      FT813_memWrite8(REG_PCLK_POL, 1);      // Define active edge of PCLK
      FT813_memWrite8(REG_CSPREAD, 1);      // This bit controls the polarity of PCLK.
      FT813_memWrite16(REG_HSIZE,   800);      // Active width of LCD display
      FT813_memWrite16(REG_VSIZE,   480);      // Active height of LCD display   

      FT81x_GPIO = FT813_memRead8(REG_GPIO);  // Read the FT800 GPIO register for a read/modify/write operation
      FT81x_GPIO = FT81x_GPIO | 0x80;         // set bit 7 of FT800 GPIO register (DISP) - others are inputs
      FT813_memWrite8(REG_GPIO, FT81x_GPIO);  // Enable the DISP signal to the LCD panel
      
      // Can move these 2 lines to after the first display list to make the start-up appear cleaner to the user
      // FT813_memWrite8(REG_PCLK, 2);           // Now start clocking data to the LCD panel
      FT813_memWrite8(REG_PWM_DUTY, 127);

I've debbuged my code and I read 0x7C, so the init sequence is executed..

3
Hi, we are starting to use FT813 to control a TFT display in a new project.

For now, as you can see in the attached image, we have created a simple composition, but we always get a divided screen and you can see the "rainbow" at the right side. I don%u2019t know how to solve this.

Our screen is 800 x 480 (T500T01X00)

It is our initial sequence (SPI speed is less < 11 MHz)

                HAL_Delay(200);
                FT813_PDN_OFF;
                HAL_Delay(20);
                FT813_PDN_ON; //Activa Power Down
                HAL_Delay(20) //Requerit
               
                FT813_cmdWrite(FT813_CMD_CLKEXT);                              // clock extern
                FT813_cmdWrite(FT813_CMD_ACTIVE);                              // activa el chip

if (FT813_memRead8(REG_ID) == 0x7C) {                            // espera a identificar el xip
                               
                               // WQVGA display parameters
                               FT813_memWrite16(REG_HSIZE,   800);                // Active width of LCD display
                               FT813_memWrite16(REG_HCYCLE,  928);             // Total number of clocks per line
                               FT813_memWrite16(REG_HOFFSET, 88);             // Start of active line
                               FT813_memWrite16(REG_HSYNC0,  1);                 // Start of horizontal sync pulse
                               FT813_memWrite16(REG_HSYNC1,  48);              // End of horizontal sync pulse
                               FT813_memWrite16(REG_VSIZE,   480);                // Active height of LCD display   
                               FT813_memWrite16(REG_VCYCLE,  525);             // Total number of lines per screen
                               FT813_memWrite16(REG_VOFFSET, 32);             // Start of active screen
                               FT813_memWrite16(REG_VSYNC0,  0);                 // Start of vertical sync pulse
                               FT813_memWrite16(REG_VSYNC1,  3);                 // End of vertical sync pulse
                               FT813_memWrite8(REG_SWIZZLE,  0);                  // Define RGB output pins
                               FT813_memWrite8(REG_PCLK_POL, 1);                // Define active edge of PCLK

                               FT81x_GPIO = FT813_memRead8(REG_GPIO);  // Read the FT800 GPIO register for a read/modify/write operation
                               FT81x_GPIO = FT81x_GPIO | 0x80;         // set bit 7 of FT800 GPIO register (DISP) - others are inputs
                               FT813_memWrite8(REG_GPIO, FT81x_GPIO);  // Enable the DISP signal to the LCD panel
                               
                               // Can move these 2 lines to after the first display list to make the start-up appear cleaner to the user
                               FT813_memWrite8(REG_PCLK, 2);           // Now start clocking data to the LCD panel
                               FT813_memWrite8(REG_PWM_DUTY, 127);



                               val = SI;               
                               }
                else val = NO;

I've changed the values of this configurations, but I got the same result. Based on your experience, what could be the problem?

Thank you in advance



Pages: [1]