Jump to content

Recommended Posts

Posted

I'm trying to initialize display with ILI9325 and I've found that this is impossible.

I begin to check this driver and found completely strange initialization sequence. Code is complete mess - no register names, no values clues. Pretty bad programming style.

 

Did anybody had a success with this controller and uGFX's driver?

I have mine initialization routine, that works perfect by itself and with emWin. Look attachment.

LCD_hardware_routines_ILI_9325.h

LCD_hardware_routines_ILI_9325.c

Posted

YES!

I just replace all mess code that is shipped with library (look file 'gdisp_lld_ILI9325.c') and everithing works!!!

Dear uGFX command. I'm not recommending you provide hardware code for LCD controllers. It is a way of errors.

Take code that I provided to you.

 

Posted

Thank you we will look at the code.

Many of the drivers are contributed and you are right, many are poorly documented. That in many cases reflects the source material. Many controllers do not have published manuals. Some manuals are confidential. Some init sequences have been replicated from known working code from other sources. Some have been reverse engineered. Some manuals are just wrong or the chips have undocumented bugs.

As for the ILI9325 this is known working code eg The Mikromedia STM32 mini board.

Note the ILI9325 are known for knock-off and near compatible chips. Some are marked ILI9325 but are not truly compatible particularly from Chinese sources. That is why there are a number of variant drivers for the ILI series.

So, we will test your init sequence and test it against a number of boards that we have. As a result of that we may replace the existing code or we may split it to create yet another ILI series driver.

What was the board you used so that we can add it to our database? 

  • 3 months later...
Posted

Hi Constantine, 

Would you be willing to provide your  GDISP_CONTROL_ORIENTATION cases from your implementation? I too was struggling with the ILI9325. After porting over my init code, it all seems to work but my orientations are wrong and text doesnt render properly. I have a feeling my initialized rotations are different from what uGFX expects.

Thanks!

Posted

Hi Joel, 

What I was looking for was the board implementation but i must have missed the files posted by @Constantine. What I am experiencing is a mismatch between my LCD's 0,0 and what ugfx thinks it's 0,0 is. In other words, I get garbled image data due to drawing to the wrong locations. I am going to attempt his solution of re-working 0,0 via math rather than changing the LCD's gram write direction registers and see if i manage to get it working that way.

 

Thanks for your response! I really appreciate the help. 

 

Posted

The rotation/orientation handling is not part of the board file - the driver is responsible for that. The board file is really just for sending the correct bytes over the used interface, physically controlling the backlight and things like that. Board files have no effect on orientation and other stuff like that.

When I understand you correctly you get "correct" or "sane" output on the display but with the wrong orientation or even mirrored, is that correct? If so, look at the driver initialization sequence inside of the driver code (inside gdisp_lld_init()). The ILI9325 display driver has two bits called AM and ID (when I recall correctly) that are used to control the display orientation and mirroring/inverting. They are very well documented with good illustrations in the corresponding datasheet. Most likely you just have to change one byte value in the initialization sequence to get your display up and running.

The reason for these problems is because it depends how the manufacturer of the display module connects the actual display panel to the ILI9325 display controller. The order of the physical wires dictate the correct settings for these AM and ID bits. As there are different ways to connect these wires different settings are required.
For the SSD1963 driver we simply added an INVERT_X and INVERT_Y configuration macro. For µGFX 3.0 we will be using a different, more versatile display interface that allows coping with these problems. For now you simply have to adjust the AM and ID bits in the driver.

I hope that helps.

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...