Jump to content

Is 3.2 inch tft lcd arduino mega 2560 supported in ugfx lcd drivers?


mohsenMaz

Recommended Posts

Hello.I'm using this lcd and the displayed colors are not making any sense.

I use gdispClear and every color ends up blue or black or in between on the lcd screen (the ugfx logo at the startup displays correctly with blue and black background) .

In the project I used the ILI9341 driver......

any help would be appreciated.

 

Edited by mohsenMaz
Link to comment
Share on other sites

  • mohsenMaz changed the title to Is 3.2 inch tft lcd arduino mega 2560 supported in ugfx lcd drivers?

Hello & Welcome to the µGFX community!

It's difficult to get any information from just a picture of a display module. In general, any display can be interfaced with µGFX due to the flexible interface design.
ILI9341 based displays are certainly very common and used by plenty of individuals and commercial customers.

Could you please provide more detailed information such as:

  • The physical interface used (i.e. parallel 4-bit, parallel 8-bit, parallel 16-bit, RGB, SPI, I2C, ...)
  • The GDISP board file(s) you're using
  • Your gfxconf.h
  • Datasheet of the display module itself (or link to where you purchased it from)
  • Details on how you hooked up that display module to your host controller

In general, if only colors are incorrect you're almost there. This indicates that the system is overall working.
Common sources of problems regarding colors:

  • Incorrectly configured color format
  • Incorrect color handling in GDISP board file (if any)
  • Incorrect display controller initialization
  • Incorrect wiring if using a parallel interface

The last point is unfortunately very common with ILIxxxx display controllers. What we observed over the years is that often you get a different chip than advertised, differences in silicon revisions, knock-offs and so on. Often you'll be supplied with a display controller initialization sequence from your dispaly module vendor. This sequence can sometimes look different than the sequence of the official ILI9341 driver found in gdisp_lld_init() here: https://git.ugfx.io/uGFX/ugfx/src/branch/master/drivers/gdisp/ILI9341/gdisp_lld_ILI9341.c

 

17 hours ago, mohsenMaz said:

(the ugfx logo at the startup displays correctly with blue and black background) .

The logo should actually be white on back :)

Link to comment
Share on other sites

On 12/04/2022 at 16:11, Joel Bodenmann said:

was just about to respond to your posts from yesterday - they seem to be deleted now. Also your initial post appears to be edited.
Did you managed to get it working?

Hey....

Sorry for that.....

I tried but I couldn't........I tried some of the drivers like ILI9488 or ILI9481 or even SD1298.....

I almost made it with one of them (and that was ILI9488....... it's not like my lcd driver is ILI9341!!!!!!) but the resolution and the colors messed up again.....

You know it would be great if you as the developers design Ugfx so that it would be INDEPENDENT of Ugfx built-in drivers.....

Like LVGL for example......you just need to define DrawPixel(x,y,color); and that's it......

Anyway, thank you for your response.....🙏

Edited by mohsenMaz
Link to comment
Share on other sites

On 19/04/2022 at 04:17, mohsenMaz said:

You know it would be great if you as the developers design Ugfx so that it would be INDEPENDENT of Ugfx built-in drivers.....

That is actually the case! All drivers are separate components. You can use them, or you can not use them.

 

On 19/04/2022 at 04:17, mohsenMaz said:

Like LVGL for example......you just need to define DrawPixel(x,y,color); and that's it......

You can do that with µGFX too.
You can make a simple wrapper driver which uses the Point and Block interface. Then you only need to implement this function:
 

gdisp_lld_draw_pixel(GDisplay *g);

Where g is a pointer to the GDisplay structure which will hold x, y and color information.

Let us know if you have any questions. We'll gladly help wherever we can :)

Link to comment
Share on other sites

On 20/04/2022 at 16:14, Joel Bodenmann said:

You can make a simple wrapper driver which uses the Point and Block interface

Thank you for informing me of this method.

I finally got the module working, but still some problems.......

1- The screen is divided into segments on the lcd !

2 - This is my code:

/* USER CODE BEGIN 2 */
	
	gfxInit();

  /* USER CODE END 2 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */
		gdispClear(Red);
		gfxSleepMilliseconds(1000);
		gdispClear(Green);
		gfxSleepMilliseconds(1000);
		gdispClear(Blue);
		gfxSleepMilliseconds(1000);
  }
   /* USER CODE END 3 */

a simple test to see if the library works fine....

red and green seem to be OK but the Blue is also green.

And by the way, I couldn't find a link to download uGFX studio. Why is that?

20220423_104825.jpg

Link to comment
Share on other sites

On 23/04/2022 at 08:38, mohsenMaz said:

1- The screen is divided into segments on the lcd !

Does this also happen if you lower the FSMC frequency?

 

On 23/04/2022 at 08:38, mohsenMaz said:

red and green seem to be OK but the Blue is also green.

Can you please elaborate on the method you used to interface the GDISP driver interface? Did you write a custom driver? If so - and you only implemented the set-pixel functionality - please make sure that your driver config file doesn't enable advanced features like hardware filling, streaming etc.
The GDISP module of the µGFX library will automatically use the "best" method available to accomplish any given rendering task. This is why in general you don't want to have a driver that only implements the set-pixel function as this greatly reduces performance for more complex scenarios. But we can revisit that once you have everything working as per expectations :)

 

On 23/04/2022 at 08:38, mohsenMaz said:

And by the way, I couldn't find a link to download uGFX studio. Why is that?

The µGFX Studio is currently not publicly available.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...